@tsparticles/all 3.0.0-beta.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/index.js +2 -0
- package/cjs/index.js +2 -0
- package/esm/index.js +2 -0
- package/package.json +45 -44
- package/report.html +3 -3
- package/tsparticles.all.bundle.js +650 -292
- package/tsparticles.all.bundle.min.js +1 -1
- package/tsparticles.all.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.all.js +143 -132
- package/tsparticles.all.min.js +1 -1
- package/tsparticles.all.min.js.LICENSE.txt +1 -1
- package/umd/index.js +3 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.all.bundle.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AnimatableColor:()=>Me,AnimationOptions:()=>Ce,AnimationValueWithRandom:()=>Re,Background:()=>he,BackgroundMask:()=>de,BackgroundMaskCover:()=>le,Circle:()=>yi,ClickEvent:()=>pe,Collisions:()=>Le,CollisionsAbsorb:()=>Ve,CollisionsOverlap:()=>Ge,ColorAnimation:()=>Te,DivEvent:()=>ge,Events:()=>ve,ExternalInteractorBase:()=>Mi,FullScreen:()=>ue,HoverEvent:()=>ye,HslAnimation:()=>Ae,HslColorManager:()=>Ti,Interactivity:()=>_e,ManualParticle:()=>be,Modes:()=>me,Move:()=>We,MoveAngle:()=>He,MoveAttract:()=>Be,MoveCenter:()=>Fe,MoveGravity:()=>Ue,MovePath:()=>Ne,MoveTrail:()=>$e,Opacity:()=>Xe,OpacityAnimation:()=>Ze,Options:()=>hi,OptionsColor:()=>ce,OutModes:()=>je,Parallax:()=>fe,ParticlesBounce:()=>Ie,ParticlesBounceFactor:()=>ze,ParticlesDensity:()=>Ye,ParticlesInteractorBase:()=>Vi,ParticlesNumber:()=>Ke,ParticlesNumberLimit:()=>Je,ParticlesOptions:()=>ai,Point:()=>pi,Range:()=>gi,RangedAnimationOptions:()=>Oe,RangedAnimationValueWithRandom:()=>ke,Rectangle:()=>fi,ResizeEvent:()=>we,Responsive:()=>Se,RgbColorManager:()=>Ai,Shadow:()=>ti,Shape:()=>ei,Size:()=>si,SizeAnimation:()=>ii,Spin:()=>Qe,Stroke:()=>oi,Theme:()=>Pe,ThemeDefault:()=>xe,ValueWithRandom:()=>Ee,Vector:()=>y,Vector3d:()=>f,ZIndex:()=>ni,addColorManager:()=>Tt,addEasing:()=>m,alterHsl:()=>se,areBoundsInside:()=>et,arrayRandomIndex:()=>J,calcExactPositionOrRandomFromSize:()=>D,calcExactPositionOrRandomFromSizeRanged:()=>H,calcPositionFromSize:()=>z,calcPositionOrRandomFromSize:()=>I,calcPositionOrRandomFromSizeRanged:()=>L,calculateBounds:()=>it,circleBounce:()=>ht,circleBounceDataFromParticle:()=>ct,clamp:()=>x,clear:()=>Xt,collisionVelocity:()=>k,colorMix:()=>Ft,colorToHsl:()=>Gt,colorToRgb:()=>Vt,deepExtend:()=>st,divMode:()=>rt,divModeExecute:()=>nt,drawEffect:()=>Jt,drawLine:()=>Qt,drawParticle:()=>Yt,drawParticlePlugin:()=>ie,drawPlugin:()=>ee,drawShape:()=>Kt,drawShapeAfterDraw:()=>te,errorPrefix:()=>g,executeOnSingleOrMultiple:()=>dt,findItemFromSingleOrMultiple:()=>pt,generatedAttribute:()=>i,getDistance:()=>G,getDistances:()=>V,getEasing:()=>_,getHslAnimationFromHsl:()=>$t,getHslFromAnimation:()=>qt,getLinkColor:()=>Ut,getLinkRandomColor:()=>Nt,getLogger:()=>N,getParticleBaseVelocity:()=>R,getParticleDirectionAngle:()=>E,getPosition:()=>yt,getRandom:()=>S,getRandomRgbColor:()=>Dt,getRangeMax:()=>A,getRangeMin:()=>T,getRangeValue:()=>O,getSize:()=>wt,getStyleFromHsl:()=>Bt,getStyleFromRgb:()=>Ht,hasMatchMedia:()=>j,hslToRgb:()=>It,hslaToRgba:()=>Lt,initParticleNumericAnimationValue:()=>gt,isArray:()=>xt,isBoolean:()=>vt,isDivModeEnabled:()=>ot,isFunction:()=>bt,isInArray:()=>X,isNumber:()=>_t,isObject:()=>St,isPointInside:()=>tt,isSsr:()=>$,isString:()=>mt,itemFromArray:()=>K,itemFromSingleOrMultiple:()=>ut,loadAll:()=>Zr,loadFont:()=>Y,loadOptions:()=>ri,loadParticlesOptions:()=>ci,mix:()=>P,mouseDownEvent:()=>s,mouseLeaveEvent:()=>n,mouseMoveEvent:()=>r,mouseOutEvent:()=>a,mouseUpEvent:()=>o,paintBase:()=>Wt,paintImage:()=>Zt,parseAlpha:()=>B,randomInRange:()=>C,rangeColorToHsl:()=>Et,rangeColorToRgb:()=>Mt,rectBounce:()=>lt,resizeEvent:()=>u,rgbToHsl:()=>Rt,safeIntersectionObserver:()=>W,safeMatchMedia:()=>Q,safeMutationObserver:()=>Z,setLogger:()=>U,setRandom:()=>b,setRangeValue:()=>M,singleDivModeExecute:()=>at,stringToAlpha:()=>kt,stringToRgb:()=>zt,touchCancelEvent:()=>d,touchEndEvent:()=>h,touchMoveEvent:()=>l,touchStartEvent:()=>c,tsParticles:()=>Gi,visibilityChangeEvent:()=>p});const i="generated",s="pointerdown",o="pointerup",n="pointerleave",a="pointerout",r="pointermove",c="touchstart",h="touchend",l="touchmove",d="touchcancel",u="resize",p="visibilitychange",g="tsParticles - Error";class f{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!_t(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:0}else{if(void 0===t||void 0===e)throw new Error(`${g} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??0}}static get origin(){return f.create(0,0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return f.create(t.x,t.y,t.z)}static create(t,e,i){return new f(t,e,i)}add(t){return f.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return f.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return f.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return f.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return f.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),0)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:0}sub(t){return f.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}}class y extends f{constructor(t,e){super(t,e,0)}static get origin(){return y.create(0,0)}static clone(t){return y.create(t.x,t.y)}static create(t,e){return new y(t,e)}}let w=Math.random;const v=new Map;function m(t,e){v.get(t)||v.set(t,e)}function _(t){return v.get(t)||(t=>t)}function b(t=Math.random){w=t}function S(){return x(w(),0,1-1e-16)}function x(t,e,i){return Math.min(Math.max(t,e),i)}function P(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function C(t){const e=A(t);let i=T(t);return e===i&&(i=0),S()*(e-i)+i}function O(t){return _t(t)?t:C(t)}function T(t){return _t(t)?t:t.min}function A(t){return _t(t)?t:t.max}function M(t,e){if(t===e||void 0===e&&_t(t))return t;const i=T(t),s=A(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:M(i,s)}function V(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.sqrt(i**2+s**2)}}function G(t,e){return V(t,e).distance}function E(t,e,i){if(_t(t))return t*Math.PI/180;switch(t){case"top":return.5*-Math.PI;case"top-right":return.25*-Math.PI;case"right":return 0;case"bottom-right":return.25*Math.PI;case"bottom":return.5*Math.PI;case"bottom-left":return.75*Math.PI;case"left":return Math.PI;case"top-left":return.75*-Math.PI;case"inside":return Math.atan2(i.y-e.y,i.x-e.x);case"outside":return Math.atan2(e.y-i.y,e.x-i.x);default:return S()*Math.PI*2}}function R(t){const e=y.origin;return e.length=1,e.angle=t,e}function k(t,e,i,s){return y.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function z(t){return t.position&&void 0!==t.position.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/100,y:t.position.y*t.size.height/100}:void 0}function I(t){return{x:(t.position?.x??100*S())*t.size.width/100,y:(t.position?.y??100*S())*t.size.height/100}}function L(t){const e={x:void 0!==t.position?.x?O(t.position.x):void 0,y:void 0!==t.position?.y?O(t.position.y):void 0};return I({size:t.size,position:e})}function D(t){return{x:t.position?.x??S()*t.size.width,y:t.position?.y??S()*t.size.height}}function H(t){const e={x:void 0!==t.position?.x?O(t.position.x):void 0,y:void 0!==t.position?.y?O(t.position.y):void 0};return D({size:t.size,position:e})}function B(t){return t?t.endsWith("%")?parseFloat(t)/100:parseFloat(t):1}const F={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function U(t){F.debug=t.debug||F.debug,F.error=t.error||F.error,F.info=t.info||F.info,F.log=t.log||F.log,F.verbose=t.verbose||F.verbose,F.warning=t.warning||F.warning}function N(){return F}function q(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:o,rectOtherSide:n,velocity:a,factor:r}=t;return s.min<n.min||s.min>n.max||s.max<n.min||s.max>n.max||(i.max>=o.min&&i.max<=.5*(o.max+o.min)&&a>0||i.min<=o.max&&i.min>.5*(o.max+o.min)&&a<0)&&(e.velocity=a*-r,e.bounced=!0),e}function $(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function j(){return!$()&&"undefined"!=typeof matchMedia}function Q(t){if(j())return matchMedia(t)}function W(t){if(!$()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function Z(t){if(!$()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}function X(t,e){return t===e||xt(e)&&e.indexOf(t)>-1}async function Y(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function J(t){return Math.floor(S()*t.length)}function K(t,e,i=!0){return t[void 0!==e&&i?e%t.length:J(t)]}function tt(t,e,i,s,o){return et(it(t,s??0),e,i,o)}function et(t,e,i,s){let o=!0;return s&&"bottom"!==s||(o=t.top<e.height+i.x),!o||s&&"left"!==s||(o=t.right>i.x),!o||s&&"right"!==s||(o=t.left<e.width+i.y),!o||s&&"top"!==s||(o=t.bottom>i.y),o}function it(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function st(t,...e){for(const i of e){if(null==i)continue;if(!St(i)){t=i;continue}const e=Array.isArray(i);!e||!St(t)&&t&&Array.isArray(t)?e||!St(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],o=t;o[e]=St(s)&&Array.isArray(s)?s.map((t=>st(o[e],t))):st(o[e],s)}}return t}function ot(t,e){return!!pt(e,(e=>e.enable&&X(t,e.mode)))}function nt(t,e,i){dt(e,(e=>{const s=e.mode;e.enable&&X(t,s)&&at(e,i)}))}function at(t,e){dt(t.selectors,(i=>{e(i,t)}))}function rt(t,e){if(e&&t)return pt(t,(t=>function(t,e){const i=dt(e,(e=>t.matches(e)));return xt(i)?i.some((t=>t)):i}(e,t.selectors)))}function ct(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:y.create(O(t.options.bounce.horizontal.value),O(t.options.bounce.vertical.value))}}function ht(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[o,n]=[t.position,e.position],{dx:a,dy:r}=V(n,o);if(i*a+s*r<0)return;const c=-Math.atan2(r,a),h=t.mass,l=e.mass,d=t.velocity.rotate(c),u=e.velocity.rotate(c),p=k(d,u,h,l),g=k(u,d,h,l),f=p.rotate(-c),y=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function lt(t,e){const i=it(t.getPosition(),t.getRadius()),s=t.options.bounce,o=q({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:O(s.horizontal.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.x=o.velocity),void 0!==o.position&&(t.position.x=o.position));const n=q({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:O(s.vertical.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.y=n.velocity),void 0!==n.position&&(t.position.y=n.position))}function dt(t,e){return xt(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function ut(t,e,i){return xt(t)?K(t,e,i):t}function pt(t,e){return xt(t)?t.find(((t,i)=>e(t,i))):e(t,0)?t:void 0}function gt(t,e){const i=t.value,s=t.animation,o={delayTime:1e3*O(s.delay),enable:s.enable,value:O(t.value)*e,max:A(i)*e,min:T(i)*e,loops:0,maxLoops:O(s.count),time:0};if(s.enable){switch(o.decay=1-O(s.decay),s.mode){case"increase":o.status="increasing";break;case"decrease":o.status="decreasing";break;case"random":o.status=S()>=.5?"increasing":"decreasing"}const t="auto"===s.mode;switch(s.startValue){case"min":o.value=o.min,t&&(o.status="increasing");break;case"max":o.value=o.max,t&&(o.status="decreasing");break;default:o.value=C(o),t&&(o.status=S()>=.5?"increasing":"decreasing")}}return o.initialValue=o.value,o}function ft(t,e){if(!("percent"===t.mode)){const{mode:e,...i}=t;return i}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 yt(t,e){return ft(t,e)}function wt(t,e){return ft(t,e)}function vt(t){return"boolean"==typeof t}function mt(t){return"string"==typeof t}function _t(t){return"number"==typeof t}function bt(t){return"function"==typeof t}function St(t){return"object"==typeof t&&null!==t}function xt(t){return Array.isArray(t)}const Pt="random",Ct="mid",Ot=new Map;function Tt(t){Ot.set(t.key,t)}function At(t){for(const[,e]of Ot)if(t.startsWith(e.stringPrefix))return e.parseString(t);const e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,e,i,s,o)=>e+e+i+i+s+s+(void 0!==o?o+o:""))),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);return i?{a:void 0!==i[4]?parseInt(i[4],16)/255:1,b:parseInt(i[3],16),g:parseInt(i[2],16),r:parseInt(i[1],16)}:void 0}function Mt(t,e,i=!0){if(!t)return;const s=mt(t)?{value:t}:t;if(mt(s.value))return Vt(s.value,e,i);if(xt(s.value))return Mt({value:K(s.value,e,i)});for(const[,t]of Ot){const e=t.handleRangeColor(s);if(e)return e}}function Vt(t,e,i=!0){if(!t)return;const s=mt(t)?{value:t}:t;if(mt(s.value))return s.value===Pt?Dt():zt(s.value);if(xt(s.value))return Vt({value:K(s.value,e,i)});for(const[,t]of Ot){const e=t.handleColor(s);if(e)return e}}function Gt(t,e,i=!0){const s=Vt(t,e,i);return s?Rt(s):void 0}function Et(t,e,i=!0){const s=Mt(t,e,i);return s?Rt(s):void 0}function Rt(t){const e=t.r/255,i=t.g/255,s=t.b/255,o=Math.max(e,i,s),n=Math.min(e,i,s),a={h:0,l:.5*(o+n),s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=e===o?(i-s)/(o-n):a.h=i===o?2+(s-e)/(o-n):4+(e-i)/(o-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function kt(t){return At(t)?.a}function zt(t){return At(t)}function It(t){const e=(t.h%360+360)%360,i=Math.max(0,Math.min(100,t.s)),s=e/360,o=i/100,n=Math.max(0,Math.min(100,t.l))/100;if(0===i){const t=Math.round(255*n);return{r:t,g:t,b:t}}const a=(t,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),6*i<1?t+6*(e-t)*i:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t),r=n<.5?n*(1+o):n+o-n*o,c=2*n-r,h=Math.min(255,255*a(c,r,s+1/3)),l=Math.min(255,255*a(c,r,s)),d=Math.min(255,255*a(c,r,s-1/3));return{r:Math.round(h),g:Math.round(l),b:Math.round(d)}}function Lt(t){const e=It(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Dt(t){const e=t??0;return{b:Math.floor(C(M(e,256))),g:Math.floor(C(M(e,256))),r:Math.floor(C(M(e,256)))}}function Ht(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??1})`}function Bt(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??1})`}function Ft(t,e,i,s){let o=t,n=e;return void 0===o.r&&(o=It(t)),void 0===n.r&&(n=It(e)),{b:P(o.b,n.b,i,s),g:P(o.g,n.g,i,s),r:P(o.r,n.r,i,s)}}function Ut(t,e,i){if(i===Pt)return Dt();if(i!==Ct)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ft(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return It(t)}}}function Nt(t,e,i){const s=mt(t)?t:t.value;return s===Pt?i?Mt({value:s}):e?Pt:Ct:s===Ct?Ct:Mt({value:s})}function qt(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function $t(t,e,i){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(jt(s.h,e.h,i),jt(s.s,e.s,i),jt(s.l,e.l,i)),s}function jt(t,e,i){t.enable=e.enable,t.enable?(t.velocity=O(e.speed)/100*i,t.decay=1-O(e.decay),t.status="increasing",t.loops=0,t.maxLoops=O(e.count),t.time=0,t.delayTime=1e3*O(e.delay),e.sync||(t.velocity*=S(),t.value*=S()),t.initialValue=t.value):t.velocity=0}function Qt(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Wt(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(0,0,e.width,e.height)}function Zt(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,0,0,e.width,e.height),t.globalAlpha=1)}function Xt(t,e){t.clearRect(0,0,e.width,e.height)}function Yt(t){const{container:e,context:i,particle:s,delta:o,colorStyles:n,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:0),g=Math.sin(p),f=Math.cos(p),y={a:f*(d.a??1),b:g*(d.b??1),c:-g*(d.c??1),d:f*(d.d??1)};i.setTransform(y.a,y.b,y.c,y.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const w=s.shadowColor;l.enable&&w&&(i.shadowBlur=l.blur,i.shadowColor=Ht(w),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),n.fill&&(i.fillStyle=n.fill);const v=s.strokeWidth??0;i.lineWidth=v,n.stroke&&(i.strokeStyle=n.stroke);const m={container:e,context:i,particle:s,radius:c,opacity:h,delta:o};i.beginPath(),Kt(m),s.shapeClose&&i.closePath(),v>0&&i.stroke(),s.shapeFill&&i.fill(),te(m),Jt(m),i.globalCompositeOperation="source-over",i.setTransform(1,0,0,1,0,0)}function Jt(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a}=t;if(!s.effect)return;const r=e.effectDrawers.get(s.effect);r&&r.draw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio})}function Kt(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a}=t;if(!s.shape)return;const r=e.shapeDrawers.get(s.shape);r&&r.draw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio})}function te(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a}=t;if(!s.shape)return;const r=e.shapeDrawers.get(s.shape);r&&r.afterDraw&&r.afterDraw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio})}function ee(t,e,i){e.draw&&e.draw(t,i)}function ie(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}function se(t,e,i){return{h:t.h,s:t.s,l:t.l+("darken"===e?-1:1)*i}}function oe(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ne{constructor(t){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw&&e.afterDraw(t)},this._applyPreDrawUpdaters=(t,e,i,s,o,n)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:n,stroke:r}=a.getColorStyles(e,t,i,s);n&&(o.fill=n),r&&(o.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)oe(n,t,e)}a.beforeDraw&&a.beforeDraw(e)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize&&t.resize()},this._getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Et(s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Et(s.particleStrokeColor(t))),e&&i)break;return[e,i]},this._initCover=()=>{const t=this.container.actualOptions.backgroundMask.cover,e=Mt(t.color);if(e){const i={...e,a:t.opacity};this._coverColorStyle=Ht(i,i.a)}},this._initStyle=()=>{const t=this.element,e=this.container.actualOptions;if(t){this._fullScreen?(this._originalStyle=st({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style)continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}},this._initTrail=async()=>{const t=this.container.actualOptions,e=t.particles.move.trail,i=e.fill;if(e.enable)if(i.color){const e=Mt(i.color);if(!e)return;const s=t.particles.move.trail;this._trailFill={color:{...e},opacity:1/s.length}}else await new Promise(((t,s)=>{if(!i.image)return;const o=document.createElement("img");o.addEventListener("load",(()=>{this._trailFill={image:o,opacity:1/e.length},t()})),o.addEventListener("error",(t=>{s(t.error)})),o.src=i.image}))},this._paintBase=t=>{this.draw((e=>Wt(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>Zt(i,this.size,t,e)))},this._repairStyle=()=>{const t=this.element;t&&(this._safeMutationObserver((t=>t.disconnect())),this._initStyle(),this.initBackground(),this._safeMutationObserver((e=>e.observe(t,{attributes:!0}))))},this._resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;if(!t||!e)return;const i=t.style;i.position=e.position,i.zIndex=e.zIndex,i.top=e.top,i.left=e.left,i.width=e.width,i.height=e.height},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;if(!t)return;const e="important",i=t.style;i.setProperty("position","fixed",e),i.setProperty("z-index",this.container.actualOptions.fullScreen.zIndex.toString(10),e),i.setProperty("top","0",e),i.setProperty("left","0",e),i.setProperty("width","100%",e),i.setProperty("height","100%",e)},this.size={height:0,width:0},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,e=t.particles.move.trail,i=this._trailFill;t.backgroundMask.enable?this.paint():e.enable&&e.length>0&&i?i.color?this._paintBase(Ht(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):this.draw((t=>{Xt(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t&&t.remove()}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),o=t.getStrokeColor()??s;let[n,a]=this._getPluginParticleColors(t);n||(n=s),a||(a=o),(n||a)&&this.draw((s=>{const o=this.container,r=o.actualOptions,c=t.options.zIndex,h=(1-t.zIndexFactor)**c.opacityRate,l=t.bubble.opacity??t.opacity?.value??1,d=l*h,u=(t.strokeOpacity??l)*h,p={},g={fill:n?Bt(n,d):void 0};g.stroke=a?Bt(a,u):g.fill,this._applyPreDrawUpdaters(s,t,i,d,g,p),Yt({container:o,context:s,particle:t,delta:e,colorStyles:g,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*(1-t.zIndexFactor)**c.sizeRate,opacity:d,shadow:t.options.shadow,transform:p}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>ie(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>ee(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=Z((t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),this._initCover();try{await this._initTrail()}catch(t){N().error(t)}this.initBackground(),this._safeMutationObserver((t=>{this.element&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,e=this.element;if(!e)return;const i=e.style;if(i){if(t.color){const e=Mt(t.color);i.backgroundColor=e?Ht(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}initPlugins(){this._resizePlugins=[];for(const[,t]of this.container.plugins)t.resize&&this._resizePlugins.push(t),(t.particleFillColor||t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles||t.getTransformValues||t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove(),this._generated=t.dataset&&i in t.dataset?"true"===t.dataset[i]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=st({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>{this.element&&t.observe(this.element,{attributes:!0})})),this.container.retina.init(),this.initBackground()}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Xt(e,this.size),this._paintBase(this._coverColorStyle)):this._paintBase()}))}resize(){if(!this.element)return!1;const t=this.container,e=t.retina.pixelRatio,i=t.canvas.size,s=this.element.offsetWidth*e,o=this.element.offsetHeight*e;if(o===i.height&&s===i.width&&o===this.element.height&&s===this.element.width)return!1;const n={...i};return this.element.width=i.width=this.element.offsetWidth*e,this.element.height=i.height=this.element.offsetHeight*e,this.container.started&&t.particles.setResizeFactor({width:i.width/n.width,height:i.height/n.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Xt(t,this.size)))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}}function ae(t,e,i,s,o){if(s){let s={passive:!0};vt(o)?s.capture=o:void 0!==o&&(s=o),t.addEventListener(e,i,s)}else{const s=o;t.removeEventListener(e,i,s)}}class re{constructor(t){this.container=t,this._doMouseTouchClick=t=>{const e=this.container,i=e.actualOptions;if(this._canPush){const t=e.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=(new Date).getTime();dt(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),500)},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,o=s.defaultThemes,n=e.matches?o.dark:o.light,a=s.themes.find((t=>t.name===n));a&&a.default.auto&&i.loadTheme(n)},this._handleVisibilityChange=()=>{const t=this.container,e=t.actualOptions;this._mouseTouchFinish(),e.pauseOnBlur&&(document&&document.hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.getAnimationStatus()?t.play(!0):t.draw(!0)))},this._handleWindowResize=async()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout),this._resizeTimeout=setTimeout((async()=>{const t=this.container.canvas;t&&await t.windowResize()}),1e3*this.container.actualOptions.interactivity.events.resize.delay)},this._manageInteractivityListeners=(t,e)=>{const i=this._handlers,n=this.container,a=n.actualOptions,u=n.interactivity.element;if(!u)return;const p=u,g=n.canvas.element;g&&(g.style.pointerEvents=p===g?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(ae(u,r,i.mouseMove,e),ae(u,c,i.touchStart,e),ae(u,l,i.touchMove,e),a.interactivity.events.onClick.enable?(ae(u,h,i.touchEndClick,e),ae(u,o,i.mouseUp,e),ae(u,s,i.mouseDown,e)):ae(u,h,i.touchEnd,e),ae(u,t,i.mouseLeave,e),ae(u,d,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,o=i.canvas.element;let r=n;"window"===s?(i.interactivity.element=window,r=a):i.interactivity.element="parent"===s&&o?o.parentElement??o.parentNode:o,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(r,t),document&&ae(document,p,e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=Q("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):ae(i,"change",e.themeChange,t))},this._manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver)return void ae(window,u,e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((async t=>{t.find((t=>t.target===s))&&await this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container;if(!t)return;const{mouse:e}=t;e.clicking=!0,e.downPosition=e.position},this._mouseTouchClick=t=>{const e=this.container,i=e.actualOptions,{mouse:s}=e.interactivity;s.inside=!0;let o=!1;const n=s.position;if(n&&i.interactivity.events.onClick.enable){for(const[,t]of e.plugins)if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=n,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,o=e.canvas.element;if(!s||!s.element)return;let n;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(o){const t=o.getBoundingClientRect();n={x:e.clientX-t.left,y:e.clientY-t.top}}}else if("parent"===i.interactivity.detectsOn){const t=e.target,i=e.currentTarget;if(t&&i&&o){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),r=o.getBoundingClientRect();n={x:e.offsetX+2*s.left-(a.left+r.left),y:e.offsetY+2*s.top-(a.top+r.top)}}else n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===o&&(n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,o){const e=t,i=e.touches[e.touches.length-1],s=o.getBoundingClientRect();n={x:i.clientX-(s.left??0),y:i.clientY-(s.top??0)}}const a=e.retina.pixelRatio;n&&(n.x*=a,n.y*=a),s.mouse.position=n,s.status=r},this._touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:t=>this._mouseTouchMove(t),mouseUp:t=>this._mouseTouchClick(t),touchStart:t=>this._touchStart(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:t=>this._touchEnd(t),touchCancel:t=>this._touchEnd(t),touchEndClick:t=>this._touchEndClick(t),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}class ce{constructor(){this.value=""}static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(mt(e)||xt(e)?i.load({value:e}):i.load(e)),i}load(t){void 0!==t?.value&&(this.value=t.value)}}class he{constructor(){this.color=new ce,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class le{constructor(){this.color=new ce,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class de{constructor(){this.composite="destination-out",this.cover=new le,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=mt(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class ue{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class pe{constructor(){this.enable=!1,this.mode=[]}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class ge{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}load(t){t&&(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class fe{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class ye{constructor(){this.enable=!1,this.mode=[],this.parallax=new fe}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class we{constructor(){this.delay=.5,this.enable=!0}load(t){void 0!==t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ve{constructor(){this.onClick=new pe,this.onDiv=new ge,this.onHover=new ye,this.resize=new we}load(t){if(!t)return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=dt(e,(t=>{const e=new ge;return e.load(t),e}))),this.onHover.load(t.onHover),vt(t.resize)?this.resize.enable=t.resize:this.resize.load(t.resize)}}class me{constructor(t,e){this._engine=t,this._container=e}load(t){if(!t)return;if(!this._container)return;const e=this._engine.interactors.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class _e{constructor(t,e){this.detectsOn="window",this.events=new ve,this.modes=new me(t,e)}load(t){if(!t)return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class be{load(t){t&&(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??"percent"}),t.options&&(this.options=st({},t.options)))}}class Se{constructor(){this.maxWidth=1/0,this.options={},this.mode="canvas"}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&("screen"===t.mode?this.mode="screen":this.mode="canvas"),void 0!==t.options&&(this.options=st({},t.options)))}}class xe{constructor(){this.auto=!1,this.mode="any",this.value=!1}load(t){t&&(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Pe{constructor(){this.name="",this.default=new xe}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=st({},t.options)))}}class Ce{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=M(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.delay&&(this.delay=M(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Oe extends Ce{constructor(){super(),this.mode="auto",this.startValue="random"}load(t){super.load(t),t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Te extends Ce{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),t&&void 0!==t.offset&&(this.offset=M(t.offset))}}class Ae{constructor(){this.h=new Te,this.s=new Te,this.l=new Te}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Me extends ce{constructor(){super(),this.animation=new Ae}static create(t,e){const i=new Me;return i.load(t),void 0!==e&&(mt(e)||xt(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&(void 0!==e.enable?this.animation.h.load(e):this.animation.load(t.animation))}}class Ve{constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class Ge{constructor(){this.enable=!0,this.retries=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class Ee{constructor(){this.value=0}load(t){t&&void 0!==t.value&&(this.value=M(t.value))}}class Re extends Ee{constructor(){super(),this.animation=new Ce}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ke extends Re{constructor(){super(),this.animation=new Oe}load(t){super.load(t)}}class ze extends Ee{constructor(){super(),this.value=1}}class Ie{constructor(){this.horizontal=new ze,this.vertical=new ze}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Le{constructor(){this.absorb=new Ve,this.bounce=new Ie,this.enable=!1,this.maxSpeed=50,this.mode="bounce",this.overlap=new Ge}load(t){t&&(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.maxSpeed&&(this.maxSpeed=M(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class De{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=st(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class He{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=M(t.offset)),void 0!==t.value&&(this.value=M(t.value)))}}class Be{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(t&&(void 0!==t.distance&&(this.distance=M(t.distance)),void 0!==t.enable&&(this.enable=t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class Fe{constructor(){this.x=50,this.y=50,this.mode="percent",this.radius=0}load(t){t&&(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Ue{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=M(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=M(t.maxSpeed)))}}class Ne{constructor(){this.clamp=!0,this.delay=new Ee,this.enable=!1,this.options={}}load(t){t&&(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=st(this.options,t.options)))}}class qe{load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class $e{constructor(){this.enable=!1,this.length=10,this.fill=new qe}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.fill&&this.fill.load(t.fill),void 0!==t.length&&(this.length=t.length))}}class je{constructor(){this.default="out"}load(t){t&&(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class Qe{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=M(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=st({},t.position)))}}class We{constructor(){this.angle=new He,this.attract=new Be,this.center=new Fe,this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new Ue,this.path=new Ne,this.outModes=new je,this.random=!1,this.size=!1,this.speed=2,this.spin=new Qe,this.straight=!1,this.trail=new $e,this.vibrate=!1,this.warp=!1}load(t){if(!t)return;this.angle.load(_t(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=_t(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=M(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(St(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=M(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Ze extends Oe{constructor(){super(),this.destroy="none",this.speed=2}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Xe extends ke{constructor(){super(),this.animation=new Ze,this.value=1}load(t){if(!t)return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ye{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class Je{constructor(){this.mode="delete",this.value=0}load(t){t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ke{constructor(){this.density=new Ye,this.limit=new Je,this.value=0}load(t){t&&(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class ti{constructor(){this.blur=0,this.color=new ce,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=ce.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class ei{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=st(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class ii extends Oe{constructor(){super(),this.destroy="none",this.speed=5}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class si extends ke{constructor(){super(),this.animation=new ii,this.value=3}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class oi{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=Me.create(this.color,t.color)),void 0!==t.width&&(this.width=M(t.width)),void 0!==t.opacity&&(this.opacity=M(t.opacity)))}}class ni extends Ee{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),t&&(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class ai{constructor(t,e){this._engine=t,this._container=e,this.bounce=new Ie,this.collisions=new Le,this.color=new Me,this.color.value="#fff",this.effect=new De,this.groups={},this.move=new We,this.number=new Ke,this.opacity=new Xe,this.reduceDuplicates=!1,this.shadow=new ti,this.shape=new ei,this.size=new si,this.stroke=new oi,this.zIndex=new ni}load(t){if(!t)return;if(this.bounce.load(t.bounce),this.color.load(Me.create(this.color,t.color)),this.effect.load(t.effect),void 0!==t.groups)for(const e in t.groups){const i=t.groups[e];void 0!==i&&(this.groups[e]=st(this.groups[e]??{},i))}this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=st({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=dt(e,(t=>{const e=new oi;return e.load(t),e}))),this._container){const e=this._engine.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t);const i=this._engine.interactors.get(this._container);if(i)for(const e of i)e.loadParticlesOptions&&e.loadParticlesOptions(this,t)}}}function ri(t,...e){for(const i of e)t.load(i)}function ci(t,e,...i){const s=new ai(t,e);return ri(s,...i),s}class hi{constructor(t,e){this._findDefaultTheme=t=>this.themes.find((e=>e.default.value&&e.default.mode===t))??this.themes.find((t=>t.default.value&&"any"===t.default.mode)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new he,this.backgroundMask=new de,this.defaultThemes={},this.delay=0,this.fullScreen=new ue,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new _e(t,e),this.manualParticles=[],this.particles=ci(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(t){if(!t)return;void 0!==t.preset&&dt(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.delay&&(this.delay=M(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=M(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;vt(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new be;return e.load(t),e}))),this.particles.load(t.particles),this.style=st(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const o=this._engine.interactors.get(this._container);if(o)for(const e of o)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new Se;t.load(e),this.responsive.push(t)}if(this.responsive.sort(((t,e)=>t.maxWidth-e.maxWidth)),void 0!==t.themes)for(const e of t.themes){const t=this.themes.find((t=>t.name===e.name));if(t)t.load(e);else{const t=new Pe;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme("dark")?.name,this.defaultThemes.light=this._findDefaultTheme("light")?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>"screen"===i.mode&&screen?i.maxWidth>screen.availWidth:i.maxWidth*e>t));return this.load(s?.options),s?.maxWidth}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t=Q("(prefers-color-scheme: dark)"),e=t&&t.matches,i=this._findDefaultTheme(e?"dark":"light");i&&this.load(i.options)}}}class li{constructor(t,e){this.container=e,this._engine=t,this._interactors=t.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[]}async externalInteract(t){for(const e of this._externalInteractors)e.isEnabled()&&await e.interact(t)}handleClickMode(t){for(const e of this._externalInteractors)e.handleClickMode&&e.handleClickMode(t)}init(){this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case"external":this._externalInteractors.push(t);break;case"particles":this._particleInteractors.push(t)}t.init()}}async particlesInteract(t,e){for(const i of this._externalInteractors)i.clear(t,e);for(const i of this._particleInteractors)i.isEnabled(t)&&await i.interact(t,e)}async reset(t){for(const e of this._externalInteractors)e.isEnabled()&&e.reset(t);for(const e of this._particleInteractors)e.isEnabled(t)&&e.reset(t)}}function di(t){if(!X(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class ui{constructor(t,e,i,s,o,n){this.container=i,this._calcPosition=(t,e,i,s=0)=>{for(const[,s]of t.plugins){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return f.create(t.x,t.y,i)}const o=D({size:t.canvas.size,position:e}),n=f.create(o.x,o.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{di({outMode:e,checkModes:["bounce","bounce-horizontal"],coord:n.x,maxCoord:t.canvas.size.width,setCb:t=>n.x+=t,radius:a})},h=e=>{di({outMode:e,checkModes:["bounce","bounce-vertical"],coord:n.y,maxCoord:t.canvas.size.height,setCb:t=>n.y+=t,radius:a})};return c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(n,s)?this._calcPosition(t,void 0,i,s+1):n},this._calculateVelocity=()=>{const t=R(this.direction).copy(),e=this.options.move;if("inside"===e.direction||"outside"===e.direction)return t;const i=Math.PI/180*O(e.angle.value),s=Math.PI/180*O(e.angle.offset),o={left:s-.5*i,right:s+.5*i};return e.straight||(t.angle+=C(M(o.left,o.right))),e.random&&"number"==typeof e.speed&&(t.length*=S()),t},this._checkOverlap=(t,e=0)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const o=i.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&e>n)throw new Error(`${g} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>G(t,e.position)<s+e.getRadius()))},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?2:1,i=this.roll.horizontal?.5*Math.PI:0;return Math.floor(((this.roll.angle??0)+i)/(Math.PI/e))%2?this.backColor?this.backColor:this.roll.alter?se(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=O(this.options.zIndex.value);this.position=this._calcPosition(e,t,x(i,0,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...yt(this.options.move.center,s),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??"percent"},this.direction=E(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.offset=y.origin},this._engine=t,this.init(e,s,o,n)}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.container,i=this.pathGenerator;for(const[,i]of e.plugins)i.particleDestroyed&&i.particleDestroyed(this,t);for(const i of e.particles.updaters)i.particleDestroyed&&i.particleDestroyed(this,t);i&&i.reset(this)}draw(t){const e=this.container,i=e.canvas;for(const[,s]of e.plugins)i.drawParticlePlugin(s,this,t);i.drawParticle(this,t)}getFillColor(){return this._getRollColor(this.bubble.color??qt(this.color))}getMass(){return this.getRadius()**2*Math.PI*.5}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??qt(this.strokeColor))}init(t,e,i,s){const o=this.container,n=this._engine;this.id=t,this.group=s,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.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const a=o.retina.pixelRatio,r=o.actualOptions,c=ci(this._engine,o,r.particles),h=c.effect.type,l=c.shape.type,{reduceDuplicates:d}=c;this.effect=ut(h,this.id,d),this.shape=ut(l,this.id,d);const u=c.effect,p=c.shape;if(i){if(i.effect&&i.effect.type){const t=ut(i.effect.type,this.id,d);t&&(this.effect=t,u.load(i.effect))}if(i.shape&&i.shape.type){const t=ut(i.shape.type,this.id,d);t&&(this.shape=t,p.load(i.shape))}}this.effectData=function(t,e,i,s){const o=e.options[t];if(o)return st({close:e.close,fill:e.fill},ut(o,i,s))}(this.effect,u,this.id,d),this.shapeData=function(t,e,i,s){const o=e.options[t];if(o)return st({close:e.close,fill:e.fill},ut(o,i,s))}(this.shape,p,this.id,d),c.load(i);const g=this.effectData;g&&c.load(g.particles);const f=this.shapeData;f&&c.load(f.particles);const y=new _e(n,o);y.load(o.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=g?.fill??c.effect.fill,this.effectClose=g?.close??c.effect.close,this.shapeFill=f?.fill??c.shape.fill,this.shapeClose=f?.close??c.shape.close,this.options=c;const w=this.options.move.path;this.pathDelay=1e3*O(w.delay.value),w.generator&&(this.pathGenerator=this._engine.getPathGenerator(w.generator),this.pathGenerator&&o.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(o)),o.retina.initParticle(this),this.size=gt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-O(this.options.move.decay);const v=o.particles;v.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24;let m=o.effectDrawers.get(this.effect);m||(m=this._engine.getEffectDrawer(this.effect),m&&o.effectDrawers.set(this.effect,m)),m&&m.loadEffect&&m.loadEffect(this);let _=o.shapeDrawers.get(this.shape);_||(_=this._engine.getShapeDrawer(this.shape),_&&o.shapeDrawers.set(this.shape,_)),_&&_.loadShape&&_.loadShape(this);const b=_?.getSidesCount;b&&(this.sides=b(this)),this.spawning=!1,this.shadowColor=Mt(this.options.shadow.color);for(const t of v.updaters)t.init(this);for(const t of v.movers)t.init&&t.init(this);m&&m.particleInit&&m.particleInit(o,this),_&&_.particleInit&&_.particleInit(o,this);for(const[,t]of o.plugins)t.particleCreated&&t.particleCreated(this)}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset&&t.reset(this)}}class pi{constructor(t,e){this.position=t,this.particle=e}}class gi{constructor(t,e){this.position={x:t,y:e}}}class fi extends gi{constructor(t,e,i,s){super(t,e),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){t instanceof yi&&t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,o=t.position,n=t instanceof fi?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+e&&o.x+a>s.x&&o.y<s.y+i&&o.y+r>s.y}}class yi extends gi{constructor(t,e,i){super(t,e),this.radius=i}contains(t){return G(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y),n=this.radius;if(t instanceof yi){return n+t.radius>Math.sqrt(s**2+o**2)}if(t instanceof fi){const{width:e,height:i}=t.size;return Math.pow(s-e,2)+Math.pow(o-i,2)<=n**2||s<=n+e&&o<=n+i||s<=e||o<=i}return!1}}class wi{constructor(t,e){this.rectangle=t,this.capacity=e,this._subdivide=()=>{const{x:t,y:e}=this.rectangle.position,{width:i,height:s}=this.rectangle.size,{capacity:o}=this;for(let n=0;n<4;n++)this._subs.push(new wi(new fi(t+.5*i*(n%2),e+.5*s*(Math.round(.5*n)-n%2),.5*i,.5*s),o));this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((e=>e.insert(t)))))}query(t,e,i){const s=i||[];if(!t.intersects(this.rectangle))return[];for(const i of this._points)!t.contains(i.position)&&G(t.position,i.position)>i.particle.getRadius()&&(!e||e(i.particle))||s.push(i.particle);if(this._divided)for(const i of this._subs)i.query(t,e,s);return s}queryCircle(t,e,i){return this.query(new yi(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new fi(t.x,t.y,e.width,e.height),i)}}const vi=t=>{const{height:e,width:i}=t;return new fi(-.25*i,-.25*e,1.5*i,1.5*e)};class mi{constructor(t,e){this._applyDensity=(t,e,i)=>{const s=t.number;if(!t.number.density?.enable)return void(void 0===i?this._limit=s.limit.value:this._groupLimits.set(i,s.limit.value));const o=this._initDensityFactor(s.density),n=s.value,a=s.limit.value>0?s.limit.value:n,r=Math.min(n,a)*o+e,c=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=s.limit.value*o:this._groupLimits.set(i,s.limit.value*o),c<r?this.push(Math.abs(r-c),void 0,t,i):c>r&&this.removeQuantity(c-r,i)},this._initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)},this._pushParticle=(t,e,i,s)=>{try{let o=this._pool.pop();o?o.init(this._nextId,t,e,i):o=new ui(this._engine,this._nextId,this._container,t,e,i);let n=!0;if(s&&(n=s(o)),!n)return;return this._array.push(o),this._zArray.push(o),this._nextId++,this._engine.dispatchEvent("particleAdded",{container:this._container,data:{particle:o}}),o}catch(t){return void N().warning(`${g} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;s.destroy(i);const o=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(o,1),this._pool.push(s),this._engine.dispatchEvent("particleRemoved",{container:this._container,data:{particle:s}}),!0},this._engine=t,this._container=e,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 li(t,e);const i=e.canvas.size;this.quadTree=new wi(vi(i),4),this.movers=this._engine.getMovers(e,!0),this.updaters=this._engine.getUpdaters(e,!0)}get count(){return this._array.length}addManualParticles(){const t=this._container,e=t.actualOptions;for(const i of e.manualParticles)this.addParticle(i.position?yt(i.position,t.canvas.size):void 0,i.options)}addParticle(t,e,i,s){const o=this._container.actualOptions.particles.number.limit,n=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(n>0)if("delete"===o.mode){const t=a+1-n;t>0&&this.removeQuantity(t)}else if("wait"===o.mode&&a>=n)return;return this._pushParticle(t,e,i,s)}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}async draw(t){const e=this._container,i=e.canvas;i.clear(),await this.update(t);for(const[,s]of e.plugins)i.drawPlugin(s,t);for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}init(){const t=this._container,e=t.actualOptions;this._lastZIndex=0,this._needsSort=!1;let i=!1;this.updaters=this._engine.getUpdaters(t,!0),this._interactionManager.init();for(const[,e]of t.plugins)if(void 0!==e.particlesInitialization&&(i=e.particlesInitialization()),i)break;this._interactionManager.init();for(const[,e]of t.pathGenerators)e.init(t);if(this.addManualParticles(),!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];for(let i=this.count,o=0;o<s.number?.value&&i<t.number.value;i++,o++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let o=0;o<t;o++)this.addParticle(e?.position,i,s)}async redraw(){this.clear(),this.init(),await this.draw({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<e&&n<this.count;n++)this._removeParticle(n--,i,s)&&o++}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;for(const t in e)this._applyDensity(e[t],0,t);this._applyDensity(t.particles,t.manualParticles.length)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}async update(t){const e=this._container,i=new Set;this.quadTree=new wi(vi(e.canvas.size),4);for(const[,t]of e.pathGenerators)t.update();for(const[,i]of e.plugins)i.update&&await i.update(t);const s=this._resizeFactor;for(const e of this._array){s&&!e.ignoresResizeRatio&&(e.position.x*=s.width,e.position.y*=s.height,e.initialPosition.x*=s.width,e.initialPosition.y*=s.height),e.ignoresResizeRatio=!1,await this._interactionManager.reset(e);for(const[,i]of this._container.plugins){if(e.destroyed)break;i.particleUpdate&&i.particleUpdate(e,t)}for(const i of this.movers)i.isEnabled(e)&&i.move(e,t);e.destroyed?i.add(e):this.quadTree.insert(new pi(e.getPosition(),e))}if(i.size){const t=t=>!i.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t),this._pool.push(...i)}await this._interactionManager.externalInteract(t);for(const e of this._array){for(const i of this.updaters)i.update(e,t);e.destroyed||e.spawning||await this._interactionManager.particlesInteract(e,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this._lastZIndex=t[t.length-1].position.z,this._needsSort=!1}}}class _i{constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||$()?1:window.devicePixelRatio,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}const o=e.particles,n=o.move;this.maxSpeed=O(n.gravity.maxSpeed)*i,this.sizeAnimationSpeed=O(o.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,o=s.distance,n=t.retina;n.moveDrift=O(s.drift)*i,n.moveSpeed=O(s.speed)*i,n.sizeAnimationSpeed=O(e.size.animation.speed)*i;const a=n.maxDistance;a.horizontal=void 0!==o.horizontal?o.horizontal*i:void 0,a.vertical=void 0!==o.vertical?o.vertical*i:void 0,n.maxSpeed=O(s.gravity.maxSpeed)*i}}function bi(t){return t&&!t.destroyed}function Si(t,e,...i){const s=new hi(t,e);return ri(s,...i),s}class xi{constructor(t,e,i){this._intersectionManager=t=>{if(bi(this)&&this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play:this.pause)()},this._nextFrame=async t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+1e3/this.fpsLimit)return void this.draw(!1);this._lastFrameTime??=t;const e=function(t,e=60,i=!1){return{value:t,factor:i?60/e:60*t/1e3}}(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(e.value),this._lastFrameTime=t,e.value>1e3)return void this.draw(!1);if(await this.particles.draw(e),!this.alive())return void this.destroy();this.getAnimationStatus()&&this.draw(!1)}catch(t){N().error(`${g} in animation loop`,t)}},this._engine=t,this.id=Symbol(e),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._sourceOptions=i,this._initialSourceOptions=i,this.retina=new _i(this),this.canvas=new ne(this),this.particles=new mi(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=Si(this._engine,this),this.actualOptions=Si(this._engine,this),this._eventListeners=new re(this),this._intersectionObserver=W((t=>this._intersectionManager(t))),this._engine.dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!bi(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!bi(this))return;const o=this.retina.pixelRatio,n={x:i.x*o,y:i.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(e,a)};let s=!1,o=!1;e.addEventListener("click",(t=>{if(!bi(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,1)})),e.addEventListener("touchstart",(()=>{bi(this)&&(s=!0,o=!1)})),e.addEventListener("touchmove",(()=>{bi(this)&&(o=!0)})),e.addEventListener("touchend",(t=>{if(bi(this)){if(s&&!o){const e=t;let s=e.touches[e.touches.length-1];if(!s&&(s=e.changedTouches[e.changedTouches.length-1],!s))return;const o=this.canvas.element,n=o?o.getBoundingClientRect():void 0,a={x:s.clientX-(n?n.left:0),y:s.clientY-(n?n.top:0)};i(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,o=!1}})),e.addEventListener("touchcancel",(()=>{bi(this)&&(s=!1,o=!1)}))}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!bi(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(){if(!bi(this))return;this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy&&t.destroy(this);for(const[,t]of this.shapeDrawers)t.destroy&&t.destroy(this);for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);this._engine.clearPlugins(this),this.destroyed=!0;const t=this._engine.dom(),e=t.findIndex((t=>t===this));e>=0&&t.splice(e,1),this._engine.dispatchEvent("containerDestroyed",{container:this})}draw(t){if(!bi(this))return;let e=t;this._drawAnimationFrame=requestAnimationFrame((async t=>{e&&(this._lastFrameTime=void 0,e=!1),await this._nextFrame(t)}))}async export(t,e={}){for(const[,i]of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}N().error(`${g} - Export plugin with type ${t} not found`)}getAnimationStatus(){return!this._paused&&!this.pageHidden&&bi(this)}handleClickMode(t){if(bi(this)){this.particles.handleClickMode(t);for(const[,e]of this.plugins)e.handleClickMode&&e.handleClickMode(t)}}async init(){if(!bi(this))return;const t=this._engine.getSupportedEffects();for(const e of t){const t=this._engine.getEffectDrawer(e);t&&this.effectDrawers.set(e,t)}const e=this._engine.getSupportedShapes();for(const t of e){const e=this._engine.getShapeDrawer(t);e&&this.shapeDrawers.set(t,e)}this._options=Si(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=Si(this._engine,this,this._options);const i=this._engine.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize(),this.zLayers=this.actualOptions.zLayers,this._duration=1e3*O(this.actualOptions.duration),this._delay=1e3*O(this.actualOptions.delay),this._lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120,this._smooth=this.actualOptions.smooth;for(const[,t]of this.effectDrawers)t.init&&await t.init(this);for(const[,t]of this.shapeDrawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init&&await t.init();this._engine.dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)t.particlesSetup&&t.particlesSetup();this._engine.dispatchEvent("particlesSetup",{container:this})}async loadTheme(t){bi(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(bi(this)&&(void 0!==this._drawAnimationFrame&&(cancelAnimationFrame(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent("containerPaused",{container:this})}}play(t){if(!bi(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const[,t]of this.plugins)t.play&&t.play();this._engine.dispatchEvent("containerPlay",{container:this}),this.draw(e||!1)}else this._firstStart=!1}async refresh(){if(bi(this))return this.stop(),this.start()}async reset(){if(bi(this))return this._initialSourceOptions=void 0,this._options=Si(this._engine,this),this.actualOptions=Si(this._engine,this,this._options),this.refresh()}async start(){bi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{this._delayTimeout=setTimeout((async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)t.start&&await t.start();this._engine.dispatchEvent("containerStarted",{container:this}),this.play(),t()}),this._delay)})))}stop(){if(bi(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(const[,t]of this.plugins)t.stop&&t.stop();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent("containerStopped",{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}class Pi{constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i&&i.forEach((t=>t(e)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,o=i.indexOf(e);o<0||(1===s?this._listeners.delete(t):i.splice(o,1))}}function Ci(t,e,i,s=!1){let o=e.get(t);return o&&!s||(o=[...i.values()].map((e=>e(t))),e.set(t,o)),o}class Oi{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new Pi,this._initialized=!1,this.plugins=[],this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}get version(){return"3.0.0-beta.4"}addConfig(t){const e=t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent("configAdded",{data:{name:e,config:t}})}async addEffect(t,e,i=!0){dt(t,(t=>{!this.getEffectDrawer(t)&&this.effectDrawers.set(t,e)})),await this.refresh(i)}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}async addInteractor(t,e,i=!0){this._initializers.interactors.set(t,e),await this.refresh(i)}async addMover(t,e,i=!0){this._initializers.movers.set(t,e),await this.refresh(i)}async addParticleUpdater(t,e,i=!0){this._initializers.updaters.set(t,e),await this.refresh(i)}async addPathGenerator(t,e,i=!0){!this.getPathGenerator(t)&&this.pathGenerators.set(t,e),await this.refresh(i)}async addPlugin(t,e=!0){!this.getPlugin(t.id)&&this.plugins.push(t),await this.refresh(e)}async addPreset(t,e,i=!1,s=!0){(i||!this.getPreset(t))&&this.presets.set(t,e),await this.refresh(s)}async addShape(t,e,i=!0){dt(t,(t=>{!this.getShapeDrawer(t)&&this.shapeDrawers.set(t,e)})),await this.refresh(i)}clearPlugins(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}dom(){return this._domArray}domItem(t){const e=this.dom(),i=e[t];if(i&&!i.destroyed)return i;e.splice(t,1)}getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,i.getPlugin(t));return e}getEffectDrawer(t){return this.effectDrawers.get(t)}getInteractors(t,e=!1){return Ci(t,this.interactors,this._initializers.interactors,e)}getMovers(t,e=!1){return Ci(t,this.movers,this._initializers.movers,e)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((e=>e.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.shapeDrawers.get(t)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}getUpdaters(t,e=!1){return Ci(t,this.updaters,this._initializers.updaters,e)}init(){this._initialized||(this._initialized=!0)}async load(t){const e=t.id??`tsparticles${Math.floor(1e4*S())}`,{index:s,url:o}=t,n=o?await async function(t){const e=ut(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?i.json():(N().error(`${g} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:s}):t.options;let a=t.element??document.getElementById(e);a||(a=document.createElement("div"),a.id=e,document.body.append(a));const r=ut(n,s),c=this.dom(),h=c.findIndex((t=>t.id.description===e));if(h>=0){const t=this.domItem(h);t&&!t.destroyed&&(t.destroy(),c.splice(h,1))}let l;if("canvas"===a.tagName.toLowerCase())l=a,l.dataset[i]="false";else{const t=a.getElementsByTagName("canvas");t.length?(l=t[0],l.dataset[i]="false"):(l=document.createElement("canvas"),l.dataset[i]="true",a.appendChild(l))}l.style.width||(l.style.width="100%"),l.style.height||(l.style.height="100%");const d=new xi(this,e,r);return h>=0?c.splice(h,0,d):c.push(d),d.canvas.loadCanvas(l),await d.start(),d}loadOptions(t,e){for(const i of this.plugins)i.loadOptions(t,e)}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,...i)}async refresh(t=!0){t&&this.dom().forEach((t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}setOnClickHandler(t){const e=this.dom();if(!e.length)throw new Error(`${g} can only set click handlers after calling tsParticles.load()`);for(const i of e)i.addClickHandler(t)}}class Ti{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return It(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return It({h:O(e.h),l:O(e.l),s:O(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?Lt({a:e.length>4?B(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}}class Ai{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return{r:O(e.r),g:O(e.g),b:O(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?B(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}}class Mi{constructor(t){this.container=t,this.type="external"}}class Vi{constructor(t){this.container=t,this.type="particles"}}const Gi=function(){const t=new Ai,e=new Ti;Tt(t),Tt(e);const i=new Oi;return i.init(),i}();$()||(window.tsParticles=Gi);class Ei{draw(t){const{context:e,particle:i,radius:s}=t,o=2*s,n=o*(i.heightFactor??.5),a=o*(i.headWidthFactor??.2),r=n*(i.bodyHeightFactor??.5);e.moveTo(-o/2,0),e.lineTo(-o/2,-r/2),e.lineTo(o/2-a,-r/2),e.lineTo(o/2-a,-n/2),e.lineTo(o/2+a,0),e.lineTo(o/2-a,n/2),e.lineTo(o/2-a,r/2),e.lineTo(-o/2,r/2),e.lineTo(-o/2,0)}particleInit(t,e){const i=e.shapeData;e.heightFactor=O(i?.heightFactor??.5),e.headWidthFactor=O(i?.headWidthFactor??.2),e.bodyHeightFactor=O(i?.bodyHeightFactor??.5)}}class Ri{draw(t){const{context:e,radius:i}=t;e.beginPath(),e.arc(i/3,-i/3,i/3,0,2*Math.PI,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}class ki{constructor(){this.color=!0,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class zi{constructor(){this.filter=t=>t.a>0,this.offset=4}load(t){if(t){if(void 0!==t.filter)if(mt(t.filter)){if(Object.hasOwn(window,t.filter)){const e=window[t.filter];bt(e)&&(this.filter=e)}}else this.filter=t.filter;void 0!==t.offset&&(this.offset=t.offset)}}}class Ii{constructor(){this.src=""}load(t){t&&void 0!==t.src&&(this.src=t.src)}}class Li{constructor(){this.family="sans-serif",this.size=100}load(t){t&&(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Di{constructor(){this.separator="\n",this.spacing=10}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Hi{constructor(){this.color="#000000",this.font=new Li,this.lines=new Di,this.text=""}load(t){t&&(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class Bi{constructor(){this.enable=!1,this.override=new ki,this.pixels=new zi,this.position={x:50,y:50},this.scale=1}load(t){t&&(void 0!==t.element&&t.element instanceof HTMLCanvasElement&&(this.element=t.element),void 0!==t.enable&&(this.enable=t.enable),t.image&&(this.image||(this.image=new Ii),this.image.load(t.image)),this.pixels.load(t.pixels),t.position&&(this.position={x:t.position.x??this.position.x,y:t.position.y??this.position.y}),this.override.load(t.override),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),t.text&&(this.text||(this.text=new Hi),this.text.load(t.text)))}}function Fi(t,e,i,s,o,n){const{height:a,width:r}=e,c=a*r,h=function(t){for(let e=t.length-1;e>=0;e--){const i=Math.floor(S()*e);[t[e],t[i]]=[t[i],t[e]]}return t}(Ni(c)),l=Math.min(c,t.actualOptions.particles.number.value),d=t.canvas.size;let u=0;const p=d.width*i.x/100-r*s/2,g=d.height*i.y/100-a*s/2;for(;u<l&&h.length;){const i=h.pop()||0,a={x:i%r,y:Math.floor(i/r)},c=e.pixels[a.y][a.x];if(!n(c))continue;const l={x:a.x*s+p,y:a.y*s+g},d={};o.color&&(d.color={value:c}),o.opacity&&(d.opacity={value:c.a}),t.particles.addParticle(l,d),u++}}function Ui(t,e,i,s=!0){const o=t.getImageData(0,0,e.width,e.height).data;s&&t.clearRect(0,0,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]),n[a.y][a.x]={r:o[t],g:o[t+1],b:o[t+2],a:o[t+3]/255}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}const Ni=t=>[...Array(t).keys()];class qi{constructor(t,e){this._container=t,this._engine=e}async init(){const t=this._container,e=t.actualOptions.canvasMask;if(!e?.enable)return;let i={pixels:[],height:0,width:0};const s=e.pixels.offset;if(e.image){const t=e.image.src;if(!t)return;i=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${g} Could not get canvas context`));n.drawImage(i,0,0,i.width,i.height,0,0,o.width,o.height),t(Ui(n,o,e))}}));return i.src=t,s}(t,s)}else if(e.text){const t=function(t,e){const i=document.createElement("canvas"),s=i.getContext("2d"),{font:o,text:n,lines:a,color:r}=t;if(!n||!s)return;const c=n.split(a.separator),h=_t(o.size)?`${o.size}px`:o.size,l=[];let d=0,u=0;for(const t of c){s.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${h} ${o.family}`;const e=s.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};d=Math.max(d||0,i.width),u+=i.height+a.spacing,l.push(i)}i.width=d,i.height=u;let p=0;for(const t of l)s.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${h} ${o.family}`,s.fillStyle=r,s.fillText(t.text,0,p+t.measure.actualBoundingBoxAscent),p+=t.height+a.spacing;return Ui(s,i,e)}(e.text,s);if(!t)return;i=t}else if(e.element||e.selector){const t=e.element||e.selector&&document.querySelector(e.selector);if(!t)return;const o=t.getContext("2d");if(!o)return;i=Ui(o,t,s)}Fi(t,i,e.position,e.scale,e.override,e.pixels.filter)}}class $i{constructor(t){this.id="canvasMask",this._engine=t}getPlugin(t){return new qi(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.canvasMask;void 0===i?.load&&(t.canvasMask=i=new Bi),i.load(e?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}function ji(t,e){if(!e.segments.length||!e.segments[0].values.length)return;const{context:i,radius:s}=t;i.moveTo(e.segments[0].values[0].x*s,e.segments[0].values[0].y*s);for(let t=0;t<e.segments.length;t++){const o=e.segments[t];i.bezierCurveTo(o.values[1].x*s,o.values[1].y*s,o.values[2].x*s,o.values[2].y*s,o.values[3].x*s,o.values[3].y*s)}for(let t=e.segments.length-1;t>=0;t--){const o=e.segments[t];i.bezierCurveTo(-o.values[2].x*s,o.values[2].y*s,-o.values[1].x*s,o.values[1].y*s,-o.values[0].x*s,o.values[0].y*s)}}const Qi=.5,Wi={heart:{segments:[{values:[{x:0,y:Qi},{x:0,y:Qi},{x:Qi,y:0},{x:Qi,y:-Qi/2}]},{values:[{x:Qi,y:-Qi/2},{x:Qi,y:-Qi/2},{x:Qi,y:-Qi},{x:Qi/2,y:-Qi}]},{values:[{x:Qi/2,y:-Qi},{x:Qi/2,y:-Qi},{x:0,y:-Qi},{x:0,y:-Qi/2}]}]},diamond:{segments:[{values:[{x:0,y:Qi},{x:0,y:Qi},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-Qi},{x:0,y:-Qi}]}]},club:{segments:[{values:[{x:0,y:-Qi},{x:0,y:-Qi},{x:Qi/2,y:-Qi},{x:Qi/2,y:-Qi/2}]},{values:[{x:Qi/2,y:-Qi/2},{x:Qi/2,y:-Qi/2},{x:Qi,y:-Qi/2},{x:Qi,y:0}]},{values:[{x:Qi,y:0},{x:Qi,y:0},{x:Qi,y:Qi/2},{x:Qi/2,y:Qi/2}]},{values:[{x:Qi/2,y:Qi/2},{x:Qi/2,y:Qi/2},{x:Qi/8,y:Qi/2},{x:Qi/8,y:Qi/8}]},{values:[{x:Qi/8,y:Qi/8},{x:Qi/8,y:Qi/2},{x:Qi/2,y:Qi},{x:Qi/2,y:Qi}]},{values:[{x:Qi/2,y:Qi},{x:Qi/2,y:Qi},{x:0,y:Qi},{x:0,y:Qi}]}]},spade:{segments:[{values:[{x:0,y:-Qi},{x:0,y:-Qi},{x:Qi,y:-Qi/2},{x:Qi,y:0}]},{values:[{x:Qi,y:0},{x:Qi,y:0},{x:Qi,y:Qi/2},{x:Qi/2,y:Qi/2}]},{values:[{x:Qi/2,y:Qi/2},{x:Qi/2,y:Qi/2},{x:Qi/8,y:Qi/2},{x:Qi/8,y:Qi/8}]},{values:[{x:Qi/8,y:Qi/8},{x:Qi/8,y:Qi/2},{x:Qi/2,y:Qi},{x:Qi/2,y:Qi}]},{values:[{x:Qi/2,y:Qi},{x:Qi/2,y:Qi},{x:0,y:Qi},{x:0,y:Qi}]}]}};class Zi{draw(t){ji(t,Wi.spade)}}class Xi{draw(t){ji(t,Wi.heart)}}class Yi{draw(t){ji(t,Wi.diamond)}}class Ji{draw(t){ji(t,Wi.club)}}class Ki{afterDraw(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const o=2*Math.PI,n=s*i.cogHoleRadius/100;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(n,0),e.arc(0,0,n,0,o),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}draw(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const o=2*Math.PI,n=o/(2*i.cogNotches),a=n*i.cogInnerTaper*.005,r=n*i.cogOuterTaper*.005,c=s*i.cogInnerRadius/100;let h=n,l=!1;for(e.moveTo(s*Math.cos(r),s*Math.sin(r));h<=o;h+=n)l?(e.lineTo(c*Math.cos(h-a),c*Math.sin(h-a)),e.lineTo(s*Math.cos(h+r),s*Math.sin(h+r))):(e.lineTo(s*Math.cos(h-r),s*Math.sin(h-r)),e.lineTo(c*Math.cos(h+a),c*Math.sin(h+a))),l=!l}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=O(i?.holeRadius??44),e.cogInnerRadius=O(i?.innerRadius??72),e.cogInnerTaper=O(i?.innerTaper??35),e.cogNotches=O(i?.notches??7),e.cogOuterTaper=O(i?.outerTaper??50)}}function ts(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class es{constructor(){this._NORM_2D=1/47,this._SQUISH_2D=(Math.sqrt(3)-1)/2,this._STRETCH_2D=(1/Math.sqrt(3)-1)/2,this._base2D=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this._gradients2D=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this._lookup=[],this._lookupPairs2D=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this._p2D=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256)}noise(t,e){const{_gradients2D:i,_NORM_2D:s,_SQUISH_2D:o,_STRETCH_2D:n,_lookup:a,_perm:r,_perm2D:c}=this,h=(t+e)*n,l=t+h,d=e+h,u=Math.floor(l),p=Math.floor(d),g=(u+p)*o,f=t-(u+g),y=e-(p+g),w=l-u,v=d-p,m=w+v;let _=0;for(let t=a[w-v+1|m<<1|m+v<<2|m+w<<4];void 0!==t;t=t.next){const e=f+t.dx,s=y+t.dy,o=2-e*e-s*s;if(o>0){const n=u+t.xsb,a=p+t.ysb,h=c[r[255&n]+a&255];_+=o*o*o*o*(i[h]*e+i[h+1]*s)}}return _*s}seed(t){const{_p2D:e,_base2D:i,_lookupPairs2D:s}=this,o=[];for(let t=0;t<e.length;t+=4){const s=i[e[t]];let n=null,a=null;for(let e=0;e<s.length;e+=3)a=this._contribution2D(s[e],s[e+1],s[e+2]),null===n?o[t/4]=a:n.next=a,n=a;a&&(a.next=this._contribution2D(e[t+1],e[t+2],e[t+3]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=ts(ts(ts(a)));for(let t=255;t>=0;t--){a=ts(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm2D[t]=14&this._perm[t],n[e[0]]=n[t]}}_contribution2D(t,e,i){const{_SQUISH_2D:s}=this;return{dx:-e-t*s,dy:-i-t*s,xsb:e,ysb:i}}}class is{constructor(){this._NORM_3D=1/103,this._SQUISH_3D=(Math.sqrt(4)-1)/3,this._STRETCH_3D=(1/Math.sqrt(4)-1)/3,this._base3D=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this._gradients3D=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this._lookup=[],this._lookupPairs3D=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this._p3D=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256)}noise(t,e,i){const{_STRETCH_3D:s,_NORM_3D:o,_SQUISH_3D:n,_lookup:a,_perm:r,_perm3D:c,_gradients3D:h}=this,l=(t+e+i)*s,d=t+l,u=e+l,p=i+l,g=Math.floor(d),f=Math.floor(u),y=Math.floor(p),w=(g+f+y)*n,v=t-(g+w),m=e-(f+w),_=i-(y+w),b=d-g,S=u-f,x=p-y,P=b+S+x;let C=0;for(let t=a[S-x+1|b-S+1<<1|b-x+1<<2|P<<3|P+x<<5|P+S<<7|P+b<<9];void 0!==t;t=t.next){const e=v+t.dx,i=m+t.dy,s=_+t.dz,o=2-e*e-i*i-s*s;if(o>0){const n=g+t.xsb,a=f+t.ysb,l=y+t.zsb,d=c[r[r[255&n]+a&255]+l&255];C+=o*o*o*o*(h[d]*e+h[d+1]*i+h[d+2]*s)}}return C*o}seed(t){const{_base3D:e,_lookupPairs3D:i,_p3D:s}=this,o=[];for(let t=0;t<s.length;t+=9){const i=e[s[t]];let n=null,a=null;for(let e=0;e<i.length;e+=4)a=this._contribution3D(i[e],i[e+1],i[e+2],i[e+3]),null===n?o[t/9]=a:n.next=a,n=a;a&&(a.next=this._contribution3D(s[t+1],s[t+2],s[t+3],s[t+4]),a.next.next=this._contribution3D(s[t+5],s[t+6],s[t+7],s[t+8]))}this._lookup=[];for(let t=0;t<i.length;t+=2)this._lookup[i[t]]=o[i[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=ts(ts(ts(a)));for(let t=255;t>=0;t--){a=ts(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm3D[t]=this._perm[t]%24*3,n[e[0]]=n[t]}}_contribution3D(t,e,i,s){const{_SQUISH_3D:o}=this;return{dx:-e-t*o,dy:-i-t*o,dz:-s-t*o,xsb:e,ysb:i,zsb:s}}}class ss{constructor(){this._NORM_4D=1/30,this._SQUISH_4D=.25*(Math.sqrt(5)-1),this._STRETCH_4D=.25*(1/Math.sqrt(5)-1),this._lookup=[],this._perm=new Uint8Array(0),this._perm4D=new Uint8Array(0),this._base4D=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1]],this._gradients4D=[3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,-3,1,1,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],this._lookupPairs4D=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],this._p4D=[0,0,1,-1,0,0,0,1,0,-1,0,0,1,0,0,-1,0,0,-1,1,0,0,0,0,1,-1,0,0,0,1,0,-1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,-1,0,0,-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,2,1,1,0,0,1,1,1,-1,0,1,1,1,0,-1,0,2,1,0,1,0,1,1,-1,1,0,1,1,0,1,-1,0,2,0,1,1,0,1,-1,1,1,0,1,0,1,1,-1,0,2,1,0,0,1,1,1,-1,0,1,1,1,0,-1,1,0,2,0,1,0,1,1,-1,1,0,1,1,0,1,-1,1,0,2,0,0,1,1,1,-1,0,1,1,1,0,-1,1,1,1,4,2,1,1,0,4,1,2,1,0,4,1,1,2,0,1,4,2,1,0,1,4,1,2,0,1,4,1,1,0,2,1,4,2,0,1,1,4,1,0,2,1,4,1,0,1,2,1,4,0,2,1,1,4,0,1,2,1,4,0,1,1,2,1,2,1,1,0,0,3,2,1,0,0,3,1,2,0,0,1,2,1,0,1,0,3,2,0,1,0,3,1,0,2,0,1,2,0,1,1,0,3,0,2,1,0,3,0,1,2,0,1,2,1,0,0,1,3,2,0,0,1,3,1,0,0,2,1,2,0,1,0,1,3,0,2,0,1,3,0,1,0,2,1,2,0,0,1,1,3,0,0,2,1,3,0,0,1,2,2,3,1,1,1,0,2,1,1,1,-1,2,2,0,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,2,0,0,0,2,3,1,0,1,1,2,1,-1,1,1,2,2,0,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,2,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,2,0,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,2,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,0,2,0,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,2,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,2,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,0,0,2,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,0,2,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,0,2,2,1,1,1,-1,0,1,1,1,0,-1,0,0,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,0,0,0,0,0,2,1,-1,1,1,0,1,0,1,1,-1,0,0,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,0,0,0,0,0,2,1,-1,1,0,1,1,0,1,-1,1,0,0,0,0,0,2,1,-1,0,1,1,1,0,-1,1,1,0,0,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,2,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,2,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,2,2,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,0,2,0,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,2,0,0,2,1,-1,1,0,1,1,0,1,-1,1,2,0,2,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,0,0,2,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,0,2,0,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,2,0,2,1,1,-1,0,1,1,1,0,-1,1,2,0,0,0,2,2,1,-1,1,0,1,1,0,1,-1,1,2,0,0,0,2,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,0,2,3,1,1,0,0,0,2,2,0,0,0,2,1,1,1,-1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,1,-1,3,1,0,0,1,0,2,0,0,2,0,2,1,1,1,-1,3,1,1,0,0,0,2,2,0,0,0,2,1,1,-1,1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,-1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,1,-1,1,3,1,1,0,0,0,2,2,0,0,0,2,1,-1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,1,-1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,-1,1,1,3,1,0,1,0,0,2,0,2,0,0,2,-1,1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,-1,1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,-1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,4,1,1,1,1,3,3,2,0,1,0,3,1,0,2,0,4,1,1,1,1,3,3,0,2,1,0,3,0,1,2,0,4,1,1,1,1,3,3,2,0,0,1,3,1,0,0,2,4,1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,4,1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,4,1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,1,-1,3,3,2,0,1,0,3,1,0,2,0,2,1,1,1,-1,3,3,0,2,1,0,3,0,1,2,0,2,1,1,1,-1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,-1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,1,-1,1,3,3,0,2,0,1,3,0,1,0,2,2,1,1,-1,1,3,3,2,0,1,0,3,1,0,2,0,2,1,-1,1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,-1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,1,-1,1,1,3,3,0,2,1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]}noise(t,e,i,s){const{_perm:o,_perm4D:n,_lookup:a,_STRETCH_4D:r,_SQUISH_4D:c,_gradients4D:h,_NORM_4D:l}=this,d=(t+e+i+s)*r,u=t+d,p=e+d,g=i+d,f=s+d,y=Math.floor(u),w=Math.floor(p),v=Math.floor(g),m=Math.floor(f),_=(y+w+v+m)*c,b=t-(y+_),S=e-(w+_),x=i-(v+_),P=s-(m+_),C=u-y,O=p-w,T=g-v,A=f-m,M=C+O+T+A;let V=0;for(let t=a[T-A+1|O-T+1<<1|O-A+1<<2|C-O+1<<3|C-T+1<<4|C-A+1<<5|M<<6|M+A<<8|M+T<<11|M+O<<14|M+C<<17];void 0!==t;t=t.next){const e=b+t.dx,i=S+t.dy,s=x+t.dz,a=P+t.dw,r=2-e*e-i*i-s*s-a*a;if(r>0){const c=y+t.xsb,l=w+t.ysb,d=v+t.zsb,u=m+t.wsb,p=n[o[o[o[255&c]+l&255]+d&255]+u&255];V+=r*r*r*r*(h[p]*e+h[p+1]*i+h[p+2]*s+h[p+3]*a)}}return V*l}seed(t){const{_p4D:e,_base4D:i,_lookupPairs4D:s}=this,o=[];for(let t=0;t<e.length;t+=16){const s=i[e[t]];let n=null,a=null;for(let e=0;e<s.length;e+=5)a=this._contribution4D(s[e],s[e+1],s[e+2],s[e+3],s[e+4]),null===n?o[t/16]=a:n.next=a,n=a;a&&(a.next=this._contribution4D(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),a.next.next=this._contribution4D(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),a.next.next.next=this._contribution4D(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=ts(ts(ts(a)));for(let t=255;t>=0;t--){a=ts(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm4D[t]=252&this._perm[t],n[e[0]]=n[t]}}_contribution4D(t,e,i,s,o){const{_SQUISH_4D:n}=this;return{dx:-e-t*n,dy:-i-t*n,dz:-s-t*n,dw:-o-t*n,xsb:e,ysb:i,zsb:s,wsb:o}}}class os{constructor(){this.noise2d=new es,this.noise3d=new is,this.noise4d=new ss}}const ns={speed:.2,step:250};class as{constructor(){const t=new os;this._simplex=t.noise2d,this.options=st({},ns)}generate(t){const e=t.getPosition(),{speed:i,step:s}=this.options,o=e.x/s,n=e.y/s,a=.001,r=(this._simplex.noise(o,n+a)-this._simplex.noise(o,n-a))/.002,c=(this._simplex.noise(o+a,n)-this._simplex.noise(o-a,n))/.002;return t.velocity.x=0,t.velocity.y=0,y.create(i*r,i*-c)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.seed=e?.seed,this.options.speed=(e?.speed??ns.speed)*t.retina.pixelRatio,this.options.step=e?.step??ns.step,this._simplex.seed(this.options.seed??S())}reset(){}update(){}}const rs="curlNoise";class cs{constructor(){this.options={rndFunc:null,period:100,nbHarmonics:2,attenHarmonics:.8,lowValue:-.03,highValue:.03}}generate(t){if(!t.pathGen){const e=this.options;t.pathGen=function(t,e,i,s,o=0,n=1){const a=[],r=[],c=[],h=[],l=[],d=t??S;let u=0;i<1&&(i=1);for(let t=1;t<=i;++t)a[t]=d(),r[t]=d(),c[t]=1===t?1:c[t-1]*s,u+=c[t],h[t]=t/e,l[t]=d();return c.forEach(((t,e)=>c[e]=t/u*(n-o))),()=>{let t,e,s=0;for(let o=i;o>=1;--o)t=l[o]+=h[o],l[o]>=1&&(t=l[o]-=1,a[o]=r[o],r[o]=d()),e=t**2*(3-2*t),s+=(a[o]*(1-e)+r[o]*e)*c[o];return s+o}}(e.rndFunc,e.period,e.nbHarmonics,e.attenHarmonics,e.lowValue,e.highValue)}return t.curveVelocity?(t.curveVelocity.length+=.01,t.curveVelocity.angle=(t.curveVelocity.angle+t.pathGen())%(2*Math.PI)):(t.curveVelocity=y.origin,t.curveVelocity.length=.6*S()+.8,t.curveVelocity.angle=S()*Math.PI*2),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(t){const e=t.actualOptions.particles.move.path.options,{options:i}=this;bt(e.rndFunc)?i.rndFunc=e.rndFunc:mt(e.rndFunc)&&(i.rndFunc=window[e.rndFunc]||this.options.rndFunc),i.period=e.period??i.period,i.nbHarmonics=e.nbHarmonics??i.nbHarmonics,i.attenHarmonics=e.attenHarmonics??i.attenHarmonics,i.lowValue=e.lowValue??i.lowValue,i.highValue=e.highValue??i.highValue}reset(t){delete t.pathGen,delete t.curveVelocity}update(){}}const hs="curvesPathGenerator";class ls{constructor(){this.wait=!1}load(t){t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=M(t.delay)),void 0!==t.duration&&(this.duration=M(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class ds{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=M(t.quantity)),void 0!==t.delay&&(this.delay=M(t.delay)))}}class us{constructor(){this.color=!1,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ps{constructor(){this.options={},this.replace=new us,this.type="square"}load(t){t&&(void 0!==t.options&&(this.options=st({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class gs{constructor(){this.mode="percent",this.height=0,this.width=0}load(t){void 0!==t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class fs{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new ls,this.rate=new ds,this.shape=new ps,this.startCount=0}load(t){t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new gs),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=dt(t.particles,(t=>st({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=M(t.position.x)),void 0!==t.position.y&&(this.position.y=M(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new Me),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}function ys(t,e){t.color?t.color.value=e:t.color={value:e}}class ws{constructor(t,e,i,s,o){this.emitters=e,this.container=i,this._destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})},this._prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life?.duration?O(this.options.life.duration):void 0;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=1e3*t)},this._setColorAnimation=(t,e,i)=>{const s=this.container;if(!t.enable)return e;const o=C(t.offset),n=1e3*O(this.options.rate.delay)/s.retina.reduceFactor;return(e+O(t.speed??0)*s.fpsLimit/n+3.6*o)%i},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=o,s instanceof fs?this.options=s:(this.options=new fs,this.options.load(s)),this._spawnDelay=1e3*O(this.options.life.delay??0)/this.container.retina.reduceFactor,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let n=st({},this.options.particles);if(n??={},n.move??={},n.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=Et(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=n,this._size=this._calcSize(),this.size=wt(this._size,this.container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=document.getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver((()=>{this.resize()})),this._resizeObserver=new ResizeObserver((()=>{this.resize()})),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const a=this.options.shape,r=this._engine.emitterShapeManager?.getShapeGenerator(a.type);r&&(this._shape=r.generate(this.position,this.size,this.fill,a.options)),this._engine.dispatchEvent("emitterCreated",{container:i,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0))){if(void 0===this._emitDelay){const t=O(this.options.rate.delay);this._emitDelay=1e3*t/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&tt(t,this.container.canvas.size,y.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=wt(this._size,this.container.canvas.size),this._shape?.resize(this.position,this.size)}async update(t){this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,await this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._spawnDelay=1e3*O(this.options.life.delay??0)/this.container.retina.reduceFactor):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay)))}_calcPosition(){if(this.options.domId){const t=this.container,e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{x:(i.x+i.width/2)*t.retina.pixelRatio,y:(i.y+i.height/2)*t.retina.pixelRatio}}}return L({size:this.container.canvas.size,position:this.options.position})}_calcSize(){const t=this.container;if(this.options.domId){const e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:"precise"}}}return this.options.size??(()=>{const t=new gs;return t.load({height:0,mode:"percent",width:0}),t})()}async _emit(){if(this._paused)return;const t=O(this.options.rate.quantity);await this._emitParticles(t)}async _emitParticles(t){const e=ut(this._particlesOptions);for(let i=0;i<t;i++){const t=st({},e);if(this.spawnColor){const e=this.options.spawnColor?.animation;e&&(this.spawnColor.h=this._setColorAnimation(e.h,this.spawnColor.h,360),this.spawnColor.s=this._setColorAnimation(e.s,this.spawnColor.s,100),this.spawnColor.l=this._setColorAnimation(e.l,this.spawnColor.l,100)),ys(t,this.spawnColor)}const i=this.options.shape;let s=this.position;if(this._shape){const e=await this._shape.randomPosition();if(e){s=e.position;const o=i.replace;o.color&&e.color&&ys(t,e.color),o.opacity&&(t.opacity?t.opacity.value=e.opacity:t.opacity={value:e.opacity})}else s=null}s&&this.container.particles.addParticle(s,t)}}}class vs{constructor(t,e){this.container=e,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]},e.getEmitter=t=>void 0===t||_t(t)?this.array[t||0]:this.array.find((e=>e.name===t)),e.addEmitter=async(t,e)=>this.addEmitter(t,e),e.removeEmitter=t=>{const i=e.getEmitter(t);i&&this.removeEmitter(i)},e.playEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPlay()},e.pauseEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPause()}}async addEmitter(t,e){const i=new fs;i.load(t);const s=new ws(this._engine,this,this.container,i,e);return await s.init(),this.array.push(s),s}handleClickMode(t){const e=this.emitters,i=this.interactivityEmitters;if("emitter"!==t)return;let s;if(i&&xt(i.value))if(i.value.length>0&&i.random.enable){s=[];const t=[];for(let e=0;e<i.random.count;e++){const o=J(i.value);t.includes(o)&&t.length<i.value.length?e--:(t.push(o),s.push(K(i.value,o)))}}else s=i.value;else s=i?.value;const o=s??e,n=this.container.interactivity.mouse.clickPosition;dt(o,(t=>{this.addEmitter(t,n)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters)if(xt(this.emitters))for(const t of this.emitters)await this.addEmitter(t);else await this.addEmitter(this.emitters)}pause(){for(const t of this.array)t.pause()}play(){for(const t of this.array)t.play()}removeEmitter(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}async update(t){for(const e of this.array)await e.update(t)}}const ms=new Map;class _s{constructor(t){this._engine=t}addShapeGenerator(t,e){this.getShapeGenerator(t)||ms.set(t,e)}getShapeGenerator(t){return ms.get(t)}getSupportedShapeGenerators(){return ms.keys()}}class bs{constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}class Ss{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return new vs(this._engine,t)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;e?.emitters&&(t.emitters=dt(e.emitters,(t=>{const e=new fs;return e.load(t),e})));const i=e?.interactivity?.modes?.emitters;if(i)if(xt(i))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:i.map((t=>{const e=new fs;return e.load(t),e}))};else{const e=i;if(void 0!==e.value)if(xt(e.value))t.interactivity.modes.emitters={random:{count:e.random.count??1,enable:e.random.enable??!1},value:e.value.map((t=>{const e=new fs;return e.load(t),e}))};else{const i=new fs;i.load(e.value),t.interactivity.modes.emitters={random:{count:e.random.count??1,enable:e.random.enable??!1},value:i}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new fs}).value.load(i)}}}needsPlugin(t){if(!t)return!1;const e=t.emitters;return xt(e)&&!!e.length||void 0!==e||!!t.interactivity?.events?.onClick?.mode&&X("emitter",t.interactivity.events.onClick.mode)}}function xs(t,e,i,s=!0){const o=t.getImageData(0,0,e.width,e.height).data;s&&t.clearRect(0,0,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]),n[a.y][a.x]={r:o[t],g:o[t+1],b:o[t+2],a:o[t+3]/255}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}class Ps extends bs{constructor(t,e,i,s){super(t,e,i,s);const o=s.filter;let n=t=>t.a>0;if(void 0!==o)if(mt(o)){if(Object.hasOwn(window,o)){const t=window[o];bt(t)&&(n=t)}}else n=o;this.filter=n,this.scale=s.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const e=this.options,i=e.selector,s=e.pixels,o=e.image,n=e.element,a=e.text,r=s.offset;if(o){const e=o.src;if(!e)return;t=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${g} Could not get canvas context`));n.drawImage(i,0,0,i.width,i.height,0,0,o.width,o.height),t(xs(n,o,e))}}));return i.src=t,s}(e,r)}else if(a){const e=function(t,e,i){const s=document.createElement("canvas"),o=s.getContext("2d"),{font:n,text:a,lines:r,color:c}=t;if(!a||!o)return;const h=a.split(r.separator),l=_t(n.size)?`${n.size}px`:n.size,d=[];let u=0,p=0;for(const t of h){o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`;const e=o.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};u=Math.max(u||0,i.width),p+=i.height+r.spacing,d.push(i)}s.width=u,s.height=p;let g=0;for(const t of d)o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`,i?(o.fillStyle=c,o.fillText(t.text,0,g+t.measure.actualBoundingBoxAscent)):(o.strokeStyle=c,o.strokeText(t.text,0,g+t.measure.actualBoundingBoxAscent)),g+=t.height+r.spacing;return xs(o,s,e)}(a,r,this.fill);if(!e)return;t=e}else if(n||i){const e=n||i&&document.querySelector(i);if(!e)return;const s=e.getContext("2d");if(!s)return;t=xs(s,e,r)}t&&(this.pixelData=t)}async randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,s=this.position,o=this.scale,n=s.x-e*o/2,a=s.y-t*o/2;for(let s=0;s<100;s++){const s=Math.floor(S()*e*t),r={x:s%e,y:Math.floor(s/e)},c=i.pixels[r.y][r.x];if(this.filter(c))return{position:{x:r.x*o+n,y:r.y*o+a},color:{...c},opacity:c.a}}return null}resize(t,e){super.resize(t,e)}}class Cs{constructor(){this.offset=4}load(t){t&&void 0!==t.offset&&(this.offset=t.offset)}}class Os{constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){t&&(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Ts{constructor(){this.separator="\n",this.spacing=0}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class As{constructor(){this.color="#000000",this.font=new Os,this.lines=new Ts,this.text=""}load(t){t&&(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class Ms{constructor(){this.filter=t=>t.a>0,this.pixels=new Cs,this.scale=1,this.selector="",this.text=new As}load(t){t&&(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class Vs{generate(t,e,i,s){const o=new Ms;return o.load(s),new Ps(t,e,i,o)}}class Gs extends bs{constructor(t,e,i,s){super(t,e,i,s);const o=document.createElement("canvas").getContext("2d");if(!o)throw new Error(`${g} No 2d context available`);this.checkContext=o,this.points=s.points;const n=this.points,a=new Path2D,r=t.x-e.width/2,c=t.y-e.height/2;for(const[t,i]of n.entries()){const s={x:r+i.x*e.width/100,y:c+i.y*e.height/100};0===t?a.moveTo(s.x,s.y):a.lineTo(s.x,s.y)}if(n[0]){const t={x:r+n[0].x*e.width/100,y:c+n[0].y*e.height/100};a.lineTo(t.x,t.y)}this.path=a}async init(){}async randomPosition(){const t=this.checkContext,e=this.position,i=this.size,s=this.fill,o=this.path,n=s?function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+S()*s.width-s.width/2,y:i.y+S()*s.height-s.height/2};if(t.isPointInPath(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i):function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+S()*s.width-s.width/2,y:i.y+S()*s.height-s.height/2};if(t.isPointInStroke(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i);return n?{position:n}:null}resize(t,e){super.resize(t,e);const i=this.points,s=new Path2D,o=t.x-e.width/2,n=t.y-e.height/2;for(const[t,a]of i.entries()){const i={x:o+a.x*e.width/100,y:n+a.y*e.height/100};0===t?s.moveTo(i.x,i.y):s.lineTo(i.x,i.y)}if(i[0]){const t={x:o+i[0].x*e.width/100,y:n+i[0].y*e.height/100};s.lineTo(t.x,t.y)}this.path=s}}class Es{constructor(){this.points=[]}load(t){t&&void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??50,y:t.y??50}))))}}class Rs{generate(t,e,i,s){const o=new Es;return o.load(s),new Gs(t,e,i,o)}}function ks(t,e,i,s=0){const o=[],n=2*Math.PI/e;for(let a=0;a<e;a++){const e=n*a+s;o.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return o}function zs(t,e){let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const n=e[s],a=e[o];n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(i=!i)}return i}class Is extends bs{constructor(t,e,i,s){super(t,e,i,s),this.sides=s.sides,this.angle=s.angle*Math.PI/180,this.polygon=ks(t,this.sides,e.width/2,this.angle)}async init(){}async randomPosition(){const t=this.fill,e=this.polygon,i=t?function(t){const e={...t[0]},i={...t[0]};for(const s of t)s.x<e.x&&(e.x=s.x),s.x>i.x&&(i.x=s.x),s.y<e.y&&(e.y=s.y),s.y>i.y&&(i.y=s.y);let s=null;for(let o=0;o<100;o++){const o={x:e.x+S()*(i.x-e.x),y:e.y+S()*(i.y-e.y)};if(zs(o,t)){s=o;break}}return s}(e):function(t){const e=Math.floor(S()*t.length),i=t[e],s=t[(e+1)%t.length],o=S();return{x:i.x+(s.x-i.x)*o,y:i.y+(s.y-i.y)*o}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=ks(t,this.sides,e.width/2,this.angle)}}class Ls{constructor(){this.angle=0,this.sides=5}load(t){t&&(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class Ds{generate(t,e,i,s){const o=new Ls;return o.load(s),new Is(t,e,i,o)}}class Hs{constructor(t,e){this._exportImage=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{e.toBlob((t=>{i(t||void 0)}),t.type??"image/png",t.quality)}))},this._container=t,this._engine=e}async export(t,e){const i={supported:!1};if("image"===t)i.supported=!0,i.blob=await this._exportImage(e);return i}}class Bs{constructor(t){this.id="export-image",this._engine=t}getPlugin(t){return new Hs(t,this._engine)}loadOptions(){}needsPlugin(){return!0}}class Fs{constructor(t,e){this._exportJSON=async()=>{const t=JSON.stringify(this._container.actualOptions,((t,e)=>{if(!t.startsWith("_"))return e}),2);return new Blob([t],{type:"application/json"})},this._container=t,this._engine=e}async export(t){const e={supported:!1};if("json"===t)e.supported=!0,e.blob=await this._exportJSON();return e}}class Us{constructor(t){this.id="export-json",this._engine=t}getPlugin(t){return new Fs(t,this._engine)}loadOptions(){}needsPlugin(){return!0}}const Ns=["webm","ogg","mp4","x-matroska"],qs=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class $s{constructor(t,e){this._supportedTypes=[],this._exportVideo=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{const s=e.captureStream(t.fps??this._container.actualOptions.fpsLimit),o=t.mimeType??this._supportedTypes[0],n=new MediaRecorder(s,{mimeType:o}),a=[];n.addEventListener("dataavailable",(t=>{a.push(t.data)})),n.addEventListener("stop",(()=>{i(new Blob(a,{type:o}))})),n.start(),setTimeout((()=>{n.stop()}),t.duration??5e3)}))},this._container=t,this._engine=e,this._supportedTypes=function(){const t=MediaRecorder.isTypeSupported,e=[];return Ns.forEach((i=>{const s=`video/${i}`;qs.forEach((i=>[`${s};codecs=${i}`,`${s};codecs=${i.toUpperCase()}`].forEach((i=>{t(i)&&e.push(i)})))),t(s)&&e.push(s)})),e}()}async export(t,e){const i={supported:!1};if("video"===t)i.supported=!0,i.blob=await this._exportVideo(e);return i}}class js{constructor(t){this.id="export-video",this._engine=t}getPlugin(t){return new $s(t,this._engine)}loadOptions(){}needsPlugin(){return!0}}class Qs extends Mi{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container;if("pop"!==t)return;const i=e.interactivity.mouse.clickPosition;if(!i)return;const s=e.particles.quadTree.queryCircle(i,e.retina.pixelRatio);if(s.length)for(const t of s)e.particles.remove(t)}}clear(){}init(){}async interact(){}isEnabled(){return!0}reset(){}}class Ws{constructor(){this.radius=0,this.mass=0}load(t){t&&(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class Zs extends Ee{constructor(){super(),this.density=5,this.value=50,this.limit=new Ws}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),_t(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Xs{constructor(){this.color=new ce,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new Zs}load(t){void 0!==t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.draggable&&(this.draggable=t.draggable),this.name=t.name,void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=M(t.position.x)),void 0!==t.position.y&&(this.position.y=M(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.orbits&&(this.orbits=t.orbits))}}class Ys{constructor(t,e,i,s){this.absorbers=t,this.container=e,this._calcPosition=()=>{const t=L({size:this.container.canvas.size,position:this.options.position});return y.create(t.x,t.y)},this._updateParticlePosition=(t,e)=>{if(t.destroyed)return;const i=this.container,s=i.canvas.size;if(t.needsNewPosition){const e=I({size:s});t.position.setTo(e),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.needsNewPosition=!1}if(this.options.orbits){if(void 0===t.absorberOrbit&&(t.absorberOrbit=y.create(0,0),t.absorberOrbit.length=G(t.getPosition(),this.position),t.absorberOrbit.angle=S()*Math.PI*2),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height);t.absorberOrbit.length=e*(.2*S()-.1+1)}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?"clockwise":"counter-clockwise");const o=t.absorberOrbit.length,n=t.absorberOrbit.angle,a=t.absorberOrbitDirection;t.velocity.setTo(y.origin);const r={x:"clockwise"===a?Math.cos:Math.sin,y:"clockwise"===a?Math.sin:Math.cos};t.position.x=this.position.x+o*r.x(n),t.position.y=this.position.y+o*r.y(n),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(t.retina.moveSpeed??0)*i.retina.pixelRatio/100*i.retina.reduceFactor}else{const i=y.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}},this.initialPosition=s?y.create(s.x,s.y):void 0,i instanceof Xs?this.options=i:(this.options=new Xs,this.options.load(i)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=O(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const o=this.options.size.limit;this.limit={radius:o.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:o.mass},this.color=Mt(this.options.color)??{b:0,g:0,r:0},this.position=this.initialPosition?.copy()??this._calcPosition()}attract(t){const e=this.container,i=this.options;if(i.draggable){const t=e.interactivity.mouse;if(t.clicking&&t.downPosition){G(this.position,t.downPosition)<=this.size&&(this.dragging=!0)}else this.dragging=!1;this.dragging&&t.position&&(this.position.x=t.position.x,this.position.y=t.position.y)}const s=t.getPosition(),{dx:o,dy:n,distance:a}=V(this.position,s),r=y.create(o,n);if(r.length=this.mass/Math.pow(a,2)*e.retina.reduceFactor,a<this.size+t.getRadius()){const s=.033*t.getRadius()*e.retina.pixelRatio;this.size>t.getRadius()&&a<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?i.destroy?t.destroy():(t.needsNewPosition=!0,this._updateParticlePosition(t,r)):(i.destroy&&(t.size.value-=s),this._updateParticlePosition(t,r)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=s),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=s*this.options.size.density*e.retina.reduceFactor)}else this._updateParticlePosition(t,r)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(0,0,this.size,0,2*Math.PI,!1),t.closePath(),t.fillStyle=Ht(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&tt(t,this.container.canvas.size,y.origin)?t:this._calcPosition()}}class Js{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||_t(t)?this.array[t||0]:this.array.find((e=>e.name===t)),t.addAbsorber=(t,e)=>this.addAbsorber(t,e)}addAbsorber(t,e){const i=new Ys(this,this.container,t,e);return this.array.push(i),i}draw(t){for(const e of this.array)e.draw(t)}handleClickMode(t){const e=this.absorbers,i=this.interactivityAbsorbers;if("absorber"===t){const t=ut(i)??ut(e),s=this.container.interactivity.mouse.clickPosition;this.addAbsorber(t,s)}}async init(){this.absorbers=this.container.actualOptions.absorbers,this.interactivityAbsorbers=this.container.actualOptions.interactivity.modes.absorbers,dt(this.absorbers,(t=>{this.addAbsorber(t)}))}particleUpdate(t){for(const e of this.array)if(e.attract(t),t.destroyed)break}removeAbsorber(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}}class Ks{constructor(){this.id="absorbers"}getPlugin(t){return new Js(t)}loadOptions(t,e){(this.needsPlugin(t)||this.needsPlugin(e))&&(e?.absorbers&&(t.absorbers=dt(e.absorbers,(t=>{const e=new Xs;return e.load(t),e}))),t.interactivity.modes.absorbers=dt(e?.interactivity?.modes?.absorbers,(t=>{const e=new Xs;return e.load(t),e})))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return xt(e)?!!e.length:!!e||!(!t.interactivity?.events?.onClick?.mode||!X("absorber",t.interactivity.events.onClick.mode))}}class to{load(t){t&&(void 0!==t.bottom&&(this.bottom=M(t.bottom)),void 0!==t.left&&(this.left=M(t.left)),void 0!==t.right&&(this.right=M(t.right)),void 0!==t.top&&(this.top=M(t.top)))}}class eo extends Ee{constructor(){super(),this.value=3}}class io extends Ee{constructor(){super(),this.value={min:4,max:9}}}class so{constructor(){this.count=1,this.factor=new eo,this.rate=new io,this.sizeOffset=!0}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=dt(t.particles,(t=>st({},t))),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset),t.colorOffset&&(this.colorOffset=this.colorOffset??{},void 0!==t.colorOffset.h&&(this.colorOffset.h=t.colorOffset.h),void 0!==t.colorOffset.s&&(this.colorOffset.s=t.colorOffset.s),void 0!==t.colorOffset.l&&(this.colorOffset.l=t.colorOffset.l)))}}class oo{constructor(){this.bounds=new to,this.mode="none",this.split=new so}load(t){t&&(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}function no(t,e,i,s){const o=i.options.destroy;if(!o)return;const n=o.split,a=ci(t,e,i.options),r=O(n.factor.value),c=i.getFillColor();n.color?a.color.load(n.color):n.colorOffset&&c?a.color.load({value:{hsl:{h:c.h+O(n.colorOffset.h??0),s:c.s+O(n.colorOffset.s??0),l:c.l+O(n.colorOffset.l??0)}}}):a.color.load({value:{hsl:i.getFillColor()}}),a.move.load({center:{x:i.position.x,y:i.position.y,mode:"precise"}}),_t(a.size.value)?a.size.value/=r:(a.size.value.min/=r,a.size.value.max/=r),a.load(s);const h=n.sizeOffset?M(-i.size.value,i.size.value):0,l={x:i.position.x+C(h),y:i.position.y+C(h)};return e.particles.addParticle(l,a,i.group,(t=>!(t.size.value<.5)&&(t.velocity.length=C(M(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,setTimeout((()=>{t.unbreakable=!1}),500),!0)))}class ao{constructor(t,e){this.engine=t,this.container=e}init(t){const e=this.container,i=t.options.destroy;if(!i)return;t.splitCount=0;const s=i.bounds;t.destroyBounds||(t.destroyBounds={});const{bottom:o,left:n,right:a,top:r}=s,{destroyBounds:c}=t,h=e.canvas.size;o&&(c.bottom=O(o)*h.height/100),n&&(c.left=O(n)*h.width/100),a&&(c.right=O(a)*h.width/100),r&&(c.top=O(r)*h.height/100)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new oo);for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&"split"===i.mode&&function(t,e,i){const s=i.options.destroy;if(!s)return;const o=s.split;if(o.count>=0&&(void 0===i.splitCount||i.splitCount++>o.count))return;const n=O(o.rate.value),a=ut(o.particles);for(let s=0;s<n;s++)no(t,e,i,a)}(this.engine,this.container,t)}update(t){if(!this.isEnabled(t))return;const e=t.getPosition(),i=t.destroyBounds;i&&(void 0!==i.bottom&&e.y>=i.bottom||void 0!==i.left&&e.x<=i.left||void 0!==i.right&&e.x>=i.right||void 0!==i.top&&e.y<=i.top)&&t.destroy()}}class ro extends bs{constructor(t,e,i,s){super(t,e,i,s)}async init(){}async randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,o]=[t.width/2,t.height/2],n=((t,e)=>{const i=S()/4,s=Math.atan(e/t*Math.tan(2*Math.PI*i)),o=S();return o<.25?s:o<.5?Math.PI-s:o<.75?Math.PI+s:-s})(s,o),a=(l=n,(c=s)*(h=o)/Math.sqrt((h*Math.cos(l))**2+(c*Math.sin(l))**2)),r=e?a*Math.sqrt(S()):a;var c,h,l;return{position:{x:i.x+r*Math.cos(n),y:i.y+r*Math.sin(n)}}}}class co{generate(t,e,i,s){return new ro(t,e,i,s)}}function ho(t,e){return t+e*(S()-.5)}class lo extends bs{constructor(t,e,i,s){super(t,e,i,s)}async init(){}async randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:ho(e.x,i.width),y:ho(e.y,i.height)}};{const t=i.width/2,s=i.height/2,o=Math.floor(4*S()),n=2*(S()-.5);switch(o){case 0:return{position:{x:e.x+n*t,y:e.y-s}};case 1:return{position:{x:e.x-t,y:e.y+n*s}};case 2:return{position:{x:e.x+n*t,y:e.y+s}};default:return{position:{x:e.x+t,y:e.y+n*s}}}}}}class uo{generate(t,e,i,s){return new lo(t,e,i,s)}}class po{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=st({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}const go="trail";class fo extends Mi{constructor(t){super(t),this._delay=0}clear(){}init(){}async interact(t){const e=this.container,{interactivity:i}=e;if(!e.retina.reduceFactor)return;const s=e.actualOptions.interactivity.modes.trail;if(!s)return;const o=1e3*s.delay/this.container.retina.reduceFactor;if(this._delay<o&&(this._delay+=t.value),this._delay<o)return;const n=!(s.pauseOnStop&&(i.mouse.position===this._lastPosition||i.mouse.position?.x===this._lastPosition?.x&&i.mouse.position?.y===this._lastPosition?.y)),a=e.interactivity.mouse.position;a?this._lastPosition={...a}:delete this._lastPosition,n&&e.particles.push(s.quantity,e.interactivity.mouse,s.particles),this._delay-=o}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&X(go,o.onClick.mode)||s.inside&&!!s.position&&X(go,o.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new po);for(const i of e)t.trail.load(i?.trail)}reset(){}}class yo{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=M(t.value)))}}class wo{constructor(){this.darken=new yo,this.enable=!1,this.enlighten=new yo,this.mode="vertical",this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=ce.create(this.backColor,t.backColor)),this.darken.load(t.darken),void 0!==t.enable&&(this.enable=t.enable),this.enlighten.load(t.enlighten),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.speed&&(this.speed=M(t.speed)))}}class vo{getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(t){!function(t){const e=t.options.roll;if(e?.enable)if(t.roll={enable:e.enable,horizontal:"horizontal"===e.mode||"both"===e.mode,vertical:"vertical"===e.mode||"both"===e.mode,angle:S()*Math.PI*2,speed:O(e.speed)/360},e.backColor)t.backColor=Et(e.backColor);else if(e.darken.enable&&e.enlighten.enable){const i=S()>=.5?"darken":"enlighten";t.roll.alter={type:i,value:O("darken"===i?e.darken.value:e.enlighten.value)}}else e.darken.enable?t.roll.alter={type:"darken",value:O(e.darken.value)}:e.enlighten.enable&&(t.roll.alter={type:"enlighten",value:O(e.enlighten.value)});else t.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll||(t.roll=new wo);for(const i of e)t.roll.load(i?.roll)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const o=s.speed*e.factor,n=2*Math.PI;s.angle+=o,s.angle>n&&(s.angle-=n)}(t,e)}}class mo{static init(t){const e=new mo,i=t.selector;if(!i)throw new Error("No selector provided");const s=document.querySelector(i);if(!s)throw new Error("No element found for selector");return Gi.load({id:i.replace(".","").replace("!",""),element:s,options:{fullScreen:{enable:!1},particles:{color:{value:t.color??"!000000"},links:{color:"random",distance:t.minDistance??120,enable:t.connectParticles??!1},move:{enable:!0,speed:t.speed??.5},number:{value:t.maxParticles??100},size:{value:{min:1,max:t.sizeVariations??3}}},responsive:t.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:t.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((t=>{e._container=t})),e}destroy(){const t=this._container;t&&t.destroy()}pauseAnimation(){const t=this._container;t&&t.pause()}resumeAnimation(){const t=this._container;t&&t.play()}}const _o=t=>{const{particlesJS:e,pJSDom:i}=(t=>{const e=(e,i)=>t.load({id:e,options:i});return e.load=(e,i,s)=>{t.load({id:e,url:i}).then((t=>{t&&s(t)})).catch((()=>{s(void 0)}))},e.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:e,pJSDom:t.dom()}})(t);return window.particlesJS=e,window.pJSDom=i,window.Particles=mo,{particlesJS:e,pJSDom:i,Particles:mo}};function bo(t,e,i,s,o,n){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=x(t.velocity.x,-1,1),t.velocity.y=x(t.velocity.y,-1,1));t.lastPathTime-=t.pathDelay}(t,n);const a=t.gravity,r=a?.enable&&a.inverse?-1:1;o&&i&&(t.velocity.x+=o*n.factor/(60*i)),a?.enable&&i&&(t.velocity.y+=r*(a.acceleration*n.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c);const h=t.velocity.mult(i);a?.enable&&s>0&&(!a.inverse&&h.y>=0&&h.y>=s||a.inverse&&h.y<=0&&h.y<=-s)&&(h.y=r*s,i&&(t.velocity.y=h.y/i));const l=t.options.zIndex,d=(1-t.zIndexFactor)**l.velocityRate;h.multTo(d);const{position:u}=t;u.addTo(h),e.vibrate&&(u.x+=Math.sin(u.x*Math.cos(u.y)),u.y+=Math.cos(u.y*Math.sin(u.x)))}class So{constructor(){this._initSpin=t=>{const e=t.container,i=t.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},o={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},n=G(t.getPosition(),o),a=O(i.acceleration);t.retina.spinAcceleration=a*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?"clockwise":"counter-clockwise",angle:t.velocity.angle,radius:n,acceleration:t.retina.spinAcceleration}}}init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:O(e.acceleration),inverse:e.inverse},this._initSpin(t)}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,e){const i=t.options,s=i.move;if(!s.enable)return;const o=t.container,n=o.retina.pixelRatio,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),r=(t.retina.moveSpeed??=O(s.speed)*n)*o.retina.reduceFactor,c=t.retina.moveDrift??=O(t.options.move.drift)*n,h=A(i.size.value)*n,l=r*(s.size?t.getRadius()/h:1)*a*(e.factor||1)/2,d=t.retina.maxSpeed??o.retina.maxSpeed;s.spin.enable?function(t,e){const i=t.container;if(!t.spin)return;const s={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(i.canvas.size.width,i.canvas.size.height),n=.5*o;t.spin.radius>n?(t.spin.radius=n,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=.01*e*(1-t.spin.radius/o)}(t,l):bo(t,s,l,d,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=V(e,t.position),o=Math.abs(i),n=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(r||c)if((r&&o>=r||c&&n>=c)&&!t.misplaced)t.misplaced=!!r&&o>r||!!c&&n>c,r&&(t.velocity.x=.5*t.velocity.y-t.velocity.x),c&&(t.velocity.y=.5*t.velocity.x-t.velocity.y);else if((!r||o<r)&&(!c||n<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;r&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-S()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-S())}}(t)}}class xo{draw(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:2*Math.PI});const o=i.circleRange;e.arc(0,0,s,o.min,o.max,!1)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=St(s)?{min:s.min*Math.PI/180,max:s.max*Math.PI/180}:{min:0,max:s*Math.PI/180}}}function Po(t,e,i,s,o){if(!e||!i.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=t.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=C(i.offset),a=(e.velocity??0)*t.factor+3.6*n,r=e.decay??1;o&&"increasing"!==e.status?(e.value-=a,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status="increasing",e.value+=e.value)):(e.value+=a,e.value>s&&(e.loops||(e.loops=0),e.loops++,o&&(e.status="decreasing",e.value-=e.value%s))),e.velocity&&1!==r&&(e.velocity*=r),e.value>s&&(e.value%=s)}class Co{constructor(t){this.container=t}init(t){const e=Et(t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=$t(e,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:o}=t;return!t.destroyed&&!t.spawning&&(void 0!==o?.h.value&&e.enable||void 0!==o?.s.value&&i.enable||void 0!==o?.l.value&&s.enable)}update(t,e){!function(t,e){const{h:i,s,l:o}=t.options.color.animation,{color:n}=t;if(!n)return;const{h:a,s:r,l:c}=n;a&&Po(e,a,i,360,!1),r&&Po(e,r,s,100,!0),c&&Po(e,c,o,100,!0)}(t,e)}}class Oo{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=gt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=O(i.speed)/100*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=S()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.opacity;if(t.destroyed||!i?.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const s=i.min,o=i.max,n=i.decay??1;if(i.time||(i.time=0),(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=e.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case"increasing":i.value>=o?(i.status="decreasing",i.loops||(i.loops=0),i.loops++):i.value+=(i.velocity??0)*e.factor;break;case"decreasing":i.value<=s?(i.status="increasing",i.loops||(i.loops=0),i.loops++):i.value-=(i.velocity??0)*e.factor}i.velocity&&1!==i.decay&&(i.velocity*=n),function(t,e,i,s){switch(t.options.opacity.animation.destroy){case"max":e>=s&&t.destroy();break;case"min":e<=i&&t.destroy()}}(t,i.value,s,o),t.destroyed||(i.value=x(i.value,s,o))}}(t,e)}}class To{constructor(t){this.container=t,this.modes=["bounce","bounce-vertical","bounce-horizontal","bounceVertical","bounceHorizontal","split"]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;let n=!1;for(const[,s]of o.plugins)if(void 0!==s.particleBounce&&(n=s.particleBounce(t,i,e)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,c=t.getRadius(),h=it(a,c),l=o.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode||"left"!==t.direction&&"right"!==t.direction)return;t.bounds.right<0&&"left"===t.direction?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&"right"===t.direction&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&e>0||"left"===t.direction&&t.bounds.left<=0&&e<0){const e=O(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&"right"===t.direction?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&"left"===t.direction&&(t.particle.position.x=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c}),function(t){if("bounce"!==t.outMode&&"bounce-vertical"!==t.outMode&&"bounceVertical"!==t.outMode&&"split"!==t.outMode||"bottom"!==t.direction&&"top"!==t.direction)return;t.bounds.bottom<0&&"top"===t.direction?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&"bottom"===t.direction&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&e>0||"top"===t.direction&&t.bounds.top<=0&&e<0){const e=O(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&"bottom"===t.direction?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&"top"===t.direction&&(t.particle.position.y=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c})}}class Ao{constructor(t){this.container=t,this.modes=["destroy"]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case"normal":case"outside":if(tt(t.position,o.canvas.size,y.origin,t.getRadius(),e))return;break;case"inside":{const{dx:e,dy:i}=V(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&e>t.moveCenter.radius||o<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||o>=0&&i<-t.moveCenter.radius)return;break}}o.particles.remove(t,void 0,!0)}}class Mo{constructor(t){this.container=t,this.modes=["none"]}update(t,e,i,s){if(!this.modes.includes(s))return;if(t.options.move.distance.horizontal&&("left"===e||"right"===e)||t.options.move.distance.vertical&&("top"===e||"bottom"===e))return;const o=t.options.move.gravity,n=this.container,a=n.canvas.size,r=t.getRadius();if(o.enable){const i=t.position;(!o.inverse&&i.y>a.height+r&&"bottom"===e||o.inverse&&i.y<-r&&"top"===e)&&n.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=a.height+r||t.velocity.y<0&&t.position.y>=-r||t.velocity.x>0&&t.position.x<=a.width+r||t.velocity.x<0&&t.position.x>=-r)return;tt(t.position,n.canvas.size,y.origin,r,e)||n.particles.remove(t)}}}class Vo{constructor(t){this.container=t,this.modes=["out"]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case"inside":{const{x:e,y:i}=t.velocity,s=y.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(y.create(t.moveCenter));const{dx:n,dy:a}=V(t.position,s);if(e<=0&&n>=0||i<=0&&a>=0||e>=0&&n<=0||i>=0&&a<=0)return;t.position.x=Math.floor(C({min:0,max:o.canvas.size.width})),t.position.y=Math.floor(C({min:0,max:o.canvas.size.height}));const{dx:r,dy:c}=V(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction;break}default:if(tt(t.position,o.canvas.size,y.origin,t.getRadius(),e))return;switch(t.outType){case"outside":{t.position.x=Math.floor(C({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(C({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=V(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case"normal":{const i=t.options.move.warp,s=o.canvas.size,n={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},a=t.getRadius(),r=it(t.position,a);"right"===e&&r.left>s.width+t.offset.x?(t.position.x=n.left,t.initialPosition.x=t.position.x,i||(t.position.y=S()*s.height,t.initialPosition.y=t.position.y)):"left"===e&&r.right<-t.offset.x&&(t.position.x=n.right,t.initialPosition.x=t.position.x,i||(t.position.y=S()*s.height,t.initialPosition.y=t.position.y)),"bottom"===e&&r.top>s.height+t.offset.y?(i||(t.position.x=S()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.top,t.initialPosition.y=t.position.y):"top"===e&&r.bottom<-t.offset.y&&(i||(t.position.x=S()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.bottom,t.initialPosition.y=t.position.y);break}}}}}class Go{constructor(t){this.container=t,this._updateOutMode=(t,e,i,s)=>{for(const o of this.updaters)o.update(t,s,e,i)},this.updaters=[new To(t),new Ao(t),new Vo(t),new Mo(t)]}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;this._updateOutMode(t,e,i.bottom??i.default,"bottom"),this._updateOutMode(t,e,i.left??i.default,"left"),this._updateOutMode(t,e,i.right??i.default,"right"),this._updateOutMode(t,e,i.top??i.default,"top")}}class Eo{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/100*e.retina.reduceFactor,i.sync||(t.size.velocity*=S()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.loops=0}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.size;if(t.destroyed||!i||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const s=(i.velocity??0)*e.factor,o=i.min,n=i.max,a=i.decay??1;if(i.time||(i.time=0),(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=e.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case"increasing":i.value>=n?(i.status="decreasing",i.loops||(i.loops=0),i.loops++):i.value+=s;break;case"decreasing":i.value<=o?(i.status="increasing",i.loops||(i.loops=0),i.loops++):i.value-=s}i.velocity&&1!==a&&(i.velocity*=a),function(t,e,i,s){switch(t.options.size.animation.destroy){case"max":e>=s&&t.destroy();break;case"min":e<=i&&t.destroy()}}(t,i.value,o,n),t.destroyed||(i.value=x(i.value,o,n))}}(t,e)}}async function Ro(t,e=!0){await async function(t,e=!0){await t.addMover("base",(()=>new So),e)}(t,!1),await async function(t,e=!0){await t.addShape("circle",new xo,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("color",(t=>new Co(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("opacity",(t=>new Oo(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("outModes",(t=>new Go(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("size",(()=>new Eo),e)}(t,!1),await t.refresh(e)}class ko{constructor(){this.distance=200,this.duration=.4,this.easing="ease-out-quad",this.factor=1,this.maxSpeed=50,this.speed=1}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.speed&&(this.speed=t.speed))}}const zo="attract";class Io extends Mi{constructor(t,e){super(e),this._clickAttract=()=>{const t=this.container;t.attract||(t.attract={particles:[]});const{attract:e}=t;if(e.finish||(e.count||(e.count=0),e.count++,e.count===t.particles.count&&(e.finish=!0)),e.clicking){const e=t.interactivity.mouse.clickPosition,i=t.retina.attractModeDistance;if(!i||i<0||!e)return;this._processAttract(e,i,new yi(e.x,e.y,i))}else!1===e.clicking&&(e.particles=[])},this._hoverAttract=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.attractModeDistance;!i||i<0||!e||this._processAttract(e,i,new yi(e.x,e.y,i))},this._processAttract=(t,e,i)=>{const s=this.container,o=s.actualOptions.interactivity.modes.attract;if(!o)return;const n=s.particles.quadTree.query(i,(t=>this.isEnabled(t)));for(const i of n){const{dx:s,dy:n,distance:a}=V(i.position,t),r=o.speed*o.factor,c=x(_(o.easing)(1-a/e)*r,0,o.maxSpeed),h=y.create(0===a?r:s/a*c,0===a?r:n/a*c);i.position.subFrom(h)}},this._engine=t,e.attract||(e.attract={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.attract;if(i&&t===zo){e.attract||(e.attract={particles:[]}),e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout((()=>{e.destroyed||(e.attract||(e.attract={particles:[]}),e.attract.clicking=!1)}),1e3*i.duration)}}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.attract;e&&(t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,o=s.onHover.enable,n=s.onHover.mode,a=s.onClick.enable,c=s.onClick.mode;i&&o&&X(zo,n)?this._hoverAttract():a&&X(zo,c)&&this._clickAttract()}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;if(!(s.position&&o.onHover.enable||s.clickPosition&&o.onClick.enable))return!1;const n=o.onHover.mode,a=o.onClick.mode;return X(zo,n)||X(zo,a)}loadModeOptions(t,...e){t.attract||(t.attract=new ko);for(const i of e)t.attract.load(i?.attract)}reset(){}}class Lo{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}const Do="bounce";class Ho extends Mi{constructor(t){super(t),this._processBounce=(t,e,i)=>{const s=this.container.particles.quadTree.query(i,(t=>this.isEnabled(t)));for(const o of s)i instanceof yi?ht(ct(o),{position:t,radius:e,mass:e**2*Math.PI/2,velocity:y.origin,factor:y.origin}):i instanceof fi&<(o,it(t,e))},this._processMouseBounce=()=>{const t=this.container,e=10*t.retina.pixelRatio,i=t.interactivity.mouse.position,s=t.retina.bounceModeDistance;!s||s<0||!i||this._processBounce(i,s,new yi(i.x,i.y,s+e))},this._singleSelectorBounce=(t,e)=>{const i=this.container,s=document.querySelectorAll(t);s.length&&s.forEach((t=>{const s=t,o=i.retina.pixelRatio,n={x:(s.offsetLeft+s.offsetWidth/2)*o,y:(s.offsetTop+s.offsetHeight/2)*o},a=s.offsetWidth/2*o,r=10*o,c="circle"===e.type?new yi(n.x,n.y,a+r):new fi(s.offsetLeft*o-r,s.offsetTop*o-r,s.offsetWidth*o+2*r,s.offsetHeight*o+2*r);this._processBounce(n,a,c)}))}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bounce;e&&(t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions.interactivity.events,i=t.interactivity.status===r,s=e.onHover.enable,o=e.onHover.mode,n=e.onDiv;i&&s&&X(Do,o)?this._processMouseBounce():nt(Do,n,((t,e)=>this._singleSelectorBounce(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv;return s.position&&o.onHover.enable&&X(Do,o.onHover.mode)||ot(Do,n)}loadModeOptions(t,...e){t.bounce||(t.bounce=new Lo);for(const i of e)t.bounce.load(i?.bounce)}reset(){}}class Bo{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(t){if(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.mix&&(this.mix=t.mix),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.color){const e=xt(this.color)?void 0:this.color;this.color=dt(t.color,(t=>ce.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class Fo extends Bo{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class Uo extends Bo{load(t){super.load(t),t&&(this.divs=dt(t.divs,(t=>{const e=new Fo;return e.load(t),e})))}}function No(t,e,i,s){if(e>=i){return x(t+(e-i)*s,t,e)}if(e<i){return x(t-(i-e)*s,e,t)}}const qo="bubble";class $o extends Mi{constructor(t){super(t),this._clickBubble=()=>{const t=this.container,e=t.actualOptions,i=t.interactivity.mouse.clickPosition,s=e.interactivity.modes.bubble;if(!s||!i)return;t.bubble||(t.bubble={});const o=t.retina.bubbleModeDistance;if(!o||o<0)return;const n=t.particles.quadTree.queryCircle(i,o,(t=>this.isEnabled(t))),{bubble:a}=t;for(const e of n){if(!a.clicking)continue;e.bubble.inRange=!a.durationEnd;const n=G(e.getPosition(),i),r=((new Date).getTime()-(t.interactivity.mouse.clickTime||0))/1e3;r>s.duration&&(a.durationEnd=!0),r>2*s.duration&&(a.clicking=!1,a.durationEnd=!1);const c={bubbleObj:{optValue:t.retina.bubbleModeSize,value:e.bubble.radius},particlesObj:{optValue:A(e.options.size.value)*t.retina.pixelRatio,value:e.size.value},type:"size"};this._process(e,n,r,c);const h={bubbleObj:{optValue:s.opacity,value:e.bubble.opacity},particlesObj:{optValue:A(e.options.opacity.value),value:e.opacity?.value??1},type:"opacity"};this._process(e,n,r,h),!a.durationEnd&&n<=o?this._hoverBubbleColor(e,n):delete e.bubble.color}},this._hoverBubble=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.bubbleModeDistance;if(!i||i<0||void 0===e)return;const s=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));for(const o of s){o.bubble.inRange=!0;const s=G(o.getPosition(),e),a=1-s/i;s<=i?a>=0&&t.interactivity.status===r&&(this._hoverBubbleSize(o,a),this._hoverBubbleOpacity(o,a),this._hoverBubbleColor(o,a)):this.reset(o),t.interactivity.status===n&&this.reset(o)}},this._hoverBubbleColor=(t,e,i)=>{const s=this.container.actualOptions,o=i??s.interactivity.modes.bubble;if(o){if(!t.bubble.finalColor){const e=o.color;if(!e)return;const i=ut(e);t.bubble.finalColor=Et(i)}if(t.bubble.finalColor)if(o.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?Rt(Ft(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}},this._hoverBubbleOpacity=(t,e,i)=>{const s=this.container.actualOptions,o=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!o)return;const n=t.options.opacity.value,a=No(t.opacity?.value??1,o,A(n),e);void 0!==a&&(t.bubble.opacity=a)},this._hoverBubbleSize=(t,e,i)=>{const s=this.container,o=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===o)return;const n=A(t.options.size.value)*s.retina.pixelRatio,a=No(t.size.value,o,n,e);void 0!==a&&(t.bubble.radius=a)},this._process=(t,e,i,s)=>{const o=this.container,n=s.bubbleObj.optValue,a=o.actualOptions.interactivity.modes.bubble;if(!a||void 0===n)return;const r=a.duration,c=o.retina.bubbleModeDistance,h=s.particlesObj.optValue,l=s.bubbleObj.value,d=s.particlesObj.value||0,u=s.type;if(c&&!(c<0)&&n!==h)if(o.bubble||(o.bubble={}),o.bubble.durationEnd)l&&("size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity);else if(e<=c){if((l??d)!==n){const e=d-i*(d-n)/r;"size"===u&&(t.bubble.radius=e),"opacity"===u&&(t.bubble.opacity=e)}}else"size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity},this._singleSelectorHover=(t,e,i)=>{const s=this.container,o=document.querySelectorAll(e),n=s.actualOptions.interactivity.modes.bubble;n&&o.length&&o.forEach((e=>{const o=e,a=s.retina.pixelRatio,r={x:(o.offsetLeft+o.offsetWidth/2)*a,y:(o.offsetTop+o.offsetHeight/2)*a},c=o.offsetWidth/2*a,h="circle"===i.type?new yi(r.x,r.y,c):new fi(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.offsetHeight*a),l=s.particles.quadTree.query(h,(t=>this.isEnabled(t)));for(const e of l){if(!h.contains(e.getPosition()))continue;e.bubble.inRange=!0;const i=rt(n.divs,o);e.bubble.div&&e.bubble.div===o||(this.clear(e,t,!0),e.bubble.div=o),this._hoverBubbleSize(e,1,i),this._hoverBubbleOpacity(e,1,i),this._hoverBubbleColor(e,1,i)}}))},t.bubble||(t.bubble={}),this.handleClickMode=e=>{e===qo&&(t.bubble||(t.bubble={}),t.bubble.clicking=!0)}}clear(t,e,i){t.bubble.inRange&&!i||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bubble;e&&(t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}async interact(t){const e=this.container.actualOptions.interactivity.events,i=e.onHover,s=e.onClick,o=i.enable,n=i.mode,a=s.enable,r=s.mode,c=e.onDiv;o&&X(qo,n)?this._hoverBubble():a&&X(qo,r)?this._clickBubble():nt(qo,c,((e,i)=>this._singleSelectorHover(t,e,i)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,{onClick:n,onDiv:a,onHover:r}=o,c=ot(qo,a);return!!(c||r.enable&&s.position||n.enable&&s.clickPosition)&&(X(qo,r.mode)||X(qo,n.mode)||c)}loadModeOptions(t,...e){t.bubble||(t.bubble=new Uo);for(const i of e)t.bubble.load(i?.bubble)}reset(t){t.bubble.inRange=!1}}class jo{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class Qo{constructor(){this.distance=80,this.links=new jo,this.radius=60}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}function Wo(t,e,i,s){const o=t.actualOptions.interactivity.modes.connect;if(o)return function(t,e,i,s){const o=Math.floor(i.getRadius()/e.getRadius()),n=e.getFillColor(),a=i.getFillColor();if(!n||!a)return;const r=e.getPosition(),c=i.getPosition(),h=Ft(n,a,e.getRadius(),i.getRadius()),l=t.createLinearGradient(r.x,r.y,c.x,c.y);return l.addColorStop(0,Bt(n,s)),l.addColorStop(o>1?1:o,Ht(h,s)),l.addColorStop(1,Bt(a,s)),l}(e,i,s,o.links.opacity)}function Zo(t,e,i){t.canvas.draw((s=>{const o=Wo(t,s,e,i);if(!o)return;const n=e.getPosition(),a=i.getPosition();!function(t,e,i,s,o){Qt(t,s,o),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,o,n,a)}))}class Xo extends Mi{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.connect;e&&(t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}async interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const e=t.interactivity.mouse.position;if(!t.retina.connectModeDistance||t.retina.connectModeDistance<0||!t.retina.connectModeRadius||t.retina.connectModeRadius<0||!e)return;const i=Math.abs(t.retina.connectModeRadius),s=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));let o=0;for(const e of s){const i=e.getPosition();for(const n of s.slice(o+1)){const s=n.getPosition(),o=Math.abs(t.retina.connectModeDistance),a=Math.abs(i.x-s.x),r=Math.abs(i.y-s.y);a<o&&r<o&&Zo(t,e,n)}++o}}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return!(!s.onHover.enable||!i.position)&&X("connect",s.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Qo);for(const i of e)t.connect.load(i?.connect)}reset(){}}class Yo{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){t&&(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Jo{constructor(){this.distance=100,this.links=new Yo}get lineLinked(){return this.links}set lineLinked(t){this.links=t}get line_linked(){return this.links}set line_linked(t){this.links=t}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links??t.lineLinked??t.line_linked))}}function Ko(t,e,i,s,o){t.canvas.draw((t=>{const n=e.getPosition();!function(t,e,i,s,o,n){Qt(t,i,s),t.strokeStyle=Ht(o,n),t.lineWidth=e,t.stroke()}(t,e.retina.linksWidth??0,n,o,i,s)}))}class tn extends Mi{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.grab;e&&(t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions.interactivity;if(!e.modes.grab||!e.events.onHover.enable||t.interactivity.status!==r)return;const i=t.interactivity.mouse.position;if(!i)return;const s=t.retina.grabModeDistance;if(!s||s<0)return;const o=t.particles.quadTree.queryCircle(i,s,(t=>this.isEnabled(t)));for(const n of o){const o=G(n.getPosition(),i);if(o>s)continue;const a=e.modes.grab.links,r=a.opacity,c=r-o*r/s;if(c<=0)continue;const h=a.color??n.options.links?.color;if(!t.particles.grabLineColor&&h){const i=e.modes.grab.links;t.particles.grabLineColor=Nt(h,i.blink,i.consent)}const l=Ut(n,void 0,t.particles.grabLineColor);l&&Ko(t,n,l,c,i)}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&X("grab",s.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new Jo);for(const i of e)t.grab.load(i?.grab)}reset(){}}class en extends Mi{constructor(t){super(t),this.handleClickMode=t=>{if("pause"!==t)return;const e=this.container;e.getAnimationStatus()?e.pause():e.play()}}clear(){}init(){}async interact(){}isEnabled(){return!0}reset(){}}class sn{constructor(){this.default=!0,this.groups=[],this.quantity=4}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=M(t)}load(t){if(!t)return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map((t=>t))),this.groups.length||(this.default=!0);const e=t.quantity??t.particles_nb;void 0!==e&&(this.quantity=M(e))}}class on extends Mi{constructor(t){super(t),this.handleClickMode=t=>{if("push"!==t)return;const e=this.container,i=e.actualOptions.interactivity.modes.push;if(!i)return;const s=O(i.quantity);if(s<=0)return;const o=K([void 0,...i.groups]),n=void 0!==o?e.actualOptions.particles.groups[o]:void 0;e.particles.push(s,e.interactivity.mouse,n,o)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new sn);for(const i of e)t.push.load(i?.push)}reset(){}}class nn{constructor(){this.quantity=2}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=M(t)}load(t){if(!t)return;const e=t.quantity??t.particles_nb;void 0!==e&&(this.quantity=M(e))}}class an extends Mi{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const s=O(i.interactivity.modes.remove.quantity);e.particles.removeQuantity(s)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new nn);for(const i of e)t.remove.load(i?.remove)}reset(){}}class rn{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing="ease-out-quad"}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed))}}class cn extends rn{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class hn extends rn{load(t){super.load(t),t&&(this.divs=dt(t.divs,(t=>{const e=new cn;return e.load(t),e})))}}const ln="repulse";class dn extends Mi{constructor(t,e){super(e),this._clickRepulse=()=>{const t=this.container,e=t.actualOptions.interactivity.modes.repulse;if(!e)return;const i=t.repulse||{particles:[]};if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const s=t.retina.repulseModeDistance;if(!s||s<0)return;const o=Math.pow(s/6,3),n=t.interactivity.mouse.clickPosition;if(void 0===n)return;const a=new yi(n.x,n.y,o),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const t of r){const{dx:s,dy:a,distance:r}=V(n,t.position),c=r**2,h=-o*e.speed/c;if(c<=o){i.particles.push(t);const e=y.create(s,a);e.length=h,t.velocity.setTo(e)}}}else if(!1===i.clicking){for(const t of i.particles)t.velocity.setTo(t.initialVelocity);i.particles=[]}},this._hoverRepulse=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.repulseModeDistance;!i||i<0||!e||this._processRepulse(e,i,new yi(e.x,e.y,i))},this._processRepulse=(t,e,i,s)=>{const o=this.container,n=o.particles.quadTree.query(i,(t=>this.isEnabled(t))),a=o.actualOptions.interactivity.modes.repulse;if(!a)return;const{easing:r,speed:c,factor:h,maxSpeed:l}=a,d=_(r),u=(s?.speed??c)*h;for(const i of n){const{dx:s,dy:o,distance:n}=V(i.position,t),a=x(d(1-n/e)*u,0,l),r=y.create(0===n?u:s/n*a,0===n?u:o/n*a);i.position.addTo(r)}},this._singleSelectorRepulse=(t,e)=>{const i=this.container,s=i.actualOptions.interactivity.modes.repulse;if(!s)return;const o=document.querySelectorAll(t);o.length&&o.forEach((t=>{const o=t,n=i.retina.pixelRatio,a={x:(o.offsetLeft+o.offsetWidth/2)*n,y:(o.offsetTop+o.offsetHeight/2)*n},r=o.offsetWidth/2*n,c="circle"===e.type?new yi(a.x,a.y,r):new fi(o.offsetLeft*n,o.offsetTop*n,o.offsetWidth*n,o.offsetHeight*n),h=rt(s.divs,o);this._processRepulse(a,r,c,h)}))},this._engine=t,e.repulse||(e.repulse={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.repulse;if(!i||t!==ln)return;e.repulse||(e.repulse={particles:[]});const s=e.repulse;s.clicking=!0,s.count=0;for(const t of e.repulse.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);s.particles=[],s.finish=!1,setTimeout((()=>{e.destroyed||(s.clicking=!1)}),1e3*i.duration)}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.repulse;e&&(t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,o=s.onHover,n=o.enable,a=o.mode,c=s.onClick,h=c.enable,l=c.mode,d=s.onDiv;i&&n&&X(ln,a)?this._hoverRepulse():h&&X(ln,l)?this._clickRepulse():nt(ln,d,((t,e)=>this._singleSelectorRepulse(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv,a=o.onHover,r=o.onClick,c=ot(ln,n);if(!(c||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const h=a.mode,l=r.mode;return X(ln,h)||X(ln,l)||c}loadModeOptions(t,...e){t.repulse||(t.repulse=new hn);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class un{constructor(){this.factor=3,this.radius=200}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class pn extends Mi{constructor(t){super(t)}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.slow;e&&(t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}async interact(){}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&X("slow",s.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new un);for(const i of e)t.slow.load(i?.slow)}reset(t){t.slow.inRange=!1;const e=this.container,i=e.actualOptions,s=e.interactivity.mouse.position,o=e.retina.slowModeRadius,n=i.interactivity.modes.slow;if(!n||!o||o<0||!s)return;const a=G(s,t.getPosition()),r=a/o,c=n.factor,{slow:h}=t;a>o||(h.inRange=!0,h.factor=r/c)}}const gn=[0,4,2,1],fn=[8,8,4,2];class yn{constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce(((t,e)=>t+String.fromCharCode(e)),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t="",e=0;do{e=this.data[this.pos++];for(let i=e;--i>=0;t+=String.fromCharCode(this.data[this.pos++]));}while(0!==e);return t}readSubBlocksBin(){let t=0,e=0;for(let i=0;0!==(t=this.data[this.pos+i]);i+=t+1)e+=t;const i=new Uint8Array(e);for(let e=0;0!==(t=this.data[this.pos++]);)for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(;0!==this.data[this.pos];this.pos+=this.data[this.pos]+1);this.pos++}}function wn(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}async function vn(t,e,i,s,o,n){switch(t.nextByte()){case 59:return!0;case 44:await async function(t,e,i,s,o,n){const a=e.frames[s(!0)];a.left=t.nextTwoBytes(),a.top=t.nextTwoBytes(),a.width=t.nextTwoBytes(),a.height=t.nextTwoBytes();const r=t.nextByte(),c=128==(128&r),h=64==(64&r);a.sortFlag=32==(32&r),a.reserved=(24&r)>>>3;const l=1<<1+(7&r);c&&(a.localColorTable=wn(t,l));const d=t=>{const{r:s,g:n,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return{r:s,g:n,b:r,a:t===o(null)?i?~~((s+n+r)/3):0:255}},u=(()=>{try{return new ImageData(a.width,a.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p,y=(t,e)=>{const i=t>>>3,s=7&t;return(g[i]+(g[i+1]<<8)+(g[i+2]<<16)&(1<<e)-1<<s)>>>s};if(h){for(let i=0,o=p+1,r=0,c=[[0]],h=0;h<4;h++){if(gn[h]<a.height)for(let t=0,e=0;;){const s=i;if(i=y(r,o),r+=o+1,i===f){o=p+1,c.length=f+2;for(let t=0;t<c.length;t++)c[t]=t<f?[t]:[]}else{i>=c.length?c.push(c[s].concat(c[s][0])):s!==f&&c.push(c[s].concat(c[i][0]));for(let s=0;s<c[i].length;s++){const{r:o,g:n,b:r,a:l}=d(c[i][s]);u.data.set([o,n,r,l],gn[h]*a.width+fn[h]*e+t%(4*a.width)),t+=4}c.length===1<<o&&o<12&&o++}if(t===4*a.width*(e+1)&&(e++,gn[h]+fn[h]*e>=a.height))break}n?.(t.pos/(t.data.length-1),s(!1)+1,u,{x:a.left,y:a.top},{width:e.width,height:e.height})}a.image=u,a.bitmap=await createImageBitmap(u)}else{for(let t=0,e=p+1,i=0,s=[[0]],o=-4;;){const n=t;if(t=y(i,e),i+=e,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=s.length?s.push(s[n].concat(s[n][0])):n!==f&&s.push(s[n].concat(s[t][0]));for(let e=0;e<s[t].length;e++){const{r:i,g:n,b:a,a:r}=d(s[t][e]);u.data.set([i,n,a,r],o+=4)}s.length>=1<<e&&e<12&&e++}}a.image=u,a.bitmap=await createImageBitmap(u),n?.((t.pos+1)/t.data.length,s(!1)+1,a.image,{x:a.left,y:a.top},{width:e.width,height:e.height})}}(t,e,i,s,o,n);break;case 33:await async function(t,e,i,s){switch(t.nextByte()){case 249:{const o=e.frames[i(!1)];t.pos++;const n=t.nextByte();o.GCreserved=(224&n)>>>5,o.disposalMethod=(28&n)>>>2,o.userInputDelayFlag=2==(2&n);const a=1==(1&n);o.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&s(r),t.pos++;break}case 255:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case 254:e.comments.push([i(!1),t.readSubBlocks()]);break;case 1:if(0===e.globalColorTable.length)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()}}(t,e,s,o);break;default:throw new EvalError("undefined block found")}return!1}const mn=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function _n(t){return new Promise((e=>{t.loading=!0;const 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,N().error(`${g} loading image: ${t.source}`),e()})),i.src=t.source}))}async function bn(t){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i){i||(i=!1);const s=await fetch(t);if(!s.ok&&404===s.status)throw new EvalError("file not found");const o=await s.arrayBuffer(),n={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},a=new yn(new Uint8ClampedArray(o));if("GIF89a"!==a.getString(6))throw new Error("not a supported GIF file");n.width=a.nextTwoBytes(),n.height=a.nextTwoBytes();const r=a.nextByte(),c=128==(128&r);n.colorRes=(112&r)>>>4,n.sortFlag=8==(8&r);const h=1<<1+(7&r),l=a.nextByte();n.pixelAspectRatio=a.nextByte(),0!==n.pixelAspectRatio&&(n.pixelAspectRatio=(n.pixelAspectRatio+15)/64),c&&(n.globalColorTable=wn(a,h));const d=(()=>{try{return new ImageData(n.width,n.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==d)throw new Error("GIF frame size is to large");const{r:u,g:p,b:g}=n.globalColorTable[l];d.data.set(c?[u,p,g,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);n.backgroundImage=d;let f=-1,y=!0,w=-1;const v=t=>(t&&(y=!0),f),m=t=>(null!=t&&(w=t),w);try{do{y&&(n.frames.push({left:0,top:0,width:0,height:0,disposalMethod:0,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),f++,w=-1,y=!1)}while(!await vn(a,n,i,v,m,e));n.frames.length--;for(const t of n.frames){if(t.userInputDelayFlag&&0===t.delayTime){n.totalTime=1/0;break}n.totalTime+=t.delayTime}return n}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${f} "${t.message}"`);throw t}}(t.source),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}(t.gifData)??0,0===t.gifLoopCount&&(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await _n(t)}async function Sn(t){if("svg"!==t.type)return void await _n(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(N().error(`${g} Image not found`),t.error=!0),t.loading=!1}function xn(t,e,i,s){const o=function(t,e,i){const{svgData:s}=t;if(!s)return"";const o=Bt(e,i);if(s.includes("fill"))return s.replace(mn,(()=>o));const n=s.indexOf(">");return`${s.substring(0,n)} fill="${o}"${s.substring(n)}`}(t,i,s.opacity?.value??1),n={color:i,gif:e.gif,data:{...t,svgData:o},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise((e=>{const i=new Blob([o],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,a=s.createObjectURL(i),r=new Image;r.addEventListener("load",(()=>{n.loaded=!0,n.element=r,e(n),s.revokeObjectURL(a)})),r.addEventListener("error",(async()=>{s.revokeObjectURL(a);const i={...t,error:!1,loading:!0};await _n(i),n.loaded=!0,n.element=i.element,e(n)})),r.src=a}))}class Pn{constructor(t){this.loadImageShape=async t=>{if(!this._engine.loadImage)throw new Error(`${g} image shape not initialized`);await this._engine.loadImage({gif:t.gif,name:t.name,replaceColor:t.replaceColor??!1,src:t.src})},this._engine=t}addImage(t){this._engine.images||(this._engine.images=[]),this._engine.images.push(t)}draw(t){const{context:e,radius:i,particle:s,opacity:o,delta:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=o,a.gif&&a.gifData){const t=new OffscreenCanvas(a.gifData.width,a.gifData.height),o=t.getContext("2d");if(!o)throw new Error("could not create offscreen canvas context");o.imageSmoothingQuality="low",o.imageSmoothingEnabled=!1,o.clearRect(0,0,t.width,t.height),void 0===s.gifLoopCount&&(s.gifLoopCount=a.gifLoopCount??0);let r=s.gifFrame??0;const c={x:.5*-a.gifData.width,y:.5*-a.gifData.height},h=a.gifData.frames[r];if(void 0===s.gifTime&&(s.gifTime=0),!h.bitmap)return;switch(e.scale(i/a.gifData.width,i/a.gifData.height),h.disposalMethod){case 4:case 5:case 6:case 7:case 0:o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y),o.clearRect(0,0,t.width,t.height);break;case 1:o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y);break;case 2:o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y),o.clearRect(0,0,t.width,t.height),0===a.gifData.globalColorTable.length?o.putImageData(a.gifData.frames[0].image,c.x+h.left,c.y+h.top):o.putImageData(a.gifData.backgroundImage,c.x,c.y);break;case 3:{const i=o.getImageData(0,0,t.width,t.height);o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y),o.clearRect(0,0,t.width,t.height),o.putImageData(i,0,0)}}if(s.gifTime+=n.value,s.gifTime>h.delayTime){if(s.gifTime-=h.delayTime,++r>=a.gifData.frames.length){if(--s.gifLoopCount<=0)return;r=0,o.clearRect(0,0,t.width,t.height)}s.gifFrame=r}e.scale(a.gifData.width/i,a.gifData.height/i)}else if(r){const t=a.ratio,s={x:-i,y:-i};e.drawImage(r,s.x,s.y,2*i,2*i/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(e.preload&&this._engine.loadImage)for(const t of e.preload)await this._engine.loadImage(t)}loadShape(t){if("image"!==t.shape&&"images"!==t.shape)return;this._engine.images||(this._engine.images=[]);const e=t.shapeData;if(!e)return;this._engine.images.find((t=>t.name===e.name||t.source===e.src))||this.loadImageShape(e).then((()=>{this.loadShape(t)}))}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;this._engine.images||(this._engine.images=[]);const i=this._engine.images,s=e.shapeData;if(!s)return;const o=e.getFillColor(),n=i.find((t=>t.name===s.name||t.source===s.src));if(!n)return;const a=s.replaceColor??n.replaceColor;n.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{let t;t=n.svgData&&o?await xn(n,s,o,e):{color:o,data:n,element:n.element,gif:n.gif,gifData:n.gifData,gifLoopCount:n.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:n.ratio??1,replaceColor:a,source:s.src},t.ratio||(t.ratio=1);const i={image:t,fill:s.fill??e.shapeFill,close:s.close??e.shapeClose};e.image=i.image,e.shapeFill=i.fill,e.shapeClose=i.close})()}}class Cn{constructor(){this.src="",this.gif=!1}load(t){t&&(void 0!==t.gif&&(this.gif=t.gif),void 0!==t.height&&(this.height=t.height),void 0!==t.name&&(this.name=t.name),void 0!==t.replaceColor&&(this.replaceColor=t.replaceColor),void 0!==t.src&&(this.src=t.src),void 0!==t.width&&(this.width=t.width))}}class On{constructor(t){this.id="imagePreloader",this._engine=t}getPlugin(){return{}}loadOptions(t,e){if(!e||!e.preload)return;t.preload||(t.preload=[]);const i=t.preload;for(const t of e.preload){const e=i.find((e=>e.name===t.name||e.src===t.src));if(e)e.load(t);else{const e=new Cn;e.load(t),i.push(e)}}}needsPlugin(){return!0}}async function Tn(t,e=!0){!function(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${g} no image source provided`);if(t.images||(t.images=[]),!t.images.find((t=>t.name===e.name||t.source===e.src)))try{const i={gif:e.gif??!1,name:e.name??e.src,source:e.src,type:e.src.substring(e.src.length-3),error:!1,loading:!0,replaceColor:e.replaceColor,ratio:e.width&&e.height?e.width/e.height:void 0};t.images.push(i);const s=e.gif?bn:e.replaceColor?Sn:_n;await s(i)}catch{throw new Error(`${g} ${e.name??e.src} not found`)}})}(t);const i=new On(t);await t.addPlugin(i,e),await t.addShape(["image","images"],new Pn(t),e)}class An extends Ee{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Mn extends Ee{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Vn{constructor(){this.count=0,this.delay=new An,this.duration=new Mn}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Gn{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?O(i.delay.value)*(i.delay.sync?1:S())/e.retina.reduceFactor*1e3:0,delayTime:0,duration:e.retina.reduceFactor?O(i.duration.value)*(i.duration.sync?1:S())/e.retina.reduceFactor*1e3:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.life&&(t.spawning=t.life.delay>0))}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.life||(t.life=new Vn);for(const i of e)t.life.load(i?.life)}update(t,e){if(!this.isEnabled(t)||!t.life)return;const i=t.life;let s=!1;if(t.spawning){if(i.delayTime+=e.value,!(i.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,i.delayTime=0,i.time=0}if(-1===i.duration)return;if(t.spawning)return;if(s?i.time=0:i.time+=e.value,i.time<i.duration)return;if(i.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=this.container.canvas.size,n=M(0,o.width),a=M(0,o.width);t.position.x=C(n),t.position.y=C(a),t.spawning=!0,i.delayTime=0,i.time=0,t.reset();const r=t.options.life;r&&(i.delay=1e3*O(r.delay.value),i.duration=1e3*O(r.duration.value))}}class En{draw(t){const{context:e,particle:i,radius:s}=t,o=i.shapeData;e.moveTo(-s/2,0),e.lineTo(s/2,0),e.lineCap=o?.cap??"butt"}getSidesCount(){return 1}}class Rn{init(){}isEnabled(t){return!$()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions.interactivity.events.onHover.parallax;if($()||!i.enable)return;const s=i.force,o=e.interactivity.mouse.position;if(!o)return;const n=e.canvas.size,a=.5*n.width,r=.5*n.height,c=i.smooth,h=t.getRadius()/s,l=(o.x-a)*h,d=(o.y-r)*h,{offset:u}=t;u.x+=(l-u.x)/c,u.y+=(d-u.y)/c}}class kn extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=O(t.options.move.attract.distance)*e.retina.pixelRatio);const i=t.attractDistance,s=t.getPosition(),o=e.particles.quadTree.queryCircle(s,i);for(const e of o){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:o,dy:n}=V(s,i),a=t.options.move.attract.rotate,r=o/(1e3*a.x),c=n/(1e3*a.y),h=e.size.value/t.size.value,l=1/h;t.velocity.x-=r*h,t.velocity.y-=c*h,e.velocity.x+=r*l,e.velocity.y+=c*l}}isEnabled(t){return t.options.move.attract.enable}reset(){}}function zn(t,e,i,s,o,n){const a=x(t.options.collisions.absorb.speed*o.factor/10,0,s);t.size.value+=a/2,i.size.value-=a,s<=n&&(i.size.value=0,i.destroy())}const In=t=>{void 0===t.collisionMaxSpeed&&(t.collisionMaxSpeed=O(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function Ln(t,e){ht(ct(t),ct(e)),In(t),In(e)}function Dn(t,e,i,s){switch(t.options.collisions.mode){case"absorb":!function(t,e,i,s){const o=t.getRadius(),n=e.getRadius();void 0===o&&void 0!==n?t.destroy():void 0!==o&&void 0===n?e.destroy():void 0!==o&&void 0!==n&&(o>=n?zn(t,0,e,n,i,s):zn(e,0,t,o,i,s))}(t,e,i,s);break;case"bounce":Ln(t,e);break;case"destroy":!function(t,e){t.unbreakable||e.unbreakable||Ln(t,e),void 0===t.getRadius()&&void 0!==e.getRadius()?t.destroy():void 0!==t.getRadius()&&void 0===e.getRadius()?e.destroy():void 0!==t.getRadius()&&void 0!==e.getRadius()&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class Hn extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t,e){if(t.destroyed||t.spawning)return;const i=this.container,s=t.getPosition(),o=t.getRadius(),n=i.particles.quadTree.queryCircle(s,2*o);for(const a of n){if(t===a||!a.options.collisions.enable||t.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const n=a.getPosition(),r=a.getRadius();if(Math.abs(Math.round(s.z)-Math.round(n.z))>o+r)continue;G(s,n)>o+r||Dn(t,a,e,i.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class Bn extends yi{constructor(t,e,i,s){super(t,e,i),this.canvasSize=s,this.canvasSize={...s}}contains(t){const{width:e,height:i}=this.canvasSize,{x:s,y:o}=t;return super.contains(t)||super.contains({x:s-e,y:o})||super.contains({x:s-e,y:o-i})||super.contains({x:s,y:o-i})}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new yi(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new fi(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class Fn{constructor(){this.blur=5,this.color=new ce,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=ce.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Un{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Nn{constructor(){this.blink=!1,this.color=new ce,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Fn,this.triangles=new Un,this.width=1,this.warp=!1}load(t){t&&(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=ce.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}function qn(t,e,i,s,o){const{dx:n,dy:a,distance:r}=V(t,e);if(!o||r<=i)return r;const c={x:Math.abs(n),y:Math.abs(a)},h=Math.min(c.x,s.width-c.x),l=Math.min(c.y,s.height-c.y);return Math.sqrt(h**2+l**2)}class $n extends Vi{constructor(t){super(t),this._setColor=t=>{if(!t.options.links)return;const e=this.linkContainer,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);if(s)return;s=Nt(i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s)},this.linkContainer=t}clear(){}init(){this.linkContainer.particles.linksColor=void 0,this.linkContainer.particles.linksColors=new Map}async interact(t){if(!t.options.links)return;t.links=[];const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<0||e.y<0||e.x>s.width||e.y>s.height)return;const o=t.options.links,n=o.opacity,a=t.retina.linksDistance??0,r=o.warp,c=r?new Bn(e.x,e.y,a,s):new yi(e.x,e.y,a),h=i.particles.quadTree.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||o.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some((t=>t.destination===i))||i.links.some((e=>e.destination===t)))continue;const h=i.getPosition();if(h.x<0||h.y<0||h.x>s.width||h.y>s.height)continue;const l=qn(e,h,a,s,r&&c.warp);if(l>a)continue;const d=(1-l/a)*n;this._setColor(t),t.links.push({destination:i,opacity:d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links||(t.links=new Nn);for(const i of e)t.links.load(i?.links??i?.lineLinked??i?.line_linked)}reset(){}}function jn(t,e){const i=((s=t.map((t=>t.id))).sort(((t,e)=>t-e)),s.join("_"));var s;let o=e.get(i);return void 0===o&&(o=S(),e.set(i,o)),o}class Qn{constructor(t){this.container=t,this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const s=this.container,o=s.actualOptions,n=e.destination,a=t.getPosition(),r=n.getPosition();let c=e.opacity;s.canvas.draw((e=>{let h;const l=t.options.twinkle?.lines;if(l?.enable){const t=l.frequency,e=Mt(l.color);S()<t&&e&&(h=e,c=O(l.opacity))}if(!h){const e=void 0!==i.id?s.particles.linksColors.get(i.id):s.particles.linksColor;h=Ut(t,n,e)}if(!h)return;const d=t.retina.linksWidth??0,u=t.retina.linksDistance??0,{backgroundMask:p}=o;!function(t){let e=!1;const{begin:i,end:s,maxDistance:o,context:n,canvasSize:a,width:r,backgroundMask:c,colorLine:h,opacity:l,links:d}=t;if(G(i,s)<=o)Qt(n,i,s),e=!0;else if(d.warp){let t,r;const c=V(i,{x:s.x-a.width,y:s.y});if(c.distance<=o){const e=i.y-c.dy/c.dx*i.x;t={x:0,y:e},r={x:a.width,y:e}}else{const e=V(i,{x:s.x,y:s.y-a.height});if(e.distance<=o){const s=-(i.y-e.dy/e.dx*i.x)/(e.dy/e.dx);t={x:s,y:0},r={x:s,y:a.height}}else{const e=V(i,{x:s.x-a.width,y:s.y-a.height});if(e.distance<=o){const s=i.y-e.dy/e.dx*i.x;t={x:-s/(e.dy/e.dx),y:s},r={x:t.x+a.width,y:t.y+a.height}}}}t&&r&&(Qt(n,i,t),Qt(n,s,r),e=!0)}if(!e)return;n.lineWidth=r,c.enable&&(n.globalCompositeOperation=c.composite),n.strokeStyle=Ht(h,l);const{shadow:u}=d;if(u.enable){const t=Mt(u.color);t&&(n.shadowBlur=u.blur,n.shadowColor=Ht(t))}n.stroke()}({context:e,width:d,begin:a,end:r,maxDistance:u,canvasSize:s.canvas.size,links:i,backgroundMask:p,colorLine:h,opacity:c})}))},this._drawLinkTriangle=(t,e,i)=>{const s=t.options.links;if(!s?.enable)return;const o=s.triangles;if(!o.enable)return;const n=this.container,a=n.actualOptions,r=e.destination,c=i.destination,h=o.opacity??(e.opacity+i.opacity)/2;h<=0||n.canvas.draw((e=>{const i=t.getPosition(),l=r.getPosition(),d=c.getPosition(),u=t.retina.linksDistance??0;if(G(i,l)>u||G(d,l)>u||G(d,i)>u)return;let p=Mt(o.color);if(!p){const e=void 0!==s.id?n.particles.linksColors.get(s.id):n.particles.linksColor;p=Ut(t,r,e)}p&&function(t){const{context:e,pos1:i,pos2:s,pos3:o,backgroundMask:n,colorTriangle:a,opacityTriangle:r}=t;!function(t,e,i,s){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(s.x,s.y),t.closePath()}(e,i,s,o),n.enable&&(e.globalCompositeOperation=n.composite),e.fillStyle=Ht(a,r),e.fill()}({context:e,pos1:i,pos2:l,pos3:d,backgroundMask:a.backgroundMask,colorTriangle:p,opacityTriangle:h})}))},this._drawTriangles=(t,e,i,s)=>{const o=i.destination;if(!t.links?.triangles.enable||!o.options.links?.triangles.enable)return;const n=o.links?.filter((t=>{const e=this._getLinkFrequency(o,t.destination);return o.options.links&&e<=o.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(n?.length)for(const s of n){const n=s.destination;this._getTriangleFrequency(e,o,n)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>jn([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>jn([t,e,i],this._freqs.triangles),this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i||i.length<=0)return;const o=i.filter((t=>s.links&&this._getLinkFrequency(e,t.destination)<=s.links.frequency));for(const t of o)this._drawTriangles(s,e,t,o),t.opacity>0&&(e.retina.linksWidth??0)>0&&this._drawLinkLine(e,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map}particleCreated(t){if(t.links=[],!t.options.links)return;const e=this.container.retina.pixelRatio,{retina:i}=t,{distance:s,width:o}=t.options.links;i.linksDistance=s*e,i.linksWidth=o*e}particleDestroyed(t){t.links=[]}}class Wn{constructor(){this.id="links"}getPlugin(t){return new Qn(t)}loadOptions(){}needsPlugin(){return!0}}async function Zn(t,e=!0){await async function(t,e=!0){await t.addInteractor("particlesLinks",(t=>new $n(t)),e)}(t,e),await async function(t,e=!0){const i=new Wn;await t.addPlugin(i,e)}(t,e)}class Xn{draw(t){const{context:e,particle:i,radius:s}=t,o=this.getCenter(i,s),n=this.getSidesData(i,s),a=n.count.numerator*n.count.denominator,r=n.count.numerator/n.count.denominator,c=180*(r-2)/r,h=Math.PI-Math.PI*c/180;if(e){e.beginPath(),e.translate(o.x,o.y),e.moveTo(0,0);for(let t=0;t<a;t++)e.lineTo(n.length,0),e.translate(n.length,0),e.rotate(h)}}getSidesCount(t){const e=t.shapeData;return Math.round(O(e?.sides??5))}}class Yn extends Xn{getCenter(t,e){return{x:-e/(t.sides/3.5),y:-e/.76}}getSidesData(t,e){const i=t.sides;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Jn extends Xn{getCenter(t,e){return{x:-e,y:e/1.66}}getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:2,numerator:3},length:2*e}}}async function Kn(t,e=!0){await async function(t,e=!0){await t.addShape("polygon",new Yn,e)}(t,e),await async function(t,e=!0){await t.addShape("triangle",new Jn,e)}(t,e)}class ta{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class ea extends Ee{constructor(){super(),this.animation=new ta,this.direction="clockwise",this.path=!1,this.value=0}load(t){t&&(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class ia{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:O(e.value)*Math.PI/180},t.pathRotation=e.path;let i=e.direction;if("random"===i){i=Math.floor(2*S())>0?"counter-clockwise":"clockwise"}switch(i){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const s=e.animation;s.enable&&(t.rotate.decay=1-O(s.decay),t.rotate.velocity=O(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=S())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&e.animation.enable&&!e.path)}loadOptions(t,...e){t.rotate||(t.rotate=new ea);for(const i of e)t.rotate.load(i?.rotate)}update(t,e){this.isEnabled(t)&&(!function(t,e){const i=t.rotate,s=t.options.rotate;if(!i||!s)return;const o=s.animation,n=(i.velocity??0)*e.factor,a=2*Math.PI,r=i.decay??1;o.enable&&("increasing"===i.status?(i.value+=n,i.value>a&&(i.value-=a)):(i.value-=n,i.value<0&&(i.value+=a)),i.velocity&&1!==r&&(i.velocity*=r))}(t,e),t.rotation=t.rotate?.value??0)}}const sa=Math.sqrt(2);class oa{draw(t){const{context:e,radius:i}=t,s=i/sa,o=2*s;e.rect(-s,-s,o,o)}getSidesCount(){return 4}}class na{draw(t){const{context:e,particle:i,radius:s}=t,o=i.sides,n=i.starInset??2;e.moveTo(0,0-s);for(let t=0;t<o;t++)e.rotate(Math.PI/o),e.lineTo(0,0-s*n),e.rotate(Math.PI/o),e.lineTo(0,0-s)}getSidesCount(t){const e=t.shapeData;return Math.round(O(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=O(i?.inset??2)}}function aa(t,e,i,s,o){if(!e||!i.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=t.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=C(i.offset),a=(e.velocity??0)*t.factor+3.6*n,r=e.decay??1;o&&"increasing"!==e.status?(e.value-=a,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status="increasing",e.value+=e.value)):(e.value+=a,e.value>s&&(e.loops||(e.loops=0),e.loops++,o&&(e.status="decreasing",e.value-=e.value%s))),e.velocity&&1!==r&&(e.velocity*=r),e.value>s&&(e.value%=s)}class ra{constructor(t){this.container=t}init(t){const e=this.container,i=t.options,s=ut(i.stroke,t.id,i.reduceDuplicates);t.strokeWidth=O(s.width)*e.retina.pixelRatio,t.strokeOpacity=O(s.opacity??1),t.strokeAnimation=s.color?.animation;const o=Et(s.color)??t.getFillColor();o&&(t.strokeColor=$t(o,t.strokeAnimation,e.retina.reduceFactor))}isEnabled(t){const e=t.strokeAnimation,{strokeColor:i}=t;return!t.destroyed&&!t.spawning&&!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable)}update(t,e){this.isEnabled(t)&&function(t,e){if(!t.strokeColor||!t.strokeAnimation)return;const{h:i,s,l:o}=t.strokeColor,{h:n,s:a,l:r}=t.strokeAnimation;i&&aa(e,i,n,360,!1),s&&aa(e,s,a,100,!0),o&&aa(e,o,r,100,!0)}(t,e)}}const ca=["text","character","char","multiline-text"];class ha{constructor(){this._drawLine=(t,e,i,s,o,n)=>{const a={x:-(e.length*i/2),y:i/2};n?t.fillText(e,a.x,a.y+2*i*o):t.strokeText(e,a.x,a.y+2*i*o)}}draw(t){const{context:e,particle:i,radius:s,opacity:o}=t,n=i.shapeData;if(!n)return;const a=n.value;if(void 0===a)return;void 0===i.text&&(i.text=ut(a,i.randomIndexData));const r=i.text,c=n.style??"",h=n.weight??"400",l=2*Math.round(s),d=n.font??"Verdana",u=i.shapeFill,p=r?.split("\n");if(p){e.font=`${c} ${h} ${l}px "${d}"`,e.globalAlpha=o;for(let t=0;t<p.length;t++)this._drawLine(e,p[t],s,o,t,u);e.globalAlpha=1}}async init(t){const e=t.actualOptions;if(ca.find((t=>X(t,e.particles.shape.type)))){const t=ca.map((t=>e.particles.shape.options[t])).find((t=>!!t)),i=[];dt(t,(t=>{i.push(Y(t.font,t.weight))})),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!ca.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;void 0!==s&&(e.text=ut(s,e.randomIndexData))}}async function la(t,e=!0){_o(t),await async function(t,e=!0){await t.addMover("parallax",(()=>new Rn),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalAttract",(e=>new Io(t,e)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBounce",(t=>new Ho(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBubble",(t=>new $o(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalConnect",(t=>new Xo(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalGrab",(t=>new tn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPause",(t=>new en(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPush",(t=>new on(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRemove",(t=>new an(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRepulse",(e=>new dn(t,e)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalSlow",(t=>new pn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesAttract",(t=>new kn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesCollisions",(t=>new Hn(t)),e)}(t,!1),await Zn(t,!1),await async function(){m("ease-in-quad",(t=>t**2)),m("ease-out-quad",(t=>1-(1-t)**2)),m("ease-in-out-quad",(t=>t<.5?2*t**2:1-(-2*t+2)**2/2))}(),await Tn(t,!1),await async function(t,e=!0){await t.addShape("line",new En,e)}(t,!1),await Kn(t,!1),await async function(t,e=!0){await t.addShape(["edge","square"],new oa,e)}(t,!1),await async function(t,e=!0){await t.addShape("star",new na,e)}(t,!1),await async function(t,e=!0){await t.addShape(ca,new ha,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("life",(t=>new Gn(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("rotate",(t=>new ia(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("strokeColor",(t=>new ra(t)),e)}(t,!1),await Ro(t,e)}class da{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class ua extends Ee{constructor(){super(),this.animation=new da,this.direction="clockwise",this.enable=!1,this.value=0}load(t){super.load(t),t&&(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}class pa{constructor(t){this.container=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(t){const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:O(e.value)*Math.PI/180,sinDirection:S()>=.5?1:-1,cosDirection:S()>=.5?1:-1};let i=e.direction;if("random"===i){i=Math.floor(2*S())>0?"counter-clockwise":"clockwise"}switch(i){case"counter-clockwise":case"counterClockwise":t.tilt.status="decreasing";break;case"clockwise":t.tilt.status="increasing"}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-O(s.decay),t.tilt.velocity=O(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.tilt.velocity*=S()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt||(t.tilt=new ua);for(const i of e)t.tilt.load(i?.tilt)}update(t,e){this.isEnabled(t)&&function(t,e){if(!t.tilt||!t.options.tilt)return;const i=t.options.tilt.animation,s=(t.tilt.velocity??0)*e.factor,o=2*Math.PI,n=t.tilt.decay??1;i.enable&&("increasing"===t.tilt.status?(t.tilt.value+=s,t.tilt.value>o&&(t.tilt.value-=o)):(t.tilt.value-=s,t.tilt.value<0&&(t.tilt.value+=o)),t.tilt.velocity&&1!==n&&(t.tilt.velocity*=n))}(t,e)}}class ga{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=M(t.opacity)))}}class fa{constructor(){this.lines=new ga,this.particles=new ga}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class ya{getColorStyles(t,e,i,s){const o=t.options.twinkle;if(!o)return{};const n=o.particles,a=n.enable&&S()<n.frequency,r=t.options.zIndex,c=(1-t.zIndexFactor)**r.opacityRate,h=a?O(n.opacity)*c:s,l=Et(n.color),d=l?Bt(l,h):void 0,u={},p=a&&d;return u.fill=p?d:void 0,u.stroke=p?d:void 0,u}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){t.twinkle||(t.twinkle=new fa);for(const i of e)t.twinkle.load(i?.twinkle)}update(){}}class wa{constructor(){this.angle=50,this.move=10}load(t){t&&(void 0!==t.angle&&(this.angle=M(t.angle)),void 0!==t.move&&(this.move=M(t.move)))}}class va{constructor(){this.distance=5,this.enable=!1,this.speed=new wa}load(t){if(t&&(void 0!==t.distance&&(this.distance=M(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(_t(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;void 0!==e.min?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class ma{constructor(t){this.container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:S()*Math.PI*2,angleSpeed:O(e.speed.angle)/360,moveSpeed:O(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=O(e?.distance??0)*this.container.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){t.wobble||(t.wobble=new va);for(const i of e)t.wobble.load(i?.wobble)}update(t,e){this.isEnabled(t)&&function(t,e){const{wobble:i}=t.options,{wobble:s}=t;if(!i?.enable||!s)return;const o=s.angleSpeed*e.factor,n=s.moveSpeed*e.factor*((t.retina.wobbleDistance??0)*e.factor)/(1e3/60),a=2*Math.PI,{position:r}=t;s.angle+=o,s.angle>a&&(s.angle-=a),r.x+=n*Math.cos(s.angle),r.y+=n*Math.abs(Math.sin(s.angle))}(t,e)}}async function _a(t,e=!0){await async function(t,e=!0){await t.addParticleUpdater("destroy",(e=>new ao(t,e)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("roll",(()=>new vo),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("tilt",(t=>new pa(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("twinkle",(()=>new ya),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("wobble",(t=>new ma(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalTrail",(t=>new fo(t)),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Ks,e)}(t,!1),await async function(t,e=!0){t.emitterShapeManager||(t.emitterShapeManager=new _s(t)),t.addEmitterShapeGenerator||(t.addEmitterShapeGenerator=(e,i)=>{t.emitterShapeManager?.addShapeGenerator(e,i)});const i=new Ss(t);await t.addPlugin(i,e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("circle",new co),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("square",new uo),await i.refresh(e)}(t,!1),await la(t,e)}class ba{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1,this.startValue="random"}load(t){t&&(void 0!==t.count&&(this.count=M(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.delay&&(this.delay=M(t.delay)))}}class Sa{constructor(){this.value=0,this.animation=new ba}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=M(t.value)))}}class xa{constructor(){this.stop=0,this.value=new Me}load(t){t&&(void 0!==t.stop&&(this.stop=t.stop),this.value=Me.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new Sa,_t(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Pa{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=M(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.delay&&(this.delay=M(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ca{constructor(){this.value=0,this.animation=new Pa,this.direction="clockwise"}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=M(t.value)),void 0!==t.direction&&(this.direction=t.direction))}}class Oa{constructor(){this.angle=new Ca,this.colors=[],this.type="random"}load(t){t&&(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new xa;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}function Ta(t,e){if(!e.enable)return;const i=e.decay??1;switch(e.status){case"increasing":e.value>=e.max?e.status="decreasing":e.value+=(e.velocity??0)*t.factor;break;case"decreasing":e.value<=e.min?e.status="increasing":e.value-=(e.velocity??0)*t.factor}e.velocity&&1!==i&&(e.velocity*=i)}function Aa(t,e,i,s){if(!e||!e.enable)return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=t.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=(e.velocity??0)*t.factor,n=e.decay??1;s&&"increasing"!==e.status?(e.value-=o,e.value<0&&(e.status="increasing",e.value+=e.value)):(e.value+=o,s&&e.value>i&&(e.status="decreasing",e.value-=e.value%i)),e.value>i&&(e.value%=i),e.velocity&&1!==n&&(e.velocity*=n)}function Ma(t,e){const{gradient:i}=t;if(i){!function(t,e){const i=(e.velocity??0)*t.factor,s=2*Math.PI,o=e.decay??1;e.enable&&("increasing"===e.status?(e.value+=i,e.value>s&&(e.value-=s)):(e.value-=i,e.value<0&&(e.value+=s)),e.velocity&&1!==o&&(e.velocity*=o))}(e,i.angle);for(const s of i.colors)void 0!==t.color?.h&&Aa(e,s.value.h,360,!1),void 0!==t.color?.s&&Aa(e,s.value.s,100,!0),void 0!==t.color?.l&&Aa(e,s.value.l,100,!0),s.opacity&&Ta(e,s.opacity)}}class Va{getColorStyles(t,e,i,s){const o=t.gradient;if(!o)return{};const n=o.angle.value,a="radial"===o.type?e.createRadialGradient(0,0,0,0,0,i):e.createLinearGradient(Math.cos(n)*-i,Math.sin(n)*-i,Math.cos(n)*i,Math.sin(n)*i);for(const{stop:t,value:e,opacity:i}of o.colors)a.addColorStop(t,Bt({h:e.h.value,s:e.s.value,l:e.l.value},i?.value??s));return{fill:a}}init(t){const e=ut(t.options.gradient);if(!e)return;const{angle:i}=e;t.gradient={angle:{value:O(i.value),enable:i.animation.enable,velocity:O(i.animation.speed)/360*t.container.retina.reduceFactor,decay:1-O(i.animation.decay),delayTime:1e3*O(i.animation.delay),time:0},type:e.type,colors:[]};let s=e.angle.direction;switch("random"===s&&(s=S()>.5?"counter-clockwise":"clockwise"),s){case"counter-clockwise":case"counterClockwise":t.gradient.angle.status="decreasing";break;case"clockwise":t.gradient.angle.status="increasing"}const o=t.options.reduceDuplicates;for(const i of e.colors){const e=Et(i.value,t.id,o);if(!e)continue;const s=$t(e,i.value.animation,t.container.retina.reduceFactor),n={stop:i.stop,value:s,opacity:i.opacity?{enable:i.opacity.animation.enable,max:A(i.opacity.value),min:T(i.opacity.value),status:"increasing",value:O(i.opacity.value),velocity:O(i.opacity.animation.speed)/100*t.container.retina.reduceFactor,decay:1-O(i.opacity.animation.decay),delayTime:1e3*O(i.opacity.animation.delay),time:0}:void 0},{opacity:a}=n;if(i.opacity&&a){const t=i.opacity.value;a.min=T(t),a.max=A(t);switch(i.opacity.animation.startValue){case"min":a.value=a.min,a.status="increasing";break;case"max":a.value=a.max,a.status="decreasing";break;default:a.value=C(a),a.status=S()>=.5?"increasing":"decreasing"}}t.gradient.colors.push(n)}}isEnabled(t){return!t.destroyed&&!t.spawning&&(t.gradient?.angle.enable||(t.gradient?.colors.some((t=>t.value.h.enable||t.value.s.enable||t.value.l.enable))??!1))}loadOptions(t,...e){for(const i of e){if(!i?.gradient)continue;const e=i.gradient;e&&(t.gradient=dt(e,(t=>{const e=new Oa;return e.load(t),e})))}}update(t,e){Ma(t,e)}}class Ga{draw(t){const{context:e,radius:i}=t,s=-i,o=-i;e.moveTo(s,o+i/2),e.quadraticCurveTo(s,o,s+i/2,o),e.quadraticCurveTo(s+i,o,s+i,o+i/2),e.quadraticCurveTo(s+i,o,s+3*i/2,o),e.quadraticCurveTo(s+2*i,o,s+2*i,o+i/2),e.quadraticCurveTo(s+2*i,o+i,s+3*i/2,o+3*i/2),e.lineTo(s+i,o+2*i),e.lineTo(s+i/2,o+3*i/2),e.quadraticCurveTo(s,o+i,s,o+i/2)}}function Ea(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/100,o=t.v/100,n=o*s,a=n*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:n,g:a,b:0}:i>1&&i<=2?r={r:a,g:n,b:0}:i>2&&i<=3?r={r:0,g:n,b:a}:i>3&&i<=4?r={r:0,g:a,b:n}:i>4&&i<=5?r={r:a,g:0,b:n}:i>5&&i<=6&&(r={r:n,g:0,b:a}),r){const t=o-n;e.r=Math.floor(255*(r.r+t)),e.g=Math.floor(255*(r.g+t)),e.b=Math.floor(255*(r.b+t))}return e}class Ra{constructor(){this.key="hsv",this.stringPrefix="hsv"}handleColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Ea(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Ea({h:O(e.h),s:O(e.s),v:O(e.v)})}parseString(t){if(!t.startsWith("hsv"))return;const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?{a:(i={a:e.length>4?B(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}).a,...Ea(i)}:void 0;var i}}async function ka(){Tt(new Ra)}class za{constructor(){this.color=new ce,this.color.value="#ff0000",this.radius=0,this.rate=1}load(t){void 0!==t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),this.duration=t.duration,this.infectedStage=t.infectedStage,void 0!==t.radius&&(this.radius=t.radius),void 0!==t.rate&&(this.rate=t.rate))}}class Ia{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){void 0!==t&&(void 0!==t.cure&&(this.cure=t.cure),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.infections&&(this.infections=t.infections),void 0!==t.stages&&(this.stages=t.stages.map((t=>{const e=new za;return e.load(t),e}))))}}class La{constructor(t){this._nextInfectionStage=t=>{const e=this._container.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const s=e.stages.length;if(!(s<=0||void 0===i.stage)&&(i.time=0,s<=++i.stage)){if(e.cure)return delete i.stage,void delete i.time;i.stage=0,i.time=0}},this._container=t}startInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;e>i.stages.length||e<0||(s.delay=0,s.delayStage=e)}updateInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;const o=i.stages,n=o.length;if(void 0!==s.delay&&void 0!==s.delayStage){const t=s.delayStage;if(t>n||t<0)return;s.delay>=1e3*i.delay?(s.stage=t,s.time=0,delete s.delay,delete s.delayStage):s.delay+=e}else delete s.delay,delete s.delayStage;if(void 0!==s.stage&&void 0!==s.time){const i=o[s.stage];void 0!==i.duration&&i.duration>=0&&s.time>1e3*i.duration?this._nextInfectionStage(t):s.time+=e}else delete s.stage,delete s.time}updateInfectionStage(t,e){const i=this._container.actualOptions,{infection:s}=t;if(!i.infection||!s)return;e>i.infection.stages.length||e<0||void 0!==s.stage&&s.stage>e||(s.stage=e,s.time=0)}}class Da{constructor(t){this._container=t,this._container.infecter=new La(this._container)}particleFillColor(t){const e=this._container.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,s=e.infection.stages;return void 0!==i?s[i].color:void 0}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this._container.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=K(this._container.particles.filter((t=>{const e=t;return e.infection||(e.infection={}),void 0===e.infection.stage})));this._container.infecter?.startInfection(t,0)}}}class Ha extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t,e){const i=this.container.infecter;if(!i)return;if(i.updateInfection(t,e.value),void 0===t.infection?.stage)return;const s=this.container,o=s.actualOptions.infection;if(!o?.enable||o.stages.length<1)return;const n=o.stages[t.infection.stage],a=s.retina.pixelRatio,r=2*t.getRadius()+n.radius*a,c=t.getPosition(),h=n.infectedStage??t.infection.stage,l=s.particles.quadTree.queryCircle(c,r),d=n.rate,u=l.length;for(const e of l){const s=e;if(!(s===t||s.destroyed||s.spawning||void 0!==s.infection?.stage&&s.infection.stage===t.infection.stage||S()>=d/u))if(void 0===s.infection?.stage)i.startInfection(s,h);else if(s.infection.stage<t.infection.stage)i.updateInfectionStage(s,h);else if(s.infection.stage>t.infection.stage){const e=o.stages[s.infection.stage],n=e?.infectedStage??s.infection.stage;i.updateInfectionStage(t,n)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}class Ba{constructor(){this.id="infection"}getPlugin(t){return new Da(t)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.infection;void 0===i?.load&&(t.infection=i=new Ia),i.load(e?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}const Fa="light";class Ua{constructor(){this.start=new ce,this.stop=new ce,this.start.value="#ffffff",this.stop.value="#000000"}load(t){t&&(this.start=ce.create(this.start,t.start),this.stop=ce.create(this.stop,t.stop))}}class Na{constructor(){this.gradient=new Ua,this.radius=1e3}load(t){t&&(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class qa{constructor(){this.color=new ce,this.color.value="#000000",this.length=2e3}load(t){t&&(this.color=ce.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class $a{constructor(){this.area=new Na,this.shadow=new qa}load(t){t&&(this.area.load(t.area),this.shadow.load(t.shadow))}}class ja extends Mi{constructor(t){super(t)}clear(){}init(){}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity;if(!e.interactivity.events.onHover.enable||"pointermove"!==i.status)return;const s=i.mouse.position;s&&t.canvas.draw((e=>{!function(t,e,i){const s=t.actualOptions.interactivity.modes.light?.area;if(!s)return;e.beginPath(),e.arc(i.x,i.y,s.radius,0,2*Math.PI);const o=e.createRadialGradient(i.x,i.y,0,i.x,i.y,s.radius),n=t.canvas.mouseLight;n&&n.start&&n.stop&&(o.addColorStop(0,Ht(n.start)),o.addColorStop(1,Ht(n.stop)),e.fillStyle=o,e.fill())}(t,e,s)}))}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=t?.interactivity??e.actualOptions.interactivity,o=s.events;if(!o.onHover.enable||!i.position)return!1;const n=X(Fa,o.onHover.mode);if(n&&s.modes.light){const t=s.modes.light.area.gradient;e.canvas.mouseLight={start:Mt(t.start),stop:Mt(t.stop)}}return n}loadModeOptions(t,...e){t.light||(t.light=new $a);for(const i of e)t.light.load(i?.light)}reset(){}}class Qa extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container,i=e.actualOptions,s=e.interactivity;if(!i.interactivity.events.onHover.enable||"pointermove"!==s.status)return;const o=s.mouse.position;o&&e.canvas.draw((i=>{!function(t,e,i,s){const o=i.getPosition(),n=t.actualOptions.interactivity.modes.light?.shadow;if(!n)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,h=2*Math.PI/c,l=-i.rotation+Math.PI/4,d=[];for(let t=0;t<c;t++)d.push({x:o.x+r*Math.sin(l+h*t)*1,y:o.y+r*Math.cos(l+h*t)*1});const u=[],p=n.length;for(const t of d){const e=Math.atan2(s.y-t.y,s.x-t.x),i={x:t.x+p*Math.sin(-e-Math.PI/2),y:t.y+p*Math.cos(-e-Math.PI/2)};u.push({end:i,start:t})}const g=Ht(a);for(let t=u.length-1,i=0;t>=0;i=t--)e.beginPath(),e.moveTo(u[t].start.x,u[t].start.y),e.lineTo(u[i].start.x,u[i].start.y),e.lineTo(u[i].end.x,u[i].end.y),e.lineTo(u[t].end.x,u[t].end.y),e.fillStyle=g,e.fill()}(e,i,t,o)}))}isEnabled(t){const e=this.container,i=t.interactivity??e.actualOptions.interactivity,s=e.interactivity.mouse,o=i.events;if(!o.onHover.enable||!s.position)return!1;const n=X(Fa,o.onHover.mode);if(n&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=Mt(e.color)}return n}reset(){}}class Wa{constructor(){this.factor=4,this.value=!0}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class Za{constructor(){this.disable=!1,this.reduce=new Wa}load(t){t&&(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class Xa{constructor(t,e){this._handleMotionChange=t=>{const e=this._container,i=e.actualOptions.motion;i&&(e.retina.reduceFactor=t.matches?i.disable?0:i.reduce.value?1/i.reduce.factor:1:1)},this._container=t,this._engine=e}async init(){const t=this._container,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=Q("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this._handleMotionChange(i);const s=async()=>{this._handleMotionChange(i);try{await t.refresh()}catch{}};void 0!==i.addEventListener?i.addEventListener("change",s):void 0!==i.addListener&&i.addListener(s)}}class Ya{constructor(t){this.id="motion",this._engine=t}getPlugin(t){return new Xa(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin())return;let i=t.motion;i?.load||(t.motion=i=new Za),i.load(e?.motion)}needsPlugin(){return!0}}class Ja extends Ee{constructor(){super(),this.value=45}load(t){void 0!==t&&super.load(t)}}class Ka{constructor(){this.animation=new Ce,this.enable=!1,this.opacity=1,this.rotation=new Ja,this.width=1}load(t){t&&(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=M(t.opacity)),void 0!==t.width&&(this.width=M(t.width)),void 0!==t.radius&&(this.radius=M(t.radius)),void 0!==t.color&&(this.color=ce.create(this.color,t.color)))}}class tr{constructor(t){this.container=t}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,"front")}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,"back")}drawOrbit(t,e){const i=this.container;let s,o;switch(e){case"back":s=Math.PI/2,o=3*Math.PI/2;break;case"front":s=3*Math.PI/2,o=Math.PI/2;break;default:s=0,o=2*Math.PI}i.canvas.draw((e=>{!function(t,e,i,s,o,n,a,r,c){if(n<=0)return;const h=e.getPosition();i&&(t.strokeStyle=Bt(i,o)),t.lineWidth=n;const l=a*Math.PI/180;t.beginPath(),t.ellipse(h.x,h.y,s/2,2*s,l,r,c),t.stroke()}(e,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??i.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*i.retina.pixelRatio,s,o)}))}init(t){const e=this.container,i=t.options.orbit;i?.enable&&(t.orbitRotation=O(i.rotation.value),t.orbitColor=Et(i.color),t.retina.orbitRadius=void 0!==i.radius?O(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?O(i.animation.speed):0,t.orbitWidth=O(i.width),t.orbitOpacity=O(i.opacity))}isEnabled(t){const e=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.orbit||(t.orbit=new Ka);for(const i of e)t.orbit.load(i?.orbit)}update(t,e){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/(2*Math.PI))*e.factor)}}class er extends Ee{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),t&&(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=M(t.distance)),void 0!==t.duration&&(this.duration=M(t.duration)),void 0!==t.factor&&(this.factor=M(t.factor)),void 0!==t.speed&&(this.speed=M(t.speed)))}}class ir extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container;if(!t.repulse){const i=t.options.repulse;if(!i)return;t.repulse={distance:O(i.distance)*e.retina.pixelRatio,speed:O(i.speed),factor:O(i.factor)}}const i=t.getPosition(),s=e.particles.quadTree.queryCircle(i,t.repulse.distance);for(const e of s){if(t===e||e.destroyed)continue;const s=e.getPosition(),{dx:o,dy:n,distance:a}=V(s,i),r=t.repulse.speed*t.repulse.factor;if(a>0){const i=x((1-Math.pow(a/t.repulse.distance,2))*r,0,r),s=y.create(o/a*i,n/a*i);e.position.addTo(s)}else{const t=y.create(r,r);e.position.addTo(t)}}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){t.repulse||(t.repulse=new er);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class sr{draw(t){const{context:e,particle:i,radius:s}=t;i.pathData&&function(t,e,i){t.moveTo(i.segments[0].values[0].x*e,i.segments[0].values[0].y*e);for(let s=0;s<i.segments.length;s++){const o=i.segments[s];switch(o.type){case"line":t.lineTo(o.values[0].x*e,o.values[0].y*e);break;case"bezier":t.bezierCurveTo(o.values[1].x*e,o.values[1].y*e,o.values[2].x*e,o.values[2].y*e,o.values[3].x*e,o.values[3].y*e);break;case"quadratic":t.quadraticCurveTo(o.values[1].x*e,o.values[1].y*e,o.values[2].x*e,o.values[2].y*e);break;case"arc":t.arc(o.values[0].x*e,o.values[0].y*e,o.values[1].x*e,o.values[2].x,o.values[2].y);break;case"ellipse":t.ellipse(o.values[0].x*e,o.values[0].y*e,o.values[1].x*e,o.values[1].y*e,o.values[2].x,o.values[3].x,o.values[3].y)}}if(i.half)for(let s=i.segments.length-1;s>=0;s--){const o=i.segments[s];switch(o.type){case"line":t.lineTo(o.values[0].x*-e,o.values[0].y*e);break;case"bezier":t.bezierCurveTo(-o.values[2].x*e,o.values[2].y*e,-o.values[1].x*e,o.values[1].y*e,-o.values[0].x*e,o.values[0].y*e);break;case"quadratic":t.quadraticCurveTo(-o.values[1].x*e,o.values[1].y*e,-o.values[2].x*e,o.values[2].y*e)}}}(e,s,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=st({},i))}}class or{constructor(t,e,i){this.x=t,this.y=e,this.z=i}dot2(t,e){return this.x*t+this.y*e}dot3(t,e,i){return this.dot2(t,e)+this.z*i}}class nr{constructor(){this._grad3=[new or(1,1,0),new or(-1,1,0),new or(1,-1,0),new or(-1,-1,0),new or(1,0,1),new or(-1,0,1),new or(1,0,-1),new or(-1,0,-1),new or(0,1,1),new or(0,-1,1),new or(0,1,-1),new or(0,-1,-1)],this._p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this._gradP=new Array(512),this._perm=new Array(512)}noise2d(t,e){const{_gradP:i,_perm:s}=this;let o=Math.floor(t),n=Math.floor(e);t-=o,e-=n,o&=255,n&=255;const a=i[o+s[n]].dot2(t,e),r=i[o+s[n+1]].dot2(t,e-1),c=i[o+1+s[n]].dot2(t-1,e),h=i[o+1+s[n+1]].dot2(t-1,e-1),l=this._fade(t);return this._lerp(this._lerp(a,c,l),this._lerp(r,h,l),this._fade(e))}noise3d(t,e,i){const{_gradP:s,_perm:o}=this;let n=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=n,e-=a,i-=r,n&=255,a&=255,r&=255;const c=s[n+o[a+o[r]]].dot3(t,e,i),h=s[n+o[a+o[r+1]]].dot3(t,e,i-1),l=s[n+o[a+1+o[r]]].dot3(t,e-1,i),d=s[n+o[a+1+o[r+1]]].dot3(t,e-1,i-1),u=s[n+1+o[a+o[r]]].dot3(t-1,e,i),p=s[n+1+o[a+o[r+1]]].dot3(t-1,e,i-1),g=s[n+1+o[a+1+o[r]]].dot3(t-1,e-1,i),f=s[n+1+o[a+1+o[r+1]]].dot3(t-1,e-1,i-1),y=this._fade(t),w=this._fade(e),v=this._fade(i);return this._lerp(this._lerp(this._lerp(c,u,y),this._lerp(h,p,y),v),this._lerp(this._lerp(l,g,y),this._lerp(d,f,y),v),w)}seed(t){const{_grad3:e,_gradP:i,_perm:s,_p:o}=this;let n=t;n>0&&n<1&&(n*=65536),n=Math.floor(n),n<256&&(n|=n<<8);for(let t=0;t<256;t++){const a=1&t?o[t]^255&n:o[t]^n>>8&255;s[t]=s[t+256]=a,i[t]=i[t+256]=e[a%12]}}_fade(t){return t*t*t*(t*(6*t-15)+10)}_lerp(t,e,i){return(1-i)*t+i*e}}const ar={draw:!1,size:20,increment:.004,columns:0,rows:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4}};class rr{constructor(){this._calculateField=()=>{const{field:t,noiseGen:e,options:i}=this,s=i.factor.length,o=i.factor.angle;for(let n=0;n<i.columns;n++){const a=t[n];for(let t=0;t<i.rows;t++){const r=a[t];r.length=e.noise3d(n*s+i.offset.x,t*s+i.offset.y,this.noiseZ),r.angle=e.noise3d(n*o,t*o,this.noiseZ)*Math.PI*2}}},this._drawField=t=>{const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const o=e[s];for(let e=0;e<i.rows;e++){const i=o[e],{angle:n,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(n),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*a),t.stroke(),t.setTransform(1,0,0,1,0,0)}}},this._initField=()=>{const{columns:t,rows:e}=this.options;this.field=new Array(t);for(let i=0;i<t;i++){this.field[i]=new Array(e);for(let t=0;t<e;t++)this.field[i][t]=y.origin}},this.noiseGen=new nr,this.field=[],this.noiseZ=0,this.options=st({},ar)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),o=Math.max(Math.floor(e.y/i),0),{field:n}=this;return n&&n[s]&&n[s][o]?n[s][o].copy():y.origin}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseZ+=this.options.increment,this.options.draw&&this.container.canvas.draw((t=>this._drawField(t))))}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options,{options:i}=this;i.size=e.size>0?e.size:ar.size,i.increment=e.increment>0?e.increment:ar.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??ar.offset.x,i.offset.y=s?.y??ar.offset.y;const o=e.factor;i.factor.angle=o?.angle??ar.factor.angle,i.factor.length=o?.length??ar.factor.length,i.width=t.canvas.size.width,i.height=t.canvas.size.height,this.options.seed=e.seed,this.noiseGen.seed(this.options.seed??S()),i.columns=Math.floor(this.options.width/this.options.size)+1,i.rows=Math.floor(this.options.height/this.options.size)+1,this._initField()}_setup(){this.noiseZ=0,this._resetField(),window.addEventListener("resize",(()=>this._resetField()))}}const cr="perlinNoise";!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,s,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,this._y2=a},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,s,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,this._y2=a},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,s,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,s,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=s,this._y2=o},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=s,this._y2=o},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,s,o,n){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,s,o,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,s,o,n){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,s,o,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,s,o,n,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,s,o,n,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,s,o,n,a){return new window.SVGPathSegArcRel(void 0,t,e,i,s,o,n,a)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",i=!0;return t.forEach((function(t){i?(i=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||!t.length)return[];const e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};const s=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};s.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},s.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},s.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},s.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},s.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},s.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},s.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},s.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},s.prototype._parseNumber=function(){let t=0,e=0,i=1,s=0,o=1,n=1;const a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const r=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r){let t=this._currentIndex-1,i=1;for(;t>=r;)e+=i*(this._string.charAt(t--)-"0"),i*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,s+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,n=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let c=e+s;return c*=o,t&&(c*=Math.pow(10,n*t)),a!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),c):void 0},s.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},s.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let i,s=this._pathSegTypeFromChar(t);if(s==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(s=this._nextCommandHelper(t,this._previousCommand),s==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=s,s){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};const o=new i,n=new s(t);if(!n.initialCommandIsMoveTo())return[];for(;n.hasMoreData();){const t=n.parseSegment();if(!t)return[];o.appendSegment(t)}return o.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}();class hr{constructor(){this.color=new ce,this.width=.5,this.opacity=1}load(t){t&&(this.color=ce.create(this.color,t.color),mt(this.color.value)&&(this.opacity=kt(this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class lr{constructor(){this.enable=!1,this.stroke=new hr}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}class dr{constructor(){this.arrangement="one-per-point"}load(t){t&&void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class ur{constructor(){this.path=[],this.size={height:0,width:0}}load(t){t&&(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}class pr{constructor(){this.radius=10,this.type="path"}load(t){t&&(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}class gr{constructor(){this.draw=new lr,this.enable=!1,this.inline=new dr,this.move=new pr,this.scale=1,this.type="none"}load(t){t&&(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable="none"!==this.type,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&(mt(t.data)?this.data=t.data:(this.data=new ur,this.data.load(t.data))),void 0!==t.position&&(this.position=st({},t.position)))}}function fr(t,e,i){const s=Mt(i.color);if(s){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(const i of e)t.lineTo(i.x,i.y);t.closePath(),t.strokeStyle=Ht(s),t.lineWidth=i.width,t.stroke()}}function yr(t,e,i,s){t.setTransform(1,0,0,1,s.x,s.y);const o=Mt(i.color);o&&(t.strokeStyle=Ht(o,i.opacity),t.lineWidth=i.width,t.stroke(e),t.setTransform(1,0,0,1,0,0))}function wr(t,e,i){const{dx:s,dy:o}=V(i,t),{dx:n,dy:a}=V(e,t),r=(s*n+o*a)/(n**2+a**2),c={x:t.x+n*r,y:t.y+a*r,isOnSegment:r>=0&&r<=1};return r<0?(c.x=t.x,c.y=t.y):r>1&&(c.x=e.x,c.y=e.y),c}function vr(t,e,i){const{dx:s,dy:o}=V(t,e),n=Math.atan2(o,s),a=y.create(Math.sin(n),-Math.cos(n)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}const mr=`${g} No polygon data loaded.`,_r=`${g} No polygon found, you need to specify SVG url in config.`;class br{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,i=e.actualOptions.polygon;if(!i?.enable||"none"===i.type||"inline"===i.type)return!0;if(!this.raw)throw new Error(_r);const s=e.canvas.size,o=t?.x??S()*s.width,n=t?.y??S()*s.height;let a=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const i=this.raw[t],s=this.raw[e];i.y>n!=s.y>n&&o<(s.x-i.x)*(n-i.y)/(s.y-i.y)+i.x&&(a=!a)}return"inside"===i.type?a:"outside"===i.type&&!a},this._createPath2D=()=>{if(this._container.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element?.getAttribute("d");if(e){const i=new Path2D(e),s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),o=new Path2D,n=s.scale(this._scale);o.addPath?(o.addPath(i,n),t.path2d=o):delete t.path2d}else delete t.path2d;!t.path2d&&this.raw&&(t.path2d=new Path2D,t.path2d.moveTo(this.raw[0].x,this.raw[0].y),this.raw.forEach(((e,i)=>{i>0&&t.path2d?.lineTo(e.x,e.y)})),t.path2d.closePath())}},this._downloadSvgPath=async(t,e)=>{const i=this._container.actualOptions.polygon;if(!i)return;const s=t||i.url,o=e??!1;if(!s||void 0!==this.paths&&!o)return this.raw;const n=await fetch(s);if(!n.ok)throw new Error(`${g} occurred during polygon mask download`);return this._parseSvgPath(await n.text(),e)},this._drawPoints=()=>{if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})},this._getEquidistantPointByIndex=t=>{const e=this._container.actualOptions;if(!e.polygon)return;if(!this.raw||!this.raw.length||!this.paths?.length)throw new Error(mr);let i,s=0;const o=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const n=o*t-s;if(n<=e.length){i=e.element.getPointAtLength(n);break}s+=e.length}const n=this._scale;return{x:(i?.x??0)*n+(this.offset?.x??0),y:(i?.y??0)*n+(this.offset?.y??0)}},this._getPointByIndex=t=>{if(!this.raw||!this.raw.length)throw new Error(mr);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw||!this.raw.length)throw new Error(mr);const t=K(this.raw);return{x:t.x,y:t.y}},this._getRandomPointByLength=()=>{if(!this._container.actualOptions.polygon)return;if(!this.raw||!this.raw.length||!this.paths?.length)throw new Error(mr);const t=K(this.paths),e=Math.floor(S()*t.length)+1,i=t.element.getPointAtLength(e),s=this._scale;return{x:i.x*s+(this.offset?.x||0),y:i.y*s+(this.offset?.y||0)}},this._initRawData=async t=>{const e=this._container.actualOptions.polygon;if(e){if(e.url)this.raw=await this._downloadSvgPath(e.url,t);else if(e.data){const i=e.data;let s;if(mt(i))s=i;else{const t=t=>`<path d="${t}" />`,e=xt(i.path)?i.path.map(t).join(""):t(i.path);s=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${i.size.width}" height="${i.size.height}">${e}</svg>`}this.raw=this._parseSvgPath(s,t)}this._createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}},this._parseSvgPath=(t,e)=>{const i=e??!1;if(void 0!==this.paths&&!i)return this.raw;const s=this._container,o=s.actualOptions.polygon;if(!o)return;const n=(new DOMParser).parseFromString(t,"image/svg+xml"),a=n.getElementsByTagName("svg")[0];let r=a.getElementsByTagName("path");r.length||(r=n.getElementsByTagName("path")),this.paths=[];for(let t=0;t<r.length;t++){const e=r.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const c=this._scale;this.dimension.width=parseFloat(a.getAttribute("width")??"0")*c,this.dimension.height=parseFloat(a.getAttribute("height")??"0")*c;const h=o.position??{x:50,y:50},l=s.canvas.size;return this.offset={x:l.width*h.x/100-this.dimension.width/2,y:l.height*h.y/100-this.dimension.height/2},function(t,e,i){const s=[];for(const o of t){const t=o.element.pathSegList,n=t?.numberOfItems??0,a={x:0,y:0};for(let o=0;o<n;o++){const n=t?.getItem(o),r=window.SVGPathSeg;switch(n?.pathSegType){case r.PATHSEG_MOVETO_ABS:case r.PATHSEG_LINETO_ABS:case r.PATHSEG_CURVETO_CUBIC_ABS:case r.PATHSEG_CURVETO_QUADRATIC_ABS:case r.PATHSEG_ARC_ABS:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=n;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=n.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=n.y;break;case r.PATHSEG_LINETO_REL:case r.PATHSEG_MOVETO_REL:case r.PATHSEG_CURVETO_CUBIC_REL:case r.PATHSEG_CURVETO_QUADRATIC_REL:case r.PATHSEG_ARC_REL:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=n;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=n.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=n.y;break;case r.PATHSEG_UNKNOWN:case r.PATHSEG_CLOSEPATH:continue}s.push({x:a.x*e+i.x,y:a.y*e+i.y})}}return s}(this.paths,c,this.offset)},this._polygonBounce=(t,e,i)=>{const s=this._container.actualOptions.polygon;if(!this.raw||!s?.enable||"top"!==i)return!1;if("inside"===s.type||"outside"===s.type){let e,i,s;const o=t.getPosition(),n=t.getRadius();for(let a=0,r=this.raw.length-1;a<this.raw.length;r=a++){const c=this.raw[a],h=this.raw[r];e=wr(c,h,o);const l=V(o,e);if([i,s]=[l.dx,l.dy],l.distance<n)return vr(c,h,t.velocity),!0}if(e&&void 0!==i&&void 0!==s&&!this._checkInsidePolygon(o)){const i={x:1,y:1},s=2*n;return o.x>=e.x&&(i.x=-1),o.y>=e.y&&(i.y=-1),t.position.x=e.x+s*i.x,t.position.y=e.y+s*i.y,t.velocity.mult(-1),!0}}else if("inline"===s.type&&t.initialPosition){const e=G(t.initialPosition,t.getPosition()),{velocity:i}=t;if(e>this._moveRadius)return i.x=i.y/2-i.x,i.y=i.x/2-i.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let i;if("inline"===e.type)switch(e.inline.arrangement){case"random-point":i=this._getRandomPoint();break;case"random-length":i=this._getRandomPointByLength();break;case"equidistant":i=this._getEquidistantPointByIndex(t.particles.count);break;default:i=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;i={x:S()*e.width,y:S()*e.height}}return this._checkInsidePolygon(i)?i:this._randomPoint()},this._container=t,this._engine=e,this.dimension={height:0,width:0},this._moveRadius=0,this._scale=1}clickPositionValid(t){const e=this._container.actualOptions.polygon;return!!e?.enable&&"none"!==e.type&&"inline"!==e.type&&this._checkInsidePolygon(t)}draw(t){if(!this.paths?.length)return;const e=this._container.actualOptions.polygon;if(!e?.enable)return;const i=e.draw;if(!i.enable)return;const s=this.raw;for(const e of this.paths){const o=e.path2d;t&&(o&&this.offset?yr(t,o,i.stroke,this.offset):s&&fr(t,s,i.stroke))}}async init(){const t=this._container,e=t.actualOptions.polygon,i=t.retina.pixelRatio;e&&(this._moveRadius=e.move.radius*i,this._scale=e.scale*i,e.enable&&await this._initRawData())}particleBounce(t,e,i){return this._polygonBounce(t,e,i)}particlePosition(t){const e=this._container.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return st({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||"inline"!==t.type||"one-per-point"!==t.inline.arrangement&&"per-point"!==t.inline.arrangement)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;e?.enable&&"none"!==e.type&&(this.redrawTimeout&&clearTimeout(this.redrawTimeout),this.redrawTimeout=window.setTimeout((async()=>{await this._initRawData(!0),await t.particles.redraw()}),250))}stop(){delete this.raw,delete this.paths}}class Sr{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return new br(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.polygon;void 0===i?.load&&(t.polygon=i=new gr),i.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&"none"!==t.polygon.type)}}class xr{constructor(){this._createDirs=()=>{this.dirsList=[];for(let t=0;t<360;t+=360/this.options.sides){const e=this.options.angle+t;this.dirsList.push(y.create(Math.cos(e*Math.PI/180),Math.sin(e*Math.PI/180)))}},this.dirsList=[],this.options={sides:6,turnSteps:20,angle:30}}generate(t){const{sides:e}=this.options;void 0===t.hexStep&&(t.hexStep=0),void 0===t.hexDirection&&(t.hexDirection=6===e?2*(3*S()|0):S()*e|0),void 0===t.hexSpeed&&(t.hexSpeed=t.velocity.length),t.hexStep%this.options.turnSteps==0&&(t.hexDirection=S()>.5?(t.hexDirection+1)%e:(t.hexDirection+e-1)%e),t.velocity.x=0,t.velocity.y=0,t.hexStep++;const i=this.dirsList[t.hexDirection];return y.create(i.x*t.hexSpeed,i.y*t.hexSpeed)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.sides=e.sides>0?e.sides:6,this.options.angle=e.angle??30,this.options.turnSteps=e.turnSteps>=0?e.turnSteps:20,this._createDirs()}reset(t){delete t.hexStep,delete t.hexDirection,delete t.hexSpeed}update(){}}const Pr="polygonPathGenerator";class Cr{draw(t){const{context:e,particle:i,radius:s}=t;!function(t,e,i){let s=e[0],o=e[1];const n=e.length;t.moveTo((s.x+o.x)/2,(s.y+o.y)/2);for(let a=1;a<=n;a++)s=o,o=e[(a+1)%n],t.arcTo(s.x,s.y,(s.x+o.x)/2,(s.y+o.y)/2,i)}(e,function(t,e,i=0){const s=2*Math.PI/t,o=[];for(let n=0;n<t;n++)o.push({x:Math.cos(n*s+i)*e,y:Math.sin(n*s+i)*e});return o}(i.sides,s),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round(O(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round(O(i?.radius??5))*t.retina.pixelRatio}}const Or=Math.sqrt(2);class Tr{draw(t){const{context:e,particle:i,radius:s}=t,o=s/Or,n=2*o,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-o,-o,n,n,a):((t,e,i={topRight:4,bottomRight:4,bottomLeft:4,topLeft:4})=>{const{x:s,y:o,width:n,height:a}=e,r=s+n,c=o+a;t.moveTo(s+i.topLeft,o),t.lineTo(r-i.topRight,o),t.quadraticCurveTo(r,o,r,o+i.topRight),t.lineTo(r,o+a-i.bottomRight),t.quadraticCurveTo(r,c,r-i.bottomRight,c),t.lineTo(s+i.bottomLeft,c),t.quadraticCurveTo(s,c,s,c-i.bottomLeft),t.lineTo(s,o+i.topLeft),t.quadraticCurveTo(s,o,s+i.topLeft,o)})(e,{x:-o,y:-o,height:n,width:n},{topLeft:a,topRight:a,bottomLeft:a,bottomRight:a})}particleInit(t,e){const i=e.shapeData;e.borderRadius=O(i?.radius??5)*t.retina.pixelRatio}}class Ar{constructor(){this._paths=[],this._reverse=!1,this._size={width:0,height:0},this._scale=1,this._offset={x:0,y:0,mode:"percent"},this._width=0}generate(t,e){const i=t.container.retina.pixelRatio;void 0===t.svgDirection&&(t.svgDirection=S()>.5?0:1),void 0===t.svgPathIndex&&(t.svgPathIndex=Math.floor(Math.random()*this._paths.length)),void 0===t.svgSpeed&&(t.svgSpeed=t.velocity.mult((t.retina.moveSpeed??1)/2).length),void 0===t.svgStep&&(t.svgStep=C({min:0,max:this._paths[t.svgPathIndex].length})*i),void 0===t.svgOffset&&(t.svgOffset={width:C({min:-this._width/2,max:this._width/2})*i,height:C({min:-this._width/2,max:this._width/2})*i}),void 0===t.svgInitialPosition&&(t.svgInitialPosition={...t.position}),t.velocity.x=0,t.velocity.y=0,0===t.svgDirection?t.svgStep+=t.svgSpeed*e.factor:t.svgStep-=t.svgSpeed*e.factor;let s=this._paths[t.svgPathIndex];if(s){const e=s.length;t.svgStep>=e?(t.svgPathIndex=t.svgPathIndex+1,t.svgPathIndex>=this._paths.length&&(this._reverse?(t.svgPathIndex=this._paths.length-1,t.svgDirection=1):(t.svgPathIndex=0,t.svgStep=0))):t.svgStep<=0&&(t.svgPathIndex=t.svgPathIndex-1,t.svgPathIndex<0&&(this._reverse?(t.svgPathIndex=0,t.svgDirection=0):(t.svgPathIndex=this._paths.length-1,s=this._paths[t.svgPathIndex],t.svgStep=s.length))),s=this._paths[t.svgPathIndex]}if(s){const e=s.element.getPointAtLength(t.svgStep),o=t.container.canvas.size,n=yt(this._offset,o),a=this._scale*i;t.position.x=(e.x-this._size.width/2)*a+t.svgInitialPosition.x+n.x+t.svgOffset.width,t.position.y=(e.y-this._size.height/2)*a+t.svgInitialPosition.y+n.y+t.svgOffset.height}return y.origin}init(t){const e=t.actualOptions.particles.move.path.options,i=e.position??this._offset;if(this._reverse=e.reverse??this._reverse,this._scale=e.scale??1,this._offset.x=i.x,this._offset.y=i.y,this._offset.mode=i.mode,this._width=e.width??0,e.url&&!e.path){const t=e.url;(async()=>{const e=await fetch(t),i=await e.text(),s=(new DOMParser).parseFromString(i,"image/svg+xml"),o=s.getElementsByTagName("svg")[0];let n=o.getElementsByTagName("path");n.length||(n=s.getElementsByTagName("path")),this._paths=[];for(let t=0;t<n.length;t++){const e=n.item(t);e&&this._paths.push({element:e,length:e.getTotalLength()})}this._size.height=parseFloat(o.getAttribute("height")??"0"),this._size.width=parseFloat(o.getAttribute("width")??"0")})()}else if(e.path){const t=e.path;this._paths=[];for(const e of t.data){const t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",e),this._paths.push({element:t,length:t.getTotalLength()})}this._size.height=t.size.height,this._size.width=t.size.width}}reset(){}update(){}}const Mr="svgPathGenerator";const Vr={size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,offset:{x:4e4,y:4e4,z:4e4}};class Gr{constructor(){const t=new os;this._simplex=t.noise4d,this.field=[],this.noiseW=0,this.options=st({},Vr)}generate(t){const e=t.getPosition(),i=Math.max(Math.floor(e.x/this.options.size),0),s=Math.max(Math.floor(e.y/this.options.size),0),o=Math.max(Math.floor(e.z/this.options.size),0),n=y.origin;if(!(this.field&&this.field[i]&&this.field[i][s]&&this.field[i][s][o]))return n;const a=this.field[i][s][o];return n.length=a[1],n.angle=a[0],n}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseW+=this.options.increment)}_calculateField(){const t=this.options;for(let e=0;e<t.columns;e++)for(let i=0;i<t.rows;i++)for(let s=0;s<t.layers;s++)this.field[e][i][s][0]=this._simplex.noise(e/50,i/50,s/50,this.noiseW)*Math.PI*2,this.field[e][i][s][1]=this._simplex.noise(e/100+t.offset.x,i/100+t.offset.y,s/100+t.offset.z,this.noiseW)}_initField(){this.field=new Array(this.options.columns);for(let t=0;t<this.options.columns;t++){this.field[t]=new Array(this.options.rows);for(let e=0;e<this.options.rows;e++){this.field[t][e]=new Array(this.options.layers);for(let i=0;i<this.options.layers;i++)this.field[t][e][i]=[0,0]}}}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options;this.options.size=e.size>0?e.size:Vr.size,this.options.increment=e.increment>0?e.increment:Vr.increment,this.options.width=t.canvas.size.width,this.options.height=t.canvas.size.height;const i=e.offset;this.options.offset.x=i?.x??Vr.offset.x,this.options.offset.y=i?.y??Vr.offset.y,this.options.offset.z=i?.z??Vr.offset.z,this.options.seed=e.seed??Vr.seed,this._simplex.seed(this.options.seed??S()),this.options.columns=Math.floor(this.options.width/this.options.size)+1,this.options.rows=Math.floor(this.options.height/this.options.size)+1,this.options.layers=Math.floor(t.zLayers/this.options.size)+1,this._initField()}_setup(){this.noiseW=0,this._resetField(),addEventListener("resize",(()=>this._resetField()))}}const Er="simplexNoise";class Rr{constructor(){this.loop=!1,this.source=""}load(t){void 0!==t&&(St(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class kr{constructor(){this.duration=500,this.value=[]}load(t){t&&(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class zr{constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){void 0!==t&&(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new zr;return e.load(t),e}))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new kr;return e.load(t),e}))))}}class Ir{constructor(){this.event=[],this.notes=[]}load(t){t&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(xt(t.audio)?this.audio=t.audio.map((t=>{const e=new Rr;return e.load(t),e})):(this.audio=new Rr,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new kr;return e.load(t),e}))),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new zr;return e.load(t),e}))),void 0!==t.filter&&(mt(t.filter)?bt(window[t.filter])&&(this.filter=window[t.filter]):this.filter=t.filter))}}class Lr{constructor(){this.width=24,this.height=24}load(t){t&&(void 0!==t.path&&(this.path=t.path),void 0!==t.svg&&(this.svg=t.svg),void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height))}}class Dr{constructor(){this.mute=new Lr,this.unmute=new Lr,this.volumeDown=new Lr,this.volumeUp=new Lr,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){t&&(this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class Hr{constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){void 0!==t&&(St(t)?(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.step&&(this.step=t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class Br{constructor(){this.enable=!1,this.events=[],this.icons=new Dr,this.volume=new Hr}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.events&&(this.events=t.events.map((t=>{const e=new Ir;return e.load(t),e}))),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const Fr=new Map;function Ur(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e||!e.length)return;const i=e[2]||e[0],s=Fr.get(i);return s?s[parseInt(e[3]||"0")]:void 0}function Nr(t){const e=document.createElement("img"),{clickCb:i,container:s,display:o,iconOptions:n,margin:a,options:r,pos:c,rightOffsets:h}=t,{width:l,path:d,svg:u}=n;!function(t,e,i,s,o,n,a){t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.position="absolute",t.style.top=`${e+a}px`,t.style.left=i-a-n+"px",t.style.display=s,t.style.zIndex=`${o+1}`}(e,c.top+a,c.right-(a*(h.length+1)+l+h.reduce(((t,e)=>t+e),0)),o,r.fullScreen.zIndex+1,l,a),e.src=d??(u?`data:image/svg+xml;base64,${btoa(u)}`:"");return(s.canvas.element?.parentNode||document.body).append(e),e.addEventListener("click",i),e}function qr(t){t&&t.remove()}Fr.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Fr.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Fr.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Fr.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Fr.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Fr.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Fr.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Fr.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Fr.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Fr.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Fr.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Fr.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Fr.set("pause",[0]);class $r{constructor(t,e){this._addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e},this._addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e},this._initEvents=()=>{const t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(const t of e.events){const e=async i=>{if(this._container===i.container)if(!this._container||this._container.muted||this._container.destroyed)dt(t.event,(t=>{this._engine.removeEventListener(t,e)}));else if(!t.filter||t.filter(i))if(t.audio)this._playBuffer(ut(t.audio));else if(t.melodies){const e=K(t.melodies);e.melodies.length?await Promise.allSettled(e.melodies.map((t=>this._playNote(t.notes,0,e.loop)))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=K(t.notes);await this._playNote([e],0,!1)}};dt(t.event,(t=>{this._engine.addEventListener(t,e)}))}},this._mute=()=>{const t=this._container;if(t.audioContext){for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),t.audioContext.close(),t.audioContext=void 0,this._engine.dispatchEvent("soundsMuted",{container:this._container})}},this._playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const s=this._addBuffer(i);s.loop=t.loop,s.buffer=e,s.connect(this._gain??i.destination),s.start()},this._playFrequency=async(t,e)=>{if(!this._container.audioContext||!this._gain)return;const i=this._addOscillator(this._container.audioContext);return i.connect(this._gain),i.type="sine",i.frequency.value=t,i.start(),new Promise((t=>{setTimeout((()=>{this._removeAudioSource(i),t()}),e)}))},this._playMuteSound=()=>{const t=this._container;if(!t.audioContext)return;const e=t.audioContext.createGain();e.connect(t.audioContext.destination),e.gain.value=0;const i=t.audioContext.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout((()=>{i.stop(),i.disconnect(),e.disconnect()}))},this._playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const o=dt(s.value,(async(i,s)=>this._playNoteValue(t,e,s)));await(xt(o)?Promise.allSettled(o):o);let n=e+1;i&&n>=t.length&&(n%=t.length),this._container.muted||await this._playNote(t,n,i)},this._playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const o=ut(s.value,i,!0);try{const t=Ur(o);if(!_t(t))return;await this._playFrequency(t,s.duration)}catch(t){N().error(t)}},this._removeAudioSource=t=>{t.stop(),t.disconnect(),this._audioSources.splice(this._audioSources.indexOf(t),1)},this._unmute=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e)return;t.audioContext||(t.audioContext=new AudioContext);const{audioContext:i}=t;this._audioSources||(this._audioSources=[]);const s=i.createGain();s.connect(i.destination),s.gain.value=e.volume.value/100,this._gain=s,this._initEvents(),this._engine.dispatchEvent("soundsUnmuted",{container:this._container})},this._updateMuteIcons=()=>{const t=this._container,e=this._muteImg,i=this._unmuteImg;e&&(e.style.display=t.muted?"block":"none"),i&&(i.style.display=t.muted?"none":"block")},this._updateMuteStatus=()=>{this._container.muted?this._mute():(this._unmute(),this._playMuteSound())},this._updateVolume=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;x(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/100)},this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;this._volume=e.volume.value;const i=e.events;this._audioMap=new Map;for(const e of i)e.audio&&dt(e.audio,(async e=>{const i=await fetch(e.source);if(!i.ok)return;const s=await i.arrayBuffer();t.audioContext=new AudioContext;const o=await t.audioContext.decodeAudioData(s);this._audioMap.set(e.source,o)}))}async start(){const t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;const s=t.canvas.element,o={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:n,unmute:a,volumeDown:r,volumeUp:c}=i.icons,h=()=>{t.muted=!t.muted,this._updateMuteIcons(),this._updateMuteStatus()};this._muteImg=Nr({container:t,options:e,pos:o,display:"block",iconOptions:n,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._unmuteImg=Nr({container:t,options:e,pos:o,display:"none",iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._volumeDownImg=Nr({container:t,options:e,pos:o,display:"block",iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:()=>{t.muted&&(this._volume=0),this._volume-=i.volume.step,this._updateVolume()}}),this._volumeUpImg=Nr({container:t,options:e,pos:o,display:"block",iconOptions:c,margin:10,rightOffsets:[],clickCb:()=>{t.muted&&(this._volume=0),this._volume+=i.volume.step,this._updateVolume()}})}stop(){this._container.muted=!0,this._mute(),qr(this._muteImg),qr(this._unmuteImg),qr(this._volumeDownImg),qr(this._volumeUpImg)}}class jr{constructor(t){this.id="sounds",this._engine=t}getPlugin(t){return new $r(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.sounds;void 0===i?.load&&(t.sounds=i=new Br),i.load(e?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}class Qr{draw(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.spiralInnerRadius||void 0===i.spiralLineSpacing||void 0===i.spiralWidthFactor)return;const o=(s-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*o;t++){const s=t/10,o=i.spiralInnerRadius+i.spiralLineSpacing*s,n={x:o*Math.cos(s),y:o*Math.sin(s)};e.lineTo(n.x,n.y)}}particleInit(t,e){const i=t.retina.pixelRatio,s=e.shapeData;e.spiralInnerRadius=O(s?.innerRadius??1)*i,e.spiralLineSpacing=O(s?.lineSpacing??1)*i,e.spiralWidthFactor=O(s?.widthFactor??10)}}class Wr{draw(t){const{context:e,radius:i,particle:s}=t,o=s.container.retina.pixelRatio,n=s.getPosition();if(!s.trail||!s.trailLength)return;const a=s.trailLength;if(s.trail.push({color:e.fillStyle??e.strokeStyle,position:{x:n.x,y:n.y}}),s.trail.length<2)return;s.trail.length>a&&s.trail.shift();const r=Math.min(s.trail.length,a),c=n.x,h=n.y;let l=s.trail[r-1].position;for(let t=r;t>0;t--){const n=s.trail[t-1],a=n.position;if(G(l,a)>2*i)continue;e.beginPath(),e.moveTo(l.x-c,l.y-h),e.lineTo(a.x-c,a.y-h);const d=Math.max(t/r*i*2,o,s.trailMinWidth??-1);e.lineWidth=s.trailMaxWidth?Math.min(d,s.trailMaxWidth):d,e.strokeStyle=n.color,e.stroke(),l=a}}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailLength=O(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?O(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?O(i.minWidth)*t.retina.pixelRatio:void 0}}async function Zr(t,e=!0){await _a(t,!1),await ka(),await async function(){m("ease-in-back",(t=>2.70158*t**3-1.70158*t**2)),m("ease-out-back",(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)})),m("ease-in-out-back",(t=>{const e=2.5949095;return t<.5?(2*t)**2*(7.189819*t-e)/2:((2*t-2)**2*((e+1)*(2*t-2)+e)+2)/2}))}(),await async function(){m("ease-in-circ",(t=>1-Math.sqrt(1-t**2))),m("ease-out-circ",(t=>Math.sqrt(1-(t-1)**2))),m("ease-in-out-circ",(t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2))}(),await async function(){m("ease-in-cubic",(t=>t**3)),m("ease-out-cubic",(t=>1-(1-t)**3)),m("ease-in-out-cubic",(t=>t<.5?4*t**3:1-(-2*t+2)**3/2))}(),await async function(){m("ease-in-expo",(t=>t?2**(10*t-10):0)),m("ease-out-expo",(t=>1===t?1:1-Math.pow(2,-10*t))),m("ease-in-out-expo",(t=>t?1===t?1:t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0))}(),await async function(){m("ease-in-linear",(t=>t)),m("ease-out-linear",(t=>t)),m("ease-in-out-linear",(t=>t))}(),await async function(){m("ease-in-quart",(t=>t**4)),m("ease-out-quart",(t=>1-(1-t)**4)),m("ease-in-out-quart",(t=>t<.5?8*t**4:1-(-2*t+2)**4/2))}(),await async function(){m("ease-in-quint",(t=>t**5)),m("ease-out-quint",(t=>1-(1-t)**5)),m("ease-in-out-quint",(t=>t<.5?16*t**5:1-(-2*t+2)**5/2))}(),await async function(){m("ease-in-sine",(t=>1-Math.cos(t*Math.PI/2))),m("ease-out-sine",(t=>Math.sin(t*Math.PI/2))),m("ease-in-out-sine",(t=>-(Math.cos(Math.PI*t)-1)/2))}(),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("canvas",new Vs),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("path",new Rs),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("polygon",new Ds),await i.refresh(e)}(t,!1),await ka(),await async function(t,e=!0){await t.addPlugin(new $i(t),e)}(t,!1),await async function(t,e=!0){const i=new Ba;await t.addPlugin(i,e),await t.addInteractor("particlesInfection",(t=>new Ha(t)),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Ya(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Sr(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new jr(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Bs(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Us(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new js(t),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPop",(t=>new Qs(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalLight",(t=>new ja(t)),e),await t.addInteractor("particlesLight",(t=>new Qa(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesRepulse",(t=>new ir(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("gradient",(()=>new Va),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("orbit",(t=>new tr(t)),e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(hs,new cs,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(rs,new as,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(cr,new rr,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Pr,new xr,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Mr,new Ar,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Er,new Gr,e)}(t,!1),await async function(t,e=!0){await t.addEffect("bubble",new Ri,e)}(t,!1),await async function(t,e=!0){await t.addShape("arrow",new Ei,e)}(t,!1),await async function(t,e=!0){await t.addShape(["spade","spades"],new Zi,e),await t.addShape(["heart","hearts"],new Xi,e),await t.addShape(["diamond","diamonds"],new Yi,e),await t.addShape(["club","clubs"],new Ji,e)}(t,!1),await async function(t,e=!0){await t.addShape("cog",new Ki,e)}(t,!1),await async function(t,e=!0){await t.addShape("heart",new Ga,e)}(t,!1),await async function(t,e=!0){await t.addShape("path",new sr,e)}(t,!1),await async function(t,e=!0){await t.addShape("rounded-polygon",new Cr,e)}(t,!1),await async function(t,e=!0){await t.addShape("rounded-rect",new Tr,e)}(t,!1),await async function(t,e=!0){await t.addShape("spiral",new Qr,e)}(t,!1),await async function(t,e=!0){await t.addEffect("trail",new Wr,e)}(t,!1),await t.refresh(e)}return Zr(Gi),e})()));
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AnimatableColor:()=>Me,AnimationOptions:()=>Ce,AnimationValueWithRandom:()=>ze,Background:()=>he,BackgroundMask:()=>de,BackgroundMaskCover:()=>le,Circle:()=>yi,ClickEvent:()=>pe,Collisions:()=>Le,CollisionsAbsorb:()=>Ve,CollisionsOverlap:()=>Ge,ColorAnimation:()=>Te,DivEvent:()=>ge,Events:()=>we,ExternalInteractorBase:()=>Mi,FullScreen:()=>ue,HoverEvent:()=>ye,HslAnimation:()=>Ae,HslColorManager:()=>Ti,Interactivity:()=>_e,ManualParticle:()=>be,Modes:()=>me,Move:()=>We,MoveAngle:()=>He,MoveAttract:()=>Be,MoveCenter:()=>Fe,MoveGravity:()=>Ue,MovePath:()=>Ne,MoveTrail:()=>qe,Opacity:()=>Xe,OpacityAnimation:()=>Ze,Options:()=>hi,OptionsColor:()=>ce,OutModes:()=>je,Parallax:()=>fe,ParticlesBounce:()=>Ie,ParticlesBounceFactor:()=>ke,ParticlesDensity:()=>Ye,ParticlesInteractorBase:()=>Vi,ParticlesNumber:()=>Ke,ParticlesNumberLimit:()=>Je,ParticlesOptions:()=>ai,Point:()=>pi,Range:()=>gi,RangedAnimationOptions:()=>Oe,RangedAnimationValueWithRandom:()=>Re,Rectangle:()=>fi,ResizeEvent:()=>ve,Responsive:()=>Se,RgbColorManager:()=>Ai,Shadow:()=>ti,Shape:()=>ei,Size:()=>si,SizeAnimation:()=>ii,Spin:()=>Qe,Stroke:()=>oi,Theme:()=>Pe,ThemeDefault:()=>xe,ValueWithRandom:()=>Ee,Vector:()=>y,Vector3d:()=>f,ZIndex:()=>ni,addColorManager:()=>Tt,addEasing:()=>m,alterHsl:()=>se,areBoundsInside:()=>et,arrayRandomIndex:()=>J,calcExactPositionOrRandomFromSize:()=>D,calcExactPositionOrRandomFromSizeRanged:()=>H,calcPositionFromSize:()=>k,calcPositionOrRandomFromSize:()=>I,calcPositionOrRandomFromSizeRanged:()=>L,calculateBounds:()=>it,circleBounce:()=>ht,circleBounceDataFromParticle:()=>ct,clamp:()=>x,clear:()=>Xt,collisionVelocity:()=>R,colorMix:()=>Ft,colorToHsl:()=>Gt,colorToRgb:()=>Vt,deepExtend:()=>st,divMode:()=>rt,divModeExecute:()=>nt,drawEffect:()=>Jt,drawLine:()=>Qt,drawParticle:()=>Yt,drawParticlePlugin:()=>ie,drawPlugin:()=>ee,drawShape:()=>Kt,drawShapeAfterDraw:()=>te,errorPrefix:()=>g,executeOnSingleOrMultiple:()=>dt,findItemFromSingleOrMultiple:()=>pt,generatedAttribute:()=>i,getDistance:()=>G,getDistances:()=>V,getEasing:()=>_,getHslAnimationFromHsl:()=>qt,getHslFromAnimation:()=>$t,getLinkColor:()=>Ut,getLinkRandomColor:()=>Nt,getLogger:()=>N,getParticleBaseVelocity:()=>z,getParticleDirectionAngle:()=>E,getPosition:()=>yt,getRandom:()=>S,getRandomRgbColor:()=>Dt,getRangeMax:()=>A,getRangeMin:()=>T,getRangeValue:()=>O,getSize:()=>vt,getStyleFromHsl:()=>Bt,getStyleFromRgb:()=>Ht,hasMatchMedia:()=>j,hslToRgb:()=>It,hslaToRgba:()=>Lt,initParticleNumericAnimationValue:()=>gt,isArray:()=>xt,isBoolean:()=>wt,isDivModeEnabled:()=>ot,isFunction:()=>bt,isInArray:()=>X,isNumber:()=>_t,isObject:()=>St,isPointInside:()=>tt,isSsr:()=>q,isString:()=>mt,itemFromArray:()=>K,itemFromSingleOrMultiple:()=>ut,loadAll:()=>Kr,loadFont:()=>Y,loadOptions:()=>ri,loadParticlesOptions:()=>ci,mix:()=>P,mouseDownEvent:()=>s,mouseLeaveEvent:()=>n,mouseMoveEvent:()=>r,mouseOutEvent:()=>a,mouseUpEvent:()=>o,paintBase:()=>Wt,paintImage:()=>Zt,parseAlpha:()=>B,randomInRange:()=>C,rangeColorToHsl:()=>Et,rangeColorToRgb:()=>Mt,rectBounce:()=>lt,resizeEvent:()=>u,rgbToHsl:()=>zt,safeIntersectionObserver:()=>W,safeMatchMedia:()=>Q,safeMutationObserver:()=>Z,setLogger:()=>U,setRandom:()=>b,setRangeValue:()=>M,singleDivModeExecute:()=>at,stringToAlpha:()=>Rt,stringToRgb:()=>kt,touchCancelEvent:()=>d,touchEndEvent:()=>h,touchMoveEvent:()=>l,touchStartEvent:()=>c,tsParticles:()=>Gi,visibilityChangeEvent:()=>p});const i="generated",s="pointerdown",o="pointerup",n="pointerleave",a="pointerout",r="pointermove",c="touchstart",h="touchend",l="touchmove",d="touchcancel",u="resize",p="visibilitychange",g="tsParticles - Error";class f{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!_t(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:0}else{if(void 0===t||void 0===e)throw new Error(`${g} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??0}}static get origin(){return f.create(0,0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return f.create(t.x,t.y,t.z)}static create(t,e,i){return new f(t,e,i)}add(t){return f.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return f.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return f.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return f.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return f.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),0)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:0}sub(t){return f.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}}class y extends f{constructor(t,e){super(t,e,0)}static get origin(){return y.create(0,0)}static clone(t){return y.create(t.x,t.y)}static create(t,e){return new y(t,e)}}let v=Math.random;const w=new Map;function m(t,e){w.get(t)||w.set(t,e)}function _(t){return w.get(t)||(t=>t)}function b(t=Math.random){v=t}function S(){return x(v(),0,1-1e-16)}function x(t,e,i){return Math.min(Math.max(t,e),i)}function P(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function C(t){const e=A(t);let i=T(t);return e===i&&(i=0),S()*(e-i)+i}function O(t){return _t(t)?t:C(t)}function T(t){return _t(t)?t:t.min}function A(t){return _t(t)?t:t.max}function M(t,e){if(t===e||void 0===e&&_t(t))return t;const i=T(t),s=A(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:M(i,s)}function V(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.sqrt(i**2+s**2)}}function G(t,e){return V(t,e).distance}function E(t,e,i){if(_t(t))return t*Math.PI/180;switch(t){case"top":return.5*-Math.PI;case"top-right":return.25*-Math.PI;case"right":return 0;case"bottom-right":return.25*Math.PI;case"bottom":return.5*Math.PI;case"bottom-left":return.75*Math.PI;case"left":return Math.PI;case"top-left":return.75*-Math.PI;case"inside":return Math.atan2(i.y-e.y,i.x-e.x);case"outside":return Math.atan2(e.y-i.y,e.x-i.x);default:return S()*Math.PI*2}}function z(t){const e=y.origin;return e.length=1,e.angle=t,e}function R(t,e,i,s){return y.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function k(t){return t.position&&void 0!==t.position.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/100,y:t.position.y*t.size.height/100}:void 0}function I(t){return{x:(t.position?.x??100*S())*t.size.width/100,y:(t.position?.y??100*S())*t.size.height/100}}function L(t){const e={x:void 0!==t.position?.x?O(t.position.x):void 0,y:void 0!==t.position?.y?O(t.position.y):void 0};return I({size:t.size,position:e})}function D(t){return{x:t.position?.x??S()*t.size.width,y:t.position?.y??S()*t.size.height}}function H(t){const e={x:void 0!==t.position?.x?O(t.position.x):void 0,y:void 0!==t.position?.y?O(t.position.y):void 0};return D({size:t.size,position:e})}function B(t){return t?t.endsWith("%")?parseFloat(t)/100:parseFloat(t):1}const F={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function U(t){F.debug=t.debug||F.debug,F.error=t.error||F.error,F.info=t.info||F.info,F.log=t.log||F.log,F.verbose=t.verbose||F.verbose,F.warning=t.warning||F.warning}function N(){return F}function $(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:o,rectOtherSide:n,velocity:a,factor:r}=t;return s.min<n.min||s.min>n.max||s.max<n.min||s.max>n.max||(i.max>=o.min&&i.max<=.5*(o.max+o.min)&&a>0||i.min<=o.max&&i.min>.5*(o.max+o.min)&&a<0)&&(e.velocity=a*-r,e.bounced=!0),e}function q(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function j(){return!q()&&"undefined"!=typeof matchMedia}function Q(t){if(j())return matchMedia(t)}function W(t){if(!q()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function Z(t){if(!q()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}function X(t,e){return t===e||xt(e)&&e.indexOf(t)>-1}async function Y(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function J(t){return Math.floor(S()*t.length)}function K(t,e,i=!0){return t[void 0!==e&&i?e%t.length:J(t)]}function tt(t,e,i,s,o){return et(it(t,s??0),e,i,o)}function et(t,e,i,s){let o=!0;return s&&"bottom"!==s||(o=t.top<e.height+i.x),!o||s&&"left"!==s||(o=t.right>i.x),!o||s&&"right"!==s||(o=t.left<e.width+i.y),!o||s&&"top"!==s||(o=t.bottom>i.y),o}function it(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function st(t,...e){for(const i of e){if(null==i)continue;if(!St(i)){t=i;continue}const e=Array.isArray(i);!e||!St(t)&&t&&Array.isArray(t)?e||!St(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],o=t;o[e]=St(s)&&Array.isArray(s)?s.map((t=>st(o[e],t))):st(o[e],s)}}return t}function ot(t,e){return!!pt(e,(e=>e.enable&&X(t,e.mode)))}function nt(t,e,i){dt(e,(e=>{const s=e.mode;e.enable&&X(t,s)&&at(e,i)}))}function at(t,e){dt(t.selectors,(i=>{e(i,t)}))}function rt(t,e){if(e&&t)return pt(t,(t=>function(t,e){const i=dt(e,(e=>t.matches(e)));return xt(i)?i.some((t=>t)):i}(e,t.selectors)))}function ct(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:y.create(O(t.options.bounce.horizontal.value),O(t.options.bounce.vertical.value))}}function ht(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[o,n]=[t.position,e.position],{dx:a,dy:r}=V(n,o);if(i*a+s*r<0)return;const c=-Math.atan2(r,a),h=t.mass,l=e.mass,d=t.velocity.rotate(c),u=e.velocity.rotate(c),p=R(d,u,h,l),g=R(u,d,h,l),f=p.rotate(-c),y=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function lt(t,e){const i=it(t.getPosition(),t.getRadius()),s=t.options.bounce,o=$({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:O(s.horizontal.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.x=o.velocity),void 0!==o.position&&(t.position.x=o.position));const n=$({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:O(s.vertical.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.y=n.velocity),void 0!==n.position&&(t.position.y=n.position))}function dt(t,e){return xt(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function ut(t,e,i){return xt(t)?K(t,e,i):t}function pt(t,e){return xt(t)?t.find(((t,i)=>e(t,i))):e(t,0)?t:void 0}function gt(t,e){const i=t.value,s=t.animation,o={delayTime:1e3*O(s.delay),enable:s.enable,value:O(t.value)*e,max:A(i)*e,min:T(i)*e,loops:0,maxLoops:O(s.count),time:0};if(s.enable){switch(o.decay=1-O(s.decay),s.mode){case"increase":o.status="increasing";break;case"decrease":o.status="decreasing";break;case"random":o.status=S()>=.5?"increasing":"decreasing"}const t="auto"===s.mode;switch(s.startValue){case"min":o.value=o.min,t&&(o.status="increasing");break;case"max":o.value=o.max,t&&(o.status="decreasing");break;default:o.value=C(o),t&&(o.status=S()>=.5?"increasing":"decreasing")}}return o.initialValue=o.value,o}function ft(t,e){if(!("percent"===t.mode)){const{mode:e,...i}=t;return i}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 yt(t,e){return ft(t,e)}function vt(t,e){return ft(t,e)}function wt(t){return"boolean"==typeof t}function mt(t){return"string"==typeof t}function _t(t){return"number"==typeof t}function bt(t){return"function"==typeof t}function St(t){return"object"==typeof t&&null!==t}function xt(t){return Array.isArray(t)}const Pt="random",Ct="mid",Ot=new Map;function Tt(t){Ot.set(t.key,t)}function At(t){for(const[,e]of Ot)if(t.startsWith(e.stringPrefix))return e.parseString(t);const e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,e,i,s,o)=>e+e+i+i+s+s+(void 0!==o?o+o:""))),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);return i?{a:void 0!==i[4]?parseInt(i[4],16)/255:1,b:parseInt(i[3],16),g:parseInt(i[2],16),r:parseInt(i[1],16)}:void 0}function Mt(t,e,i=!0){if(!t)return;const s=mt(t)?{value:t}:t;if(mt(s.value))return Vt(s.value,e,i);if(xt(s.value))return Mt({value:K(s.value,e,i)});for(const[,t]of Ot){const e=t.handleRangeColor(s);if(e)return e}}function Vt(t,e,i=!0){if(!t)return;const s=mt(t)?{value:t}:t;if(mt(s.value))return s.value===Pt?Dt():kt(s.value);if(xt(s.value))return Vt({value:K(s.value,e,i)});for(const[,t]of Ot){const e=t.handleColor(s);if(e)return e}}function Gt(t,e,i=!0){const s=Vt(t,e,i);return s?zt(s):void 0}function Et(t,e,i=!0){const s=Mt(t,e,i);return s?zt(s):void 0}function zt(t){const e=t.r/255,i=t.g/255,s=t.b/255,o=Math.max(e,i,s),n=Math.min(e,i,s),a={h:0,l:.5*(o+n),s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=e===o?(i-s)/(o-n):a.h=i===o?2+(s-e)/(o-n):4+(e-i)/(o-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function Rt(t){return At(t)?.a}function kt(t){return At(t)}function It(t){const e=(t.h%360+360)%360,i=Math.max(0,Math.min(100,t.s)),s=e/360,o=i/100,n=Math.max(0,Math.min(100,t.l))/100;if(0===i){const t=Math.round(255*n);return{r:t,g:t,b:t}}const a=(t,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),6*i<1?t+6*(e-t)*i:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t),r=n<.5?n*(1+o):n+o-n*o,c=2*n-r,h=Math.min(255,255*a(c,r,s+1/3)),l=Math.min(255,255*a(c,r,s)),d=Math.min(255,255*a(c,r,s-1/3));return{r:Math.round(h),g:Math.round(l),b:Math.round(d)}}function Lt(t){const e=It(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Dt(t){const e=t??0;return{b:Math.floor(C(M(e,256))),g:Math.floor(C(M(e,256))),r:Math.floor(C(M(e,256)))}}function Ht(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??1})`}function Bt(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??1})`}function Ft(t,e,i,s){let o=t,n=e;return void 0===o.r&&(o=It(t)),void 0===n.r&&(n=It(e)),{b:P(o.b,n.b,i,s),g:P(o.g,n.g,i,s),r:P(o.r,n.r,i,s)}}function Ut(t,e,i){if(i===Pt)return Dt();if(i!==Ct)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ft(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return It(t)}}}function Nt(t,e,i){const s=mt(t)?t:t.value;return s===Pt?i?Mt({value:s}):e?Pt:Ct:s===Ct?Ct:Mt({value:s})}function $t(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function qt(t,e,i){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(jt(s.h,e.h,i),jt(s.s,e.s,i),jt(s.l,e.l,i)),s}function jt(t,e,i){t.enable=e.enable,t.enable?(t.velocity=O(e.speed)/100*i,t.decay=1-O(e.decay),t.status="increasing",t.loops=0,t.maxLoops=O(e.count),t.time=0,t.delayTime=1e3*O(e.delay),e.sync||(t.velocity*=S(),t.value*=S()),t.initialValue=t.value):t.velocity=0}function Qt(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Wt(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(0,0,e.width,e.height)}function Zt(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,0,0,e.width,e.height),t.globalAlpha=1)}function Xt(t,e){t.clearRect(0,0,e.width,e.height)}function Yt(t){const{container:e,context:i,particle:s,delta:o,colorStyles:n,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:0),g=Math.sin(p),f=Math.cos(p),y={a:f*(d.a??1),b:g*(d.b??1),c:-g*(d.c??1),d:f*(d.d??1)};i.setTransform(y.a,y.b,y.c,y.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const v=s.shadowColor;l.enable&&v&&(i.shadowBlur=l.blur,i.shadowColor=Ht(v),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),n.fill&&(i.fillStyle=n.fill);const w=s.strokeWidth??0;i.lineWidth=w,n.stroke&&(i.strokeStyle=n.stroke);const m={container:e,context:i,particle:s,radius:c,opacity:h,delta:o,transformData:y};i.beginPath(),Kt(m),s.shapeClose&&i.closePath(),w>0&&i.stroke(),s.shapeFill&&i.fill(),te(m),Jt(m),i.globalCompositeOperation="source-over",i.setTransform(1,0,0,1,0,0)}function Jt(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a,transformData:r}=t;if(!s.effect)return;const c=e.effectDrawers.get(s.effect);c&&c.draw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Kt(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a,transformData:r}=t;if(!s.shape)return;const c=e.shapeDrawers.get(s.shape);c&&c.draw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function te(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a,transformData:r}=t;if(!s.shape)return;const c=e.shapeDrawers.get(s.shape);c&&c.afterDraw&&c.afterDraw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function ee(t,e,i){e.draw&&e.draw(t,i)}function ie(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}function se(t,e,i){return{h:t.h,s:t.s,l:t.l+("darken"===e?-1:1)*i}}function oe(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ne{constructor(t){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw&&e.afterDraw(t)},this._applyPreDrawUpdaters=(t,e,i,s,o,n)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:n,stroke:r}=a.getColorStyles(e,t,i,s);n&&(o.fill=n),r&&(o.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)oe(n,t,e)}a.beforeDraw&&a.beforeDraw(e)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize&&t.resize()},this._getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Et(s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Et(s.particleStrokeColor(t))),e&&i)break;return[e,i]},this._initCover=()=>{const t=this.container.actualOptions.backgroundMask.cover,e=Mt(t.color);if(e){const i={...e,a:t.opacity};this._coverColorStyle=Ht(i,i.a)}},this._initStyle=()=>{const t=this.element,e=this.container.actualOptions;if(t){this._fullScreen?(this._originalStyle=st({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style)continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}},this._initTrail=async()=>{const t=this.container.actualOptions,e=t.particles.move.trail,i=e.fill;if(e.enable)if(i.color){const e=Mt(i.color);if(!e)return;const s=t.particles.move.trail;this._trailFill={color:{...e},opacity:1/s.length}}else await new Promise(((t,s)=>{if(!i.image)return;const o=document.createElement("img");o.addEventListener("load",(()=>{this._trailFill={image:o,opacity:1/e.length},t()})),o.addEventListener("error",(t=>{s(t.error)})),o.src=i.image}))},this._paintBase=t=>{this.draw((e=>Wt(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>Zt(i,this.size,t,e)))},this._repairStyle=()=>{const t=this.element;t&&(this._safeMutationObserver((t=>t.disconnect())),this._initStyle(),this.initBackground(),this._safeMutationObserver((e=>e.observe(t,{attributes:!0}))))},this._resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;if(!t||!e)return;const i=t.style;i.position=e.position,i.zIndex=e.zIndex,i.top=e.top,i.left=e.left,i.width=e.width,i.height=e.height},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;if(!t)return;const e="important",i=t.style;i.setProperty("position","fixed",e),i.setProperty("z-index",this.container.actualOptions.fullScreen.zIndex.toString(10),e),i.setProperty("top","0",e),i.setProperty("left","0",e),i.setProperty("width","100%",e),i.setProperty("height","100%",e)},this.size={height:0,width:0},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,e=t.particles.move.trail,i=this._trailFill;t.backgroundMask.enable?this.paint():e.enable&&e.length>0&&i?i.color?this._paintBase(Ht(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):t.clear&&this.draw((t=>{Xt(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t&&t.remove()}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),o=t.getStrokeColor()??s;let[n,a]=this._getPluginParticleColors(t);n||(n=s),a||(a=o),(n||a)&&this.draw((s=>{const o=this.container,r=o.actualOptions,c=t.options.zIndex,h=(1-t.zIndexFactor)**c.opacityRate,l=t.bubble.opacity??t.opacity?.value??1,d=l*h,u=(t.strokeOpacity??l)*h,p={},g={fill:n?Bt(n,d):void 0};g.stroke=a?Bt(a,u):g.fill,this._applyPreDrawUpdaters(s,t,i,d,g,p),Yt({container:o,context:s,particle:t,delta:e,colorStyles:g,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*(1-t.zIndexFactor)**c.sizeRate,opacity:d,shadow:t.options.shadow,transform:p}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>ie(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>ee(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=Z((t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),this._initCover();try{await this._initTrail()}catch(t){N().error(t)}this.initBackground(),this._safeMutationObserver((t=>{this.element&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,e=this.element;if(!e)return;const i=e.style;if(i){if(t.color){const e=Mt(t.color);i.backgroundColor=e?Ht(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}initPlugins(){this._resizePlugins=[];for(const[,t]of this.container.plugins)t.resize&&this._resizePlugins.push(t),(t.particleFillColor||t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles||t.getTransformValues||t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove(),this._generated=t.dataset&&i in t.dataset?"true"===t.dataset[i]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=st({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>{this.element&&t.observe(this.element,{attributes:!0})})),this.container.retina.init(),this.initBackground()}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Xt(e,this.size),this._paintBase(this._coverColorStyle)):this._paintBase()}))}resize(){if(!this.element)return!1;const t=this.container,e=t.retina.pixelRatio,i=t.canvas.size,s=this.element.offsetWidth*e,o=this.element.offsetHeight*e;if(o===i.height&&s===i.width&&o===this.element.height&&s===this.element.width)return!1;const n={...i};return this.element.width=i.width=this.element.offsetWidth*e,this.element.height=i.height=this.element.offsetHeight*e,this.container.started&&t.particles.setResizeFactor({width:i.width/n.width,height:i.height/n.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Xt(t,this.size)))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}}function ae(t,e,i,s,o){if(s){let s={passive:!0};wt(o)?s.capture=o:void 0!==o&&(s=o),t.addEventListener(e,i,s)}else{const s=o;t.removeEventListener(e,i,s)}}class re{constructor(t){this.container=t,this._doMouseTouchClick=t=>{const e=this.container,i=e.actualOptions;if(this._canPush){const t=e.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=(new Date).getTime();dt(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),500)},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,o=s.defaultThemes,n=e.matches?o.dark:o.light,a=s.themes.find((t=>t.name===n));a&&a.default.auto&&i.loadTheme(n)},this._handleVisibilityChange=()=>{const t=this.container,e=t.actualOptions;this._mouseTouchFinish(),e.pauseOnBlur&&(document&&document.hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.getAnimationStatus()?t.play(!0):t.draw(!0)))},this._handleWindowResize=async()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout),this._resizeTimeout=setTimeout((async()=>{const t=this.container.canvas;t&&await t.windowResize()}),1e3*this.container.actualOptions.interactivity.events.resize.delay)},this._manageInteractivityListeners=(t,e)=>{const i=this._handlers,n=this.container,a=n.actualOptions,u=n.interactivity.element;if(!u)return;const p=u,g=n.canvas.element;g&&(g.style.pointerEvents=p===g?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(ae(u,r,i.mouseMove,e),ae(u,c,i.touchStart,e),ae(u,l,i.touchMove,e),a.interactivity.events.onClick.enable?(ae(u,h,i.touchEndClick,e),ae(u,o,i.mouseUp,e),ae(u,s,i.mouseDown,e)):ae(u,h,i.touchEnd,e),ae(u,t,i.mouseLeave,e),ae(u,d,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,o=i.canvas.element;let r=n;"window"===s?(i.interactivity.element=window,r=a):i.interactivity.element="parent"===s&&o?o.parentElement??o.parentNode:o,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(r,t),document&&ae(document,p,e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=Q("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):ae(i,"change",e.themeChange,t))},this._manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver)return void ae(window,u,e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((async t=>{t.find((t=>t.target===s))&&await this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container;if(!t)return;const{mouse:e}=t;e.clicking=!0,e.downPosition=e.position},this._mouseTouchClick=t=>{const e=this.container,i=e.actualOptions,{mouse:s}=e.interactivity;s.inside=!0;let o=!1;const n=s.position;if(n&&i.interactivity.events.onClick.enable){for(const[,t]of e.plugins)if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=n,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,o=e.canvas.element;if(!s||!s.element)return;let n;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(o){const t=o.getBoundingClientRect();n={x:e.clientX-t.left,y:e.clientY-t.top}}}else if("parent"===i.interactivity.detectsOn){const t=e.target,i=e.currentTarget;if(t&&i&&o){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),r=o.getBoundingClientRect();n={x:e.offsetX+2*s.left-(a.left+r.left),y:e.offsetY+2*s.top-(a.top+r.top)}}else n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===o&&(n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,o){const e=t,i=e.touches[e.touches.length-1],s=o.getBoundingClientRect();n={x:i.clientX-(s.left??0),y:i.clientY-(s.top??0)}}const a=e.retina.pixelRatio;n&&(n.x*=a,n.y*=a),s.mouse.position=n,s.status=r},this._touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:t=>this._mouseTouchMove(t),mouseUp:t=>this._mouseTouchClick(t),touchStart:t=>this._touchStart(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:t=>this._touchEnd(t),touchCancel:t=>this._touchEnd(t),touchEndClick:t=>this._touchEndClick(t),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}class ce{constructor(){this.value=""}static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(mt(e)||xt(e)?i.load({value:e}):i.load(e)),i}load(t){void 0!==t?.value&&(this.value=t.value)}}class he{constructor(){this.color=new ce,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class le{constructor(){this.color=new ce,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class de{constructor(){this.composite="destination-out",this.cover=new le,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=mt(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class ue{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class pe{constructor(){this.enable=!1,this.mode=[]}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class ge{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}load(t){t&&(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class fe{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class ye{constructor(){this.enable=!1,this.mode=[],this.parallax=new fe}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class ve{constructor(){this.delay=.5,this.enable=!0}load(t){void 0!==t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class we{constructor(){this.onClick=new pe,this.onDiv=new ge,this.onHover=new ye,this.resize=new ve}load(t){if(!t)return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=dt(e,(t=>{const e=new ge;return e.load(t),e}))),this.onHover.load(t.onHover),this.resize.load(t.resize)}}class me{constructor(t,e){this._engine=t,this._container=e}load(t){if(!t)return;if(!this._container)return;const e=this._engine.interactors.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class _e{constructor(t,e){this.detectsOn="window",this.events=new we,this.modes=new me(t,e)}load(t){if(!t)return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class be{load(t){t&&(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??"percent"}),t.options&&(this.options=st({},t.options)))}}class Se{constructor(){this.maxWidth=1/0,this.options={},this.mode="canvas"}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&("screen"===t.mode?this.mode="screen":this.mode="canvas"),void 0!==t.options&&(this.options=st({},t.options)))}}class xe{constructor(){this.auto=!1,this.mode="any",this.value=!1}load(t){t&&(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Pe{constructor(){this.name="",this.default=new xe}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=st({},t.options)))}}class Ce{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=M(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.delay&&(this.delay=M(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Oe extends Ce{constructor(){super(),this.mode="auto",this.startValue="random"}load(t){super.load(t),t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Te extends Ce{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),t&&void 0!==t.offset&&(this.offset=M(t.offset))}}class Ae{constructor(){this.h=new Te,this.s=new Te,this.l=new Te}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Me extends ce{constructor(){super(),this.animation=new Ae}static create(t,e){const i=new Me;return i.load(t),void 0!==e&&(mt(e)||xt(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&(void 0!==e.enable?this.animation.h.load(e):this.animation.load(t.animation))}}class Ve{constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class Ge{constructor(){this.enable=!0,this.retries=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class Ee{constructor(){this.value=0}load(t){t&&void 0!==t.value&&(this.value=M(t.value))}}class ze extends Ee{constructor(){super(),this.animation=new Ce}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Re extends ze{constructor(){super(),this.animation=new Oe}load(t){super.load(t)}}class ke extends Ee{constructor(){super(),this.value=1}}class Ie{constructor(){this.horizontal=new ke,this.vertical=new ke}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Le{constructor(){this.absorb=new Ve,this.bounce=new Ie,this.enable=!1,this.maxSpeed=50,this.mode="bounce",this.overlap=new Ge}load(t){t&&(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.maxSpeed&&(this.maxSpeed=M(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class De{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=st(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class He{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=M(t.offset)),void 0!==t.value&&(this.value=M(t.value)))}}class Be{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(t&&(void 0!==t.distance&&(this.distance=M(t.distance)),void 0!==t.enable&&(this.enable=t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class Fe{constructor(){this.x=50,this.y=50,this.mode="percent",this.radius=0}load(t){t&&(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Ue{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=M(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=M(t.maxSpeed)))}}class Ne{constructor(){this.clamp=!0,this.delay=new Ee,this.enable=!1,this.options={}}load(t){t&&(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=st(this.options,t.options)))}}class $e{load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class qe{constructor(){this.enable=!1,this.length=10,this.fill=new $e}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.fill&&this.fill.load(t.fill),void 0!==t.length&&(this.length=t.length))}}class je{constructor(){this.default="out"}load(t){t&&(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class Qe{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=M(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=st({},t.position)))}}class We{constructor(){this.angle=new He,this.attract=new Be,this.center=new Fe,this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new Ue,this.path=new Ne,this.outModes=new je,this.random=!1,this.size=!1,this.speed=2,this.spin=new Qe,this.straight=!1,this.trail=new qe,this.vibrate=!1,this.warp=!1}load(t){if(!t)return;this.angle.load(_t(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=_t(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=M(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(St(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=M(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Ze extends Oe{constructor(){super(),this.destroy="none",this.speed=2}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Xe extends Re{constructor(){super(),this.animation=new Ze,this.value=1}load(t){if(!t)return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ye{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class Je{constructor(){this.mode="delete",this.value=0}load(t){t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ke{constructor(){this.density=new Ye,this.limit=new Je,this.value=0}load(t){t&&(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class ti{constructor(){this.blur=0,this.color=new ce,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=ce.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class ei{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=st(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class ii extends Oe{constructor(){super(),this.destroy="none",this.speed=5}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class si extends Re{constructor(){super(),this.animation=new ii,this.value=3}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class oi{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=Me.create(this.color,t.color)),void 0!==t.width&&(this.width=M(t.width)),void 0!==t.opacity&&(this.opacity=M(t.opacity)))}}class ni extends Ee{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),t&&(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class ai{constructor(t,e){this._engine=t,this._container=e,this.bounce=new Ie,this.collisions=new Le,this.color=new Me,this.color.value="#fff",this.effect=new De,this.groups={},this.move=new We,this.number=new Ke,this.opacity=new Xe,this.reduceDuplicates=!1,this.shadow=new ti,this.shape=new ei,this.size=new si,this.stroke=new oi,this.zIndex=new ni}load(t){if(!t)return;if(void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!Object.hasOwn(t.groups,e))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=st(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.color.load(Me.create(this.color,t.color)),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=st({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=dt(e,(t=>{const e=new oi;return e.load(t),e}))),this._container){const e=this._engine.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t);const i=this._engine.interactors.get(this._container);if(i)for(const e of i)e.loadParticlesOptions&&e.loadParticlesOptions(this,t)}}}function ri(t,...e){for(const i of e)t.load(i)}function ci(t,e,...i){const s=new ai(t,e);return ri(s,...i),s}class hi{constructor(t,e){this._findDefaultTheme=t=>this.themes.find((e=>e.default.value&&e.default.mode===t))??this.themes.find((t=>t.default.value&&"any"===t.default.mode)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new he,this.backgroundMask=new de,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new ue,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new _e(t,e),this.manualParticles=[],this.particles=ci(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(t){if(!t)return;void 0!==t.preset&&dt(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=M(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=M(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;wt(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new be;return e.load(t),e}))),this.particles.load(t.particles),this.style=st(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const o=this._engine.interactors.get(this._container);if(o)for(const e of o)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new Se;t.load(e),this.responsive.push(t)}if(this.responsive.sort(((t,e)=>t.maxWidth-e.maxWidth)),void 0!==t.themes)for(const e of t.themes){const t=this.themes.find((t=>t.name===e.name));if(t)t.load(e);else{const t=new Pe;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme("dark")?.name,this.defaultThemes.light=this._findDefaultTheme("light")?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>"screen"===i.mode&&screen?i.maxWidth>screen.availWidth:i.maxWidth*e>t));return this.load(s?.options),s?.maxWidth}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t=Q("(prefers-color-scheme: dark)"),e=t&&t.matches,i=this._findDefaultTheme(e?"dark":"light");i&&this.load(i.options)}}}class li{constructor(t,e){this.container=e,this._engine=t,this._interactors=t.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[]}async externalInteract(t){for(const e of this._externalInteractors)e.isEnabled()&&await e.interact(t)}handleClickMode(t){for(const e of this._externalInteractors)e.handleClickMode&&e.handleClickMode(t)}init(){this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case"external":this._externalInteractors.push(t);break;case"particles":this._particleInteractors.push(t)}t.init()}}async particlesInteract(t,e){for(const i of this._externalInteractors)i.clear(t,e);for(const i of this._particleInteractors)i.isEnabled(t)&&await i.interact(t,e)}async reset(t){for(const e of this._externalInteractors)e.isEnabled()&&e.reset(t);for(const e of this._particleInteractors)e.isEnabled(t)&&e.reset(t)}}function di(t){if(!X(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class ui{constructor(t,e,i,s,o,n){this.container=i,this._calcPosition=(t,e,i,s=0)=>{for(const[,s]of t.plugins){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return f.create(t.x,t.y,i)}const o=D({size:t.canvas.size,position:e}),n=f.create(o.x,o.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{di({outMode:e,checkModes:["bounce","bounce-horizontal"],coord:n.x,maxCoord:t.canvas.size.width,setCb:t=>n.x+=t,radius:a})},h=e=>{di({outMode:e,checkModes:["bounce","bounce-vertical"],coord:n.y,maxCoord:t.canvas.size.height,setCb:t=>n.y+=t,radius:a})};return c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(n,s)?this._calcPosition(t,void 0,i,s+1):n},this._calculateVelocity=()=>{const t=z(this.direction).copy(),e=this.options.move;if("inside"===e.direction||"outside"===e.direction)return t;const i=Math.PI/180*O(e.angle.value),s=Math.PI/180*O(e.angle.offset),o={left:s-.5*i,right:s+.5*i};return e.straight||(t.angle+=C(M(o.left,o.right))),e.random&&"number"==typeof e.speed&&(t.length*=S()),t},this._checkOverlap=(t,e=0)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const o=i.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&e>n)throw new Error(`${g} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>G(t,e.position)<s+e.getRadius()))},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?2:1,i=this.roll.horizontal?.5*Math.PI:0;return Math.floor(((this.roll.angle??0)+i)/(Math.PI/e))%2?this.backColor?this.backColor:this.roll.alter?se(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=O(this.options.zIndex.value);this.position=this._calcPosition(e,t,x(i,0,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...yt(this.options.move.center,s),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??"percent"},this.direction=E(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.offset=y.origin},this._engine=t,this.init(e,s,o,n)}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.container,i=this.pathGenerator,s=e.shapeDrawers.get(this.shape);s&&s.particleDestroy&&s.particleDestroy(this);for(const[,i]of e.plugins)i.particleDestroyed&&i.particleDestroyed(this,t);for(const i of e.particles.updaters)i.particleDestroyed&&i.particleDestroyed(this,t);i&&i.reset(this)}draw(t){const e=this.container,i=e.canvas;for(const[,s]of e.plugins)i.drawParticlePlugin(s,this,t);i.drawParticle(this,t)}getFillColor(){return this._getRollColor(this.bubble.color??$t(this.color))}getMass(){return this.getRadius()**2*Math.PI*.5}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??$t(this.strokeColor))}init(t,e,i,s){const o=this.container,n=this._engine;this.id=t,this.group=s,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.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const a=o.retina.pixelRatio,r=o.actualOptions,c=ci(this._engine,o,r.particles),h=c.effect.type,l=c.shape.type,{reduceDuplicates:d}=c;this.effect=ut(h,this.id,d),this.shape=ut(l,this.id,d);const u=c.effect,p=c.shape;if(i){if(i.effect&&i.effect.type){const t=ut(i.effect.type,this.id,d);t&&(this.effect=t,u.load(i.effect))}if(i.shape&&i.shape.type){const t=ut(i.shape.type,this.id,d);t&&(this.shape=t,p.load(i.shape))}}this.effectData=function(t,e,i,s){const o=e.options[t];if(o)return st({close:e.close,fill:e.fill},ut(o,i,s))}(this.effect,u,this.id,d),this.shapeData=function(t,e,i,s){const o=e.options[t];if(o)return st({close:e.close,fill:e.fill},ut(o,i,s))}(this.shape,p,this.id,d),c.load(i);const g=this.effectData;g&&c.load(g.particles);const f=this.shapeData;f&&c.load(f.particles);const y=new _e(n,o);y.load(o.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=g?.fill??c.effect.fill,this.effectClose=g?.close??c.effect.close,this.shapeFill=f?.fill??c.shape.fill,this.shapeClose=f?.close??c.shape.close,this.options=c;const v=this.options.move.path;this.pathDelay=1e3*O(v.delay.value),v.generator&&(this.pathGenerator=this._engine.getPathGenerator(v.generator),this.pathGenerator&&o.addPath(v.generator,this.pathGenerator)&&this.pathGenerator.init(o)),o.retina.initParticle(this),this.size=gt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-O(this.options.move.decay);const w=o.particles;w.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24;let m=o.effectDrawers.get(this.effect);m||(m=this._engine.getEffectDrawer(this.effect),m&&o.effectDrawers.set(this.effect,m)),m&&m.loadEffect&&m.loadEffect(this);let _=o.shapeDrawers.get(this.shape);_||(_=this._engine.getShapeDrawer(this.shape),_&&o.shapeDrawers.set(this.shape,_)),_&&_.loadShape&&_.loadShape(this);const b=_?.getSidesCount;b&&(this.sides=b(this)),this.spawning=!1,this.shadowColor=Mt(this.options.shadow.color);for(const t of w.updaters)t.init(this);for(const t of w.movers)t.init&&t.init(this);m&&m.particleInit&&m.particleInit(o,this),_&&_.particleInit&&_.particleInit(o,this);for(const[,t]of o.plugins)t.particleCreated&&t.particleCreated(this)}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset&&t.reset(this)}}class pi{constructor(t,e){this.position=t,this.particle=e}}class gi{constructor(t,e){this.position={x:t,y:e}}}class fi extends gi{constructor(t,e,i,s){super(t,e),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){t instanceof yi&&t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,o=t.position,n=t instanceof fi?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+e&&o.x+a>s.x&&o.y<s.y+i&&o.y+r>s.y}}class yi extends gi{constructor(t,e,i){super(t,e),this.radius=i}contains(t){return G(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y),n=this.radius;if(t instanceof yi){return n+t.radius>Math.sqrt(s**2+o**2)}if(t instanceof fi){const{width:e,height:i}=t.size;return Math.pow(s-e,2)+Math.pow(o-i,2)<=n**2||s<=n+e&&o<=n+i||s<=e||o<=i}return!1}}class vi{constructor(t,e){this.rectangle=t,this.capacity=e,this._subdivide=()=>{const{x:t,y:e}=this.rectangle.position,{width:i,height:s}=this.rectangle.size,{capacity:o}=this;for(let n=0;n<4;n++)this._subs.push(new vi(new fi(t+.5*i*(n%2),e+.5*s*(Math.round(.5*n)-n%2),.5*i,.5*s),o));this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((e=>e.insert(t)))))}query(t,e,i){const s=i||[];if(!t.intersects(this.rectangle))return[];for(const i of this._points)!t.contains(i.position)&&G(t.position,i.position)>i.particle.getRadius()&&(!e||e(i.particle))||s.push(i.particle);if(this._divided)for(const i of this._subs)i.query(t,e,s);return s}queryCircle(t,e,i){return this.query(new yi(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new fi(t.x,t.y,e.width,e.height),i)}}const wi=t=>{const{height:e,width:i}=t;return new fi(-.25*i,-.25*e,1.5*i,1.5*e)};class mi{constructor(t,e){this._applyDensity=(t,e,i)=>{const s=t.number;if(!t.number.density?.enable)return void(void 0===i?this._limit=s.limit.value:this._groupLimits.set(i,s.limit.value));const o=this._initDensityFactor(s.density),n=s.value,a=s.limit.value>0?s.limit.value:n,r=Math.min(n,a)*o+e,c=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=s.limit.value*o:this._groupLimits.set(i,s.limit.value*o),c<r?this.push(Math.abs(r-c),void 0,t,i):c>r&&this.removeQuantity(c-r,i)},this._initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)},this._pushParticle=(t,e,i,s)=>{try{let o=this._pool.pop();o?o.init(this._nextId,t,e,i):o=new ui(this._engine,this._nextId,this._container,t,e,i);let n=!0;if(s&&(n=s(o)),!n)return;return this._array.push(o),this._zArray.push(o),this._nextId++,this._engine.dispatchEvent("particleAdded",{container:this._container,data:{particle:o}}),o}catch(t){return void N().warning(`${g} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;s.destroy(i);const o=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(o,1),this._pool.push(s),this._engine.dispatchEvent("particleRemoved",{container:this._container,data:{particle:s}}),!0},this._engine=t,this._container=e,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 li(t,e);const i=e.canvas.size;this.quadTree=new vi(wi(i),4),this.movers=this._engine.getMovers(e,!0),this.updaters=this._engine.getUpdaters(e,!0)}get count(){return this._array.length}addManualParticles(){const t=this._container,e=t.actualOptions;for(const i of e.manualParticles)this.addParticle(i.position?yt(i.position,t.canvas.size):void 0,i.options)}addParticle(t,e,i,s){const o=this._container.actualOptions.particles.number.limit,n=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(n>0)if("delete"===o.mode){const t=a+1-n;t>0&&this.removeQuantity(t)}else if("wait"===o.mode&&a>=n)return;return this._pushParticle(t,e,i,s)}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}async draw(t){const e=this._container,i=e.canvas;i.clear(),await this.update(t);for(const[,s]of e.plugins)i.drawPlugin(s,t);for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}init(){const t=this._container,e=t.actualOptions;this._lastZIndex=0,this._needsSort=!1;let i=!1;this.updaters=this._engine.getUpdaters(t,!0),this._interactionManager.init();for(const[,e]of t.plugins)if(void 0!==e.particlesInitialization&&(i=e.particlesInitialization()),i)break;this._interactionManager.init();for(const[,e]of t.pathGenerators)e.init(t);if(this.addManualParticles(),!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];for(let i=this.count,o=0;o<s.number?.value&&i<t.number.value;i++,o++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let o=0;o<t;o++)this.addParticle(e?.position,i,s)}async redraw(){this.clear(),this.init(),await this.draw({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<e&&n<this.count;n++)this._removeParticle(n--,i,s)&&o++}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;for(const t in e)this._applyDensity(e[t],0,t);this._applyDensity(t.particles,t.manualParticles.length)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}async update(t){const e=this._container,i=new Set;this.quadTree=new vi(wi(e.canvas.size),4);for(const[,t]of e.pathGenerators)t.update();for(const[,i]of e.plugins)i.update&&await i.update(t);const s=this._resizeFactor;for(const e of this._array){s&&!e.ignoresResizeRatio&&(e.position.x*=s.width,e.position.y*=s.height,e.initialPosition.x*=s.width,e.initialPosition.y*=s.height),e.ignoresResizeRatio=!1,await this._interactionManager.reset(e);for(const[,i]of this._container.plugins){if(e.destroyed)break;i.particleUpdate&&i.particleUpdate(e,t)}for(const i of this.movers)i.isEnabled(e)&&i.move(e,t);e.destroyed?i.add(e):this.quadTree.insert(new pi(e.getPosition(),e))}if(i.size){const t=t=>!i.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t),this._pool.push(...i)}await this._interactionManager.externalInteract(t);for(const e of this._array){for(const i of this.updaters)i.update(e,t);e.destroyed||e.spawning||await this._interactionManager.particlesInteract(e,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this._lastZIndex=t[t.length-1].position.z,this._needsSort=!1}}}class _i{constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||q()?1:window.devicePixelRatio,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}const o=e.particles,n=o.move;this.maxSpeed=O(n.gravity.maxSpeed)*i,this.sizeAnimationSpeed=O(o.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,o=s.distance,n=t.retina;n.moveDrift=O(s.drift)*i,n.moveSpeed=O(s.speed)*i,n.sizeAnimationSpeed=O(e.size.animation.speed)*i;const a=n.maxDistance;a.horizontal=void 0!==o.horizontal?o.horizontal*i:void 0,a.vertical=void 0!==o.vertical?o.vertical*i:void 0,n.maxSpeed=O(s.gravity.maxSpeed)*i}}function bi(t){return t&&!t.destroyed}function Si(t,e,...i){const s=new hi(t,e);return ri(s,...i),s}class xi{constructor(t,e,i){this._intersectionManager=t=>{if(bi(this)&&this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play:this.pause)()},this._nextFrame=async t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+1e3/this.fpsLimit)return void this.draw(!1);this._lastFrameTime??=t;const e=function(t,e=60,i=!1){return{value:t,factor:i?60/e:60*t/1e3}}(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(e.value),this._lastFrameTime=t,e.value>1e3)return void this.draw(!1);if(await this.particles.draw(e),!this.alive())return void this.destroy();this.getAnimationStatus()&&this.draw(!1)}catch(t){N().error(`${g} in animation loop`,t)}},this._engine=t,this.id=Symbol(e),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._sourceOptions=i,this._initialSourceOptions=i,this.retina=new _i(this),this.canvas=new ne(this),this.particles=new mi(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=Si(this._engine,this),this.actualOptions=Si(this._engine,this),this._eventListeners=new re(this),this._intersectionObserver=W((t=>this._intersectionManager(t))),this._engine.dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!bi(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!bi(this))return;const o=this.retina.pixelRatio,n={x:i.x*o,y:i.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(e,a)};let s=!1,o=!1;e.addEventListener("click",(t=>{if(!bi(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,1)})),e.addEventListener("touchstart",(()=>{bi(this)&&(s=!0,o=!1)})),e.addEventListener("touchmove",(()=>{bi(this)&&(o=!0)})),e.addEventListener("touchend",(t=>{if(bi(this)){if(s&&!o){const e=t;let s=e.touches[e.touches.length-1];if(!s&&(s=e.changedTouches[e.changedTouches.length-1],!s))return;const o=this.canvas.element,n=o?o.getBoundingClientRect():void 0,a={x:s.clientX-(n?n.left:0),y:s.clientY-(n?n.top:0)};i(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,o=!1}})),e.addEventListener("touchcancel",(()=>{bi(this)&&(s=!1,o=!1)}))}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!bi(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(){if(!bi(this))return;this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy&&t.destroy(this);for(const[,t]of this.shapeDrawers)t.destroy&&t.destroy(this);for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);this._engine.clearPlugins(this),this.destroyed=!0;const t=this._engine.dom(),e=t.findIndex((t=>t===this));e>=0&&t.splice(e,1),this._engine.dispatchEvent("containerDestroyed",{container:this})}draw(t){if(!bi(this))return;let e=t;this._drawAnimationFrame=requestAnimationFrame((async t=>{e&&(this._lastFrameTime=void 0,e=!1),await this._nextFrame(t)}))}async export(t,e={}){for(const[,i]of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}N().error(`${g} - Export plugin with type ${t} not found`)}getAnimationStatus(){return!this._paused&&!this.pageHidden&&bi(this)}handleClickMode(t){if(bi(this)){this.particles.handleClickMode(t);for(const[,e]of this.plugins)e.handleClickMode&&e.handleClickMode(t)}}async init(){if(!bi(this))return;const t=this._engine.getSupportedEffects();for(const e of t){const t=this._engine.getEffectDrawer(e);t&&this.effectDrawers.set(e,t)}const e=this._engine.getSupportedShapes();for(const t of e){const e=this._engine.getShapeDrawer(t);e&&this.shapeDrawers.set(t,e)}this._options=Si(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=Si(this._engine,this,this._options);const i=this._engine.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize(),this.zLayers=this.actualOptions.zLayers,this._duration=1e3*O(this.actualOptions.duration),this._delay=1e3*O(this.actualOptions.delay),this._lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120,this._smooth=this.actualOptions.smooth;for(const[,t]of this.effectDrawers)t.init&&await t.init(this);for(const[,t]of this.shapeDrawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init&&await t.init();this._engine.dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)t.particlesSetup&&t.particlesSetup();this._engine.dispatchEvent("particlesSetup",{container:this})}async loadTheme(t){bi(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(bi(this)&&(void 0!==this._drawAnimationFrame&&(cancelAnimationFrame(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent("containerPaused",{container:this})}}play(t){if(!bi(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const[,t]of this.plugins)t.play&&t.play();this._engine.dispatchEvent("containerPlay",{container:this}),this.draw(e||!1)}else this._firstStart=!1}async refresh(){if(bi(this))return this.stop(),this.start()}async reset(){if(bi(this))return this._initialSourceOptions=void 0,this._options=Si(this._engine,this),this.actualOptions=Si(this._engine,this,this._options),this.refresh()}async start(){bi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{this._delayTimeout=setTimeout((async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)t.start&&await t.start();this._engine.dispatchEvent("containerStarted",{container:this}),this.play(),t()}),this._delay)})))}stop(){if(bi(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(const[,t]of this.plugins)t.stop&&t.stop();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent("containerStopped",{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}class Pi{constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i&&i.forEach((t=>t(e)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,o=i.indexOf(e);o<0||(1===s?this._listeners.delete(t):i.splice(o,1))}}function Ci(t,e,i,s=!1){let o=e.get(t);return o&&!s||(o=[...i.values()].map((e=>e(t))),e.set(t,o)),o}class Oi{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new Pi,this._initialized=!1,this.plugins=[],this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}get version(){return"3.0.0"}addConfig(t){const e=t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent("configAdded",{data:{name:e,config:t}})}async addEffect(t,e,i=!0){dt(t,(t=>{!this.getEffectDrawer(t)&&this.effectDrawers.set(t,e)})),await this.refresh(i)}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}async addInteractor(t,e,i=!0){this._initializers.interactors.set(t,e),await this.refresh(i)}async addMover(t,e,i=!0){this._initializers.movers.set(t,e),await this.refresh(i)}async addParticleUpdater(t,e,i=!0){this._initializers.updaters.set(t,e),await this.refresh(i)}async addPathGenerator(t,e,i=!0){!this.getPathGenerator(t)&&this.pathGenerators.set(t,e),await this.refresh(i)}async addPlugin(t,e=!0){!this.getPlugin(t.id)&&this.plugins.push(t),await this.refresh(e)}async addPreset(t,e,i=!1,s=!0){(i||!this.getPreset(t))&&this.presets.set(t,e),await this.refresh(s)}async addShape(t,e,i=!0){dt(t,(t=>{!this.getShapeDrawer(t)&&this.shapeDrawers.set(t,e)})),await this.refresh(i)}clearPlugins(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}dom(){return this._domArray}domItem(t){const e=this.dom(),i=e[t];if(i&&!i.destroyed)return i;e.splice(t,1)}getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,i.getPlugin(t));return e}getEffectDrawer(t){return this.effectDrawers.get(t)}getInteractors(t,e=!1){return Ci(t,this.interactors,this._initializers.interactors,e)}getMovers(t,e=!1){return Ci(t,this.movers,this._initializers.movers,e)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((e=>e.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.shapeDrawers.get(t)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}getUpdaters(t,e=!1){return Ci(t,this.updaters,this._initializers.updaters,e)}init(){this._initialized||(this._initialized=!0)}async load(t){const e=t.id??`tsparticles${Math.floor(1e4*S())}`,{index:s,url:o}=t,n=o?await async function(t){const e=ut(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?i.json():(N().error(`${g} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:s}):t.options;let a=t.element??document.getElementById(e);a||(a=document.createElement("div"),a.id=e,document.body.append(a));const r=ut(n,s),c=this.dom(),h=c.findIndex((t=>t.id.description===e));if(h>=0){const t=this.domItem(h);t&&!t.destroyed&&(t.destroy(),c.splice(h,1))}let l;if("canvas"===a.tagName.toLowerCase())l=a,l.dataset[i]="false";else{const t=a.getElementsByTagName("canvas");t.length?(l=t[0],l.dataset[i]="false"):(l=document.createElement("canvas"),l.dataset[i]="true",a.appendChild(l))}l.style.width||(l.style.width="100%"),l.style.height||(l.style.height="100%");const d=new xi(this,e,r);return h>=0?c.splice(h,0,d):c.push(d),d.canvas.loadCanvas(l),await d.start(),d}loadOptions(t,e){for(const i of this.plugins)i.loadOptions(t,e)}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,...i)}async refresh(t=!0){t&&this.dom().forEach((t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}setOnClickHandler(t){const e=this.dom();if(!e.length)throw new Error(`${g} can only set click handlers after calling tsParticles.load()`);for(const i of e)i.addClickHandler(t)}}class Ti{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return It(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return It({h:O(e.h),l:O(e.l),s:O(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?Lt({a:e.length>4?B(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}}class Ai{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return{r:O(e.r),g:O(e.g),b:O(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?B(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}}class Mi{constructor(t){this.container=t,this.type="external"}}class Vi{constructor(t){this.container=t,this.type="particles"}}const Gi=function(){const t=new Ai,e=new Ti;Tt(t),Tt(e);const i=new Oi;return i.init(),i}();q()||(window.tsParticles=Gi);class Ei{static init(t){const e=new Ei,i=t.selector;if(!i)throw new Error("No selector provided");const s=document.querySelector(i);if(!s)throw new Error("No element found for selector");return Gi.load({id:i.replace(".","").replace("!",""),element:s,options:{fullScreen:{enable:!1},particles:{color:{value:t.color??"!000000"},links:{color:"random",distance:t.minDistance??120,enable:t.connectParticles??!1},move:{enable:!0,speed:t.speed??.5},number:{value:t.maxParticles??100},size:{value:{min:1,max:t.sizeVariations??3}}},responsive:t.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:t.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((t=>{e._container=t})),e}destroy(){const t=this._container;t&&t.destroy()}pauseAnimation(){const t=this._container;t&&t.pause()}resumeAnimation(){const t=this._container;t&&t.play()}}const zi={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1},Ri=t=>{const{particlesJS:e,pJSDom:i}=(t=>{const e=(e,i)=>{const s=st(zi,i);return t.load({id:e,options:{fullScreen:{enable:!1},detectRetina:s.retina_detect,smooth:!0,interactivity:{detectsOn:s.interactivity.detect_on,events:{onHover:{enable:s.interactivity.events.onhover.enable,mode:s.interactivity.events.onhover.mode},onClick:{enable:s.interactivity.events.onclick.enable,mode:s.interactivity.events.onclick.mode},resize:{enable:s.interactivity.events.resize}},modes:{grab:{distance:s.interactivity.modes.grab.distance,links:{opacity:s.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:s.interactivity.modes.bubble.distance,size:s.interactivity.modes.bubble.size,duration:s.interactivity.modes.bubble.duration,opacity:s.interactivity.modes.bubble.opacity,speed:s.interactivity.modes.bubble.speed},repulse:{distance:s.interactivity.modes.repulse.distance,duration:s.interactivity.modes.repulse.duration},push:{quantity:s.interactivity.modes.push.particles_nb},remove:{quantity:s.interactivity.modes.remove.particles_nb}}},particles:{collisions:{enable:s.particles.move.bounce},number:{value:s.particles.number.value,density:{enable:s.particles.number.density.enable,width:s.particles.number.density.value_area}},color:{value:s.particles.color.value},stroke:{width:s.particles.shape.stroke.width,color:{value:s.particles.shape.stroke.color}},shape:{type:s.particles.shape.type,options:{polygon:{sides:s.particles.shape.polygon.nb_sides},image:{src:s.particles.shape.image.src,width:s.particles.shape.image.width,height:s.particles.shape.image.height}}},opacity:{value:s.particles.opacity.random?{min:s.particles.opacity.anim.enable?s.particles.opacity.anim.opacity_min:0,max:s.particles.opacity.value}:s.particles.opacity.value,animation:{enable:s.particles.opacity.anim.enable,speed:s.particles.opacity.anim.speed,sync:s.particles.opacity.anim.sync}},size:{value:s.particles.size.random?{min:s.particles.size.anim.enable?s.particles.size.anim.size_min:0,max:s.particles.size.value}:s.particles.size.value,animation:{enable:s.particles.size.anim.enable,speed:s.particles.size.anim.speed,sync:s.particles.size.anim.sync}},links:{enable:s.particles.line_linked.enable,distance:s.particles.line_linked.distance,color:s.particles.line_linked.color,opacity:s.particles.line_linked.opacity,width:s.particles.line_linked.width},move:{enable:s.particles.move.enable,speed:s.particles.move.speed/3,direction:s.particles.move.direction,random:s.particles.move.random,straight:s.particles.move.straight,outModes:s.particles.move.out_mode,attract:{enable:s.particles.move.attract.enable,rotate:{x:s.particles.move.attract.rotateX,y:s.particles.move.attract.rotateY}}}}}})};return e.load=(e,i,s)=>{t.load({id:e,url:i}).then((t=>{t&&s(t)})).catch((()=>{s(void 0)}))},e.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:e,pJSDom:t.dom()}})(t);return window.particlesJS=e,window.pJSDom=i,window.Particles=Ei,{particlesJS:e,pJSDom:i,Particles:Ei}};class ki{draw(t){const{context:e,particle:i,radius:s}=t,o=2*s,n=o*(i.heightFactor??.5),a=o*(i.headWidthFactor??.2),r=n*(i.bodyHeightFactor??.5);e.moveTo(-o/2,0),e.lineTo(-o/2,-r/2),e.lineTo(o/2-a,-r/2),e.lineTo(o/2-a,-n/2),e.lineTo(o/2+a,0),e.lineTo(o/2-a,n/2),e.lineTo(o/2-a,r/2),e.lineTo(-o/2,r/2),e.lineTo(-o/2,0)}particleInit(t,e){const i=e.shapeData;e.heightFactor=O(i?.heightFactor??.5),e.headWidthFactor=O(i?.headWidthFactor??.2),e.bodyHeightFactor=O(i?.bodyHeightFactor??.5)}}class Ii{draw(t){const{context:e,radius:i}=t;e.beginPath(),e.arc(i/3,-i/3,i/3,0,2*Math.PI,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}class Li{constructor(){this.color=!0,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Di{constructor(){this.filter=t=>t.a>0,this.offset=4}load(t){if(t){if(void 0!==t.filter)if(mt(t.filter)){if(Object.hasOwn(window,t.filter)){const e=window[t.filter];bt(e)&&(this.filter=e)}}else this.filter=t.filter;void 0!==t.offset&&(this.offset=t.offset)}}}class Hi{constructor(){this.src=""}load(t){t&&void 0!==t.src&&(this.src=t.src)}}class Bi{constructor(){this.family="sans-serif",this.size=100}load(t){t&&(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Fi{constructor(){this.separator="\n",this.spacing=10}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Ui{constructor(){this.color="#000000",this.font=new Bi,this.lines=new Fi,this.text=""}load(t){t&&(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class Ni{constructor(){this.enable=!1,this.override=new Li,this.pixels=new Di,this.position={x:50,y:50},this.scale=1}load(t){t&&(void 0!==t.element&&t.element instanceof HTMLCanvasElement&&(this.element=t.element),void 0!==t.enable&&(this.enable=t.enable),t.image&&(this.image||(this.image=new Hi),this.image.load(t.image)),this.pixels.load(t.pixels),t.position&&(this.position={x:t.position.x??this.position.x,y:t.position.y??this.position.y}),this.override.load(t.override),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),t.text&&(this.text||(this.text=new Ui),this.text.load(t.text)))}}function $i(t,e,i,s,o,n){const{height:a,width:r}=e,c=a*r,h=function(t){for(let e=t.length-1;e>=0;e--){const i=Math.floor(S()*e);[t[e],t[i]]=[t[i],t[e]]}return t}(ji(c)),l=Math.min(c,t.actualOptions.particles.number.value),d=t.canvas.size;let u=0;const p=d.width*i.x/100-r*s/2,g=d.height*i.y/100-a*s/2;for(;u<l&&h.length;){const i=h.pop()||0,a={x:i%r,y:Math.floor(i/r)},c=e.pixels[a.y][a.x];if(!n(c))continue;const l={x:a.x*s+p,y:a.y*s+g},d={};o.color&&(d.color={value:c}),o.opacity&&(d.opacity={value:c.a}),t.particles.addParticle(l,d),u++}}function qi(t,e,i,s=!0){const o=t.getImageData(0,0,e.width,e.height).data;s&&t.clearRect(0,0,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]),n[a.y][a.x]={r:o[t],g:o[t+1],b:o[t+2],a:o[t+3]/255}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}const ji=t=>[...Array(t).keys()];class Qi{constructor(t,e){this._container=t,this._engine=e}async init(){const t=this._container,e=t.actualOptions.canvasMask;if(!e?.enable)return;let i={pixels:[],height:0,width:0};const s=e.pixels.offset;if(e.image){const t=e.image.src;if(!t)return;i=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${g} Could not get canvas context`));n.drawImage(i,0,0,i.width,i.height,0,0,o.width,o.height),t(qi(n,o,e))}}));return i.src=t,s}(t,s)}else if(e.text){const t=function(t,e){const i=document.createElement("canvas"),s=i.getContext("2d"),{font:o,text:n,lines:a,color:r}=t;if(!n||!s)return;const c=n.split(a.separator),h=_t(o.size)?`${o.size}px`:o.size,l=[];let d=0,u=0;for(const t of c){s.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${h} ${o.family}`;const e=s.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};d=Math.max(d||0,i.width),u+=i.height+a.spacing,l.push(i)}i.width=d,i.height=u;let p=0;for(const t of l)s.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${h} ${o.family}`,s.fillStyle=r,s.fillText(t.text,0,p+t.measure.actualBoundingBoxAscent),p+=t.height+a.spacing;return qi(s,i,e)}(e.text,s);if(!t)return;i=t}else if(e.element||e.selector){const t=e.element||e.selector&&document.querySelector(e.selector);if(!t)return;const o=t.getContext("2d");if(!o)return;i=qi(o,t,s)}$i(t,i,e.position,e.scale,e.override,e.pixels.filter)}}class Wi{constructor(t){this.id="canvasMask",this._engine=t}getPlugin(t){return new Qi(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.canvasMask;void 0===i?.load&&(t.canvasMask=i=new Ni),i.load(e?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}function Zi(t,e){if(!e.segments.length||!e.segments[0].values.length)return;const{context:i,radius:s}=t;i.moveTo(e.segments[0].values[0].x*s,e.segments[0].values[0].y*s);for(let t=0;t<e.segments.length;t++){const o=e.segments[t];i.bezierCurveTo(o.values[1].x*s,o.values[1].y*s,o.values[2].x*s,o.values[2].y*s,o.values[3].x*s,o.values[3].y*s)}for(let t=e.segments.length-1;t>=0;t--){const o=e.segments[t];i.bezierCurveTo(-o.values[2].x*s,o.values[2].y*s,-o.values[1].x*s,o.values[1].y*s,-o.values[0].x*s,o.values[0].y*s)}}const Xi=.5,Yi={heart:{segments:[{values:[{x:0,y:Xi},{x:0,y:Xi},{x:Xi,y:0},{x:Xi,y:-Xi/2}]},{values:[{x:Xi,y:-Xi/2},{x:Xi,y:-Xi/2},{x:Xi,y:-Xi},{x:Xi/2,y:-Xi}]},{values:[{x:Xi/2,y:-Xi},{x:Xi/2,y:-Xi},{x:0,y:-Xi},{x:0,y:-Xi/2}]}]},diamond:{segments:[{values:[{x:0,y:Xi},{x:0,y:Xi},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-Xi},{x:0,y:-Xi}]}]},club:{segments:[{values:[{x:0,y:-Xi},{x:0,y:-Xi},{x:Xi/2,y:-Xi},{x:Xi/2,y:-Xi/2}]},{values:[{x:Xi/2,y:-Xi/2},{x:Xi/2,y:-Xi/2},{x:Xi,y:-Xi/2},{x:Xi,y:0}]},{values:[{x:Xi,y:0},{x:Xi,y:0},{x:Xi,y:Xi/2},{x:Xi/2,y:Xi/2}]},{values:[{x:Xi/2,y:Xi/2},{x:Xi/2,y:Xi/2},{x:Xi/8,y:Xi/2},{x:Xi/8,y:Xi/8}]},{values:[{x:Xi/8,y:Xi/8},{x:Xi/8,y:Xi/2},{x:Xi/2,y:Xi},{x:Xi/2,y:Xi}]},{values:[{x:Xi/2,y:Xi},{x:Xi/2,y:Xi},{x:0,y:Xi},{x:0,y:Xi}]}]},spade:{segments:[{values:[{x:0,y:-Xi},{x:0,y:-Xi},{x:Xi,y:-Xi/2},{x:Xi,y:0}]},{values:[{x:Xi,y:0},{x:Xi,y:0},{x:Xi,y:Xi/2},{x:Xi/2,y:Xi/2}]},{values:[{x:Xi/2,y:Xi/2},{x:Xi/2,y:Xi/2},{x:Xi/8,y:Xi/2},{x:Xi/8,y:Xi/8}]},{values:[{x:Xi/8,y:Xi/8},{x:Xi/8,y:Xi/2},{x:Xi/2,y:Xi},{x:Xi/2,y:Xi}]},{values:[{x:Xi/2,y:Xi},{x:Xi/2,y:Xi},{x:0,y:Xi},{x:0,y:Xi}]}]}};class Ji{draw(t){Zi(t,Yi.spade)}}class Ki{draw(t){Zi(t,Yi.heart)}}class ts{draw(t){Zi(t,Yi.diamond)}}class es{draw(t){Zi(t,Yi.club)}}class is{afterDraw(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const o=2*Math.PI,n=s*i.cogHoleRadius/100;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(n,0),e.arc(0,0,n,0,o),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}draw(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const o=2*Math.PI,n=o/(2*i.cogNotches),a=n*i.cogInnerTaper*.005,r=n*i.cogOuterTaper*.005,c=s*i.cogInnerRadius/100;let h=n,l=!1;for(e.moveTo(s*Math.cos(r),s*Math.sin(r));h<=o;h+=n)l?(e.lineTo(c*Math.cos(h-a),c*Math.sin(h-a)),e.lineTo(s*Math.cos(h+r),s*Math.sin(h+r))):(e.lineTo(s*Math.cos(h-r),s*Math.sin(h-r)),e.lineTo(c*Math.cos(h+a),c*Math.sin(h+a))),l=!l}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=O(i?.holeRadius??44),e.cogInnerRadius=O(i?.innerRadius??72),e.cogInnerTaper=O(i?.innerTaper??35),e.cogNotches=O(i?.notches??7),e.cogOuterTaper=O(i?.outerTaper??50)}}function ss(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class os{constructor(){this._NORM_2D=1/47,this._SQUISH_2D=(Math.sqrt(3)-1)/2,this._STRETCH_2D=(1/Math.sqrt(3)-1)/2,this._base2D=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this._gradients2D=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this._lookup=[],this._lookupPairs2D=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this._p2D=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256)}noise(t,e){const{_gradients2D:i,_NORM_2D:s,_SQUISH_2D:o,_STRETCH_2D:n,_lookup:a,_perm:r,_perm2D:c}=this,h=(t+e)*n,l=t+h,d=e+h,u=Math.floor(l),p=Math.floor(d),g=(u+p)*o,f=t-(u+g),y=e-(p+g),v=l-u,w=d-p,m=v+w;let _=0;for(let t=a[v-w+1|m<<1|m+w<<2|m+v<<4];void 0!==t;t=t.next){const e=f+t.dx,s=y+t.dy,o=2-e*e-s*s;if(o>0){const n=u+t.xsb,a=p+t.ysb,h=c[r[255&n]+a&255];_+=o*o*o*o*(i[h]*e+i[h+1]*s)}}return _*s}seed(t){const{_p2D:e,_base2D:i,_lookupPairs2D:s}=this,o=[];for(let t=0;t<e.length;t+=4){const s=i[e[t]];let n=null,a=null;for(let e=0;e<s.length;e+=3)a=this._contribution2D(s[e],s[e+1],s[e+2]),null===n?o[t/4]=a:n.next=a,n=a;a&&(a.next=this._contribution2D(e[t+1],e[t+2],e[t+3]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=ss(ss(ss(a)));for(let t=255;t>=0;t--){a=ss(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm2D[t]=14&this._perm[t],n[e[0]]=n[t]}}_contribution2D(t,e,i){const{_SQUISH_2D:s}=this;return{dx:-e-t*s,dy:-i-t*s,xsb:e,ysb:i}}}class ns{constructor(){this._NORM_3D=1/103,this._SQUISH_3D=(Math.sqrt(4)-1)/3,this._STRETCH_3D=(1/Math.sqrt(4)-1)/3,this._base3D=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this._gradients3D=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this._lookup=[],this._lookupPairs3D=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this._p3D=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256)}noise(t,e,i){const{_STRETCH_3D:s,_NORM_3D:o,_SQUISH_3D:n,_lookup:a,_perm:r,_perm3D:c,_gradients3D:h}=this,l=(t+e+i)*s,d=t+l,u=e+l,p=i+l,g=Math.floor(d),f=Math.floor(u),y=Math.floor(p),v=(g+f+y)*n,w=t-(g+v),m=e-(f+v),_=i-(y+v),b=d-g,S=u-f,x=p-y,P=b+S+x;let C=0;for(let t=a[S-x+1|b-S+1<<1|b-x+1<<2|P<<3|P+x<<5|P+S<<7|P+b<<9];void 0!==t;t=t.next){const e=w+t.dx,i=m+t.dy,s=_+t.dz,o=2-e*e-i*i-s*s;if(o>0){const n=g+t.xsb,a=f+t.ysb,l=y+t.zsb,d=c[r[r[255&n]+a&255]+l&255];C+=o*o*o*o*(h[d]*e+h[d+1]*i+h[d+2]*s)}}return C*o}seed(t){const{_base3D:e,_lookupPairs3D:i,_p3D:s}=this,o=[];for(let t=0;t<s.length;t+=9){const i=e[s[t]];let n=null,a=null;for(let e=0;e<i.length;e+=4)a=this._contribution3D(i[e],i[e+1],i[e+2],i[e+3]),null===n?o[t/9]=a:n.next=a,n=a;a&&(a.next=this._contribution3D(s[t+1],s[t+2],s[t+3],s[t+4]),a.next.next=this._contribution3D(s[t+5],s[t+6],s[t+7],s[t+8]))}this._lookup=[];for(let t=0;t<i.length;t+=2)this._lookup[i[t]]=o[i[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=ss(ss(ss(a)));for(let t=255;t>=0;t--){a=ss(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm3D[t]=this._perm[t]%24*3,n[e[0]]=n[t]}}_contribution3D(t,e,i,s){const{_SQUISH_3D:o}=this;return{dx:-e-t*o,dy:-i-t*o,dz:-s-t*o,xsb:e,ysb:i,zsb:s}}}class as{constructor(){this._NORM_4D=1/30,this._SQUISH_4D=.25*(Math.sqrt(5)-1),this._STRETCH_4D=.25*(1/Math.sqrt(5)-1),this._lookup=[],this._perm=new Uint8Array(0),this._perm4D=new Uint8Array(0),this._base4D=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1]],this._gradients4D=[3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,-3,1,1,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],this._lookupPairs4D=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],this._p4D=[0,0,1,-1,0,0,0,1,0,-1,0,0,1,0,0,-1,0,0,-1,1,0,0,0,0,1,-1,0,0,0,1,0,-1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,-1,0,0,-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,2,1,1,0,0,1,1,1,-1,0,1,1,1,0,-1,0,2,1,0,1,0,1,1,-1,1,0,1,1,0,1,-1,0,2,0,1,1,0,1,-1,1,1,0,1,0,1,1,-1,0,2,1,0,0,1,1,1,-1,0,1,1,1,0,-1,1,0,2,0,1,0,1,1,-1,1,0,1,1,0,1,-1,1,0,2,0,0,1,1,1,-1,0,1,1,1,0,-1,1,1,1,4,2,1,1,0,4,1,2,1,0,4,1,1,2,0,1,4,2,1,0,1,4,1,2,0,1,4,1,1,0,2,1,4,2,0,1,1,4,1,0,2,1,4,1,0,1,2,1,4,0,2,1,1,4,0,1,2,1,4,0,1,1,2,1,2,1,1,0,0,3,2,1,0,0,3,1,2,0,0,1,2,1,0,1,0,3,2,0,1,0,3,1,0,2,0,1,2,0,1,1,0,3,0,2,1,0,3,0,1,2,0,1,2,1,0,0,1,3,2,0,0,1,3,1,0,0,2,1,2,0,1,0,1,3,0,2,0,1,3,0,1,0,2,1,2,0,0,1,1,3,0,0,2,1,3,0,0,1,2,2,3,1,1,1,0,2,1,1,1,-1,2,2,0,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,2,0,0,0,2,3,1,0,1,1,2,1,-1,1,1,2,2,0,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,2,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,2,0,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,2,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,0,2,0,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,2,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,2,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,0,0,2,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,0,2,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,0,2,2,1,1,1,-1,0,1,1,1,0,-1,0,0,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,0,0,0,0,0,2,1,-1,1,1,0,1,0,1,1,-1,0,0,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,0,0,0,0,0,2,1,-1,1,0,1,1,0,1,-1,1,0,0,0,0,0,2,1,-1,0,1,1,1,0,-1,1,1,0,0,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,2,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,2,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,2,2,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,0,2,0,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,2,0,0,2,1,-1,1,0,1,1,0,1,-1,1,2,0,2,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,0,0,2,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,0,2,0,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,2,0,2,1,1,-1,0,1,1,1,0,-1,1,2,0,0,0,2,2,1,-1,1,0,1,1,0,1,-1,1,2,0,0,0,2,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,0,2,3,1,1,0,0,0,2,2,0,0,0,2,1,1,1,-1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,1,-1,3,1,0,0,1,0,2,0,0,2,0,2,1,1,1,-1,3,1,1,0,0,0,2,2,0,0,0,2,1,1,-1,1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,-1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,1,-1,1,3,1,1,0,0,0,2,2,0,0,0,2,1,-1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,1,-1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,-1,1,1,3,1,0,1,0,0,2,0,2,0,0,2,-1,1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,-1,1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,-1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,4,1,1,1,1,3,3,2,0,1,0,3,1,0,2,0,4,1,1,1,1,3,3,0,2,1,0,3,0,1,2,0,4,1,1,1,1,3,3,2,0,0,1,3,1,0,0,2,4,1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,4,1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,4,1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,1,-1,3,3,2,0,1,0,3,1,0,2,0,2,1,1,1,-1,3,3,0,2,1,0,3,0,1,2,0,2,1,1,1,-1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,-1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,1,-1,1,3,3,0,2,0,1,3,0,1,0,2,2,1,1,-1,1,3,3,2,0,1,0,3,1,0,2,0,2,1,-1,1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,-1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,1,-1,1,1,3,3,0,2,1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]}noise(t,e,i,s){const{_perm:o,_perm4D:n,_lookup:a,_STRETCH_4D:r,_SQUISH_4D:c,_gradients4D:h,_NORM_4D:l}=this,d=(t+e+i+s)*r,u=t+d,p=e+d,g=i+d,f=s+d,y=Math.floor(u),v=Math.floor(p),w=Math.floor(g),m=Math.floor(f),_=(y+v+w+m)*c,b=t-(y+_),S=e-(v+_),x=i-(w+_),P=s-(m+_),C=u-y,O=p-v,T=g-w,A=f-m,M=C+O+T+A;let V=0;for(let t=a[T-A+1|O-T+1<<1|O-A+1<<2|C-O+1<<3|C-T+1<<4|C-A+1<<5|M<<6|M+A<<8|M+T<<11|M+O<<14|M+C<<17];void 0!==t;t=t.next){const e=b+t.dx,i=S+t.dy,s=x+t.dz,a=P+t.dw,r=2-e*e-i*i-s*s-a*a;if(r>0){const c=y+t.xsb,l=v+t.ysb,d=w+t.zsb,u=m+t.wsb,p=n[o[o[o[255&c]+l&255]+d&255]+u&255];V+=r*r*r*r*(h[p]*e+h[p+1]*i+h[p+2]*s+h[p+3]*a)}}return V*l}seed(t){const{_p4D:e,_base4D:i,_lookupPairs4D:s}=this,o=[];for(let t=0;t<e.length;t+=16){const s=i[e[t]];let n=null,a=null;for(let e=0;e<s.length;e+=5)a=this._contribution4D(s[e],s[e+1],s[e+2],s[e+3],s[e+4]),null===n?o[t/16]=a:n.next=a,n=a;a&&(a.next=this._contribution4D(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),a.next.next=this._contribution4D(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),a.next.next.next=this._contribution4D(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=ss(ss(ss(a)));for(let t=255;t>=0;t--){a=ss(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm4D[t]=252&this._perm[t],n[e[0]]=n[t]}}_contribution4D(t,e,i,s,o){const{_SQUISH_4D:n}=this;return{dx:-e-t*n,dy:-i-t*n,dz:-s-t*n,dw:-o-t*n,xsb:e,ysb:i,zsb:s,wsb:o}}}class rs{constructor(){this.noise2d=new os,this.noise3d=new ns,this.noise4d=new as}}const cs={speed:.2,step:250};class hs{constructor(){const t=new rs;this._simplex=t.noise2d,this.options=st({},cs)}generate(t){const e=t.getPosition(),{speed:i,step:s}=this.options,o=e.x/s,n=e.y/s,a=.001,r=(this._simplex.noise(o,n+a)-this._simplex.noise(o,n-a))/.002,c=(this._simplex.noise(o+a,n)-this._simplex.noise(o-a,n))/.002;return t.velocity.x=0,t.velocity.y=0,y.create(i*r,i*-c)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.seed=e?.seed,this.options.speed=(e?.speed??cs.speed)*t.retina.pixelRatio,this.options.step=e?.step??cs.step,this._simplex.seed(this.options.seed??S())}reset(){}update(){}}const ls="curlNoise";class ds{constructor(){this.options={rndFunc:null,period:100,nbHarmonics:2,attenHarmonics:.8,lowValue:-.03,highValue:.03}}generate(t){if(!t.pathGen){const e=this.options;t.pathGen=function(t,e,i,s,o=0,n=1){const a=[],r=[],c=[],h=[],l=[],d=t??S;let u=0;i<1&&(i=1);for(let t=1;t<=i;++t)a[t]=d(),r[t]=d(),c[t]=1===t?1:c[t-1]*s,u+=c[t],h[t]=t/e,l[t]=d();return c.forEach(((t,e)=>c[e]=t/u*(n-o))),()=>{let t,e,s=0;for(let o=i;o>=1;--o)t=l[o]+=h[o],l[o]>=1&&(t=l[o]-=1,a[o]=r[o],r[o]=d()),e=t**2*(3-2*t),s+=(a[o]*(1-e)+r[o]*e)*c[o];return s+o}}(e.rndFunc,e.period,e.nbHarmonics,e.attenHarmonics,e.lowValue,e.highValue)}return t.curveVelocity?(t.curveVelocity.length+=.01,t.curveVelocity.angle=(t.curveVelocity.angle+t.pathGen())%(2*Math.PI)):(t.curveVelocity=y.origin,t.curveVelocity.length=.6*S()+.8,t.curveVelocity.angle=S()*Math.PI*2),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(t){const e=t.actualOptions.particles.move.path.options,{options:i}=this;bt(e.rndFunc)?i.rndFunc=e.rndFunc:mt(e.rndFunc)&&(i.rndFunc=window[e.rndFunc]||this.options.rndFunc),i.period=e.period??i.period,i.nbHarmonics=e.nbHarmonics??i.nbHarmonics,i.attenHarmonics=e.attenHarmonics??i.attenHarmonics,i.lowValue=e.lowValue??i.lowValue,i.highValue=e.highValue??i.highValue}reset(t){delete t.pathGen,delete t.curveVelocity}update(){}}const us="curvesPathGenerator";class ps{constructor(){this.wait=!1}load(t){t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=M(t.delay)),void 0!==t.duration&&(this.duration=M(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class gs{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=M(t.quantity)),void 0!==t.delay&&(this.delay=M(t.delay)))}}class fs{constructor(){this.color=!1,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ys{constructor(){this.options={},this.replace=new fs,this.type="square"}load(t){t&&(void 0!==t.options&&(this.options=st({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class vs{constructor(){this.mode="percent",this.height=0,this.width=0}load(t){void 0!==t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class ws{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new ps,this.rate=new gs,this.shape=new ys,this.startCount=0}load(t){t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new vs),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=dt(t.particles,(t=>st({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=M(t.position.x)),void 0!==t.position.y&&(this.position.y=M(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new Me),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}function ms(t,e){t.color?t.color.value=e:t.color={value:e}}class _s{constructor(t,e,i,s,o){this.emitters=e,this.container=i,this._destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})},this._prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life?.duration?O(this.options.life.duration):void 0;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=1e3*t)},this._setColorAnimation=(t,e,i)=>{const s=this.container;if(!t.enable)return e;const o=C(t.offset),n=1e3*O(this.options.rate.delay)/s.retina.reduceFactor;return(e+O(t.speed??0)*s.fpsLimit/n+3.6*o)%i},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=o,s instanceof ws?this.options=s:(this.options=new ws,this.options.load(s)),this._spawnDelay=1e3*O(this.options.life.delay??0)/this.container.retina.reduceFactor,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let n=st({},this.options.particles);if(n??={},n.move??={},n.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=Et(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=n,this._size=this._calcSize(),this.size=vt(this._size,this.container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=document.getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver((()=>{this.resize()})),this._resizeObserver=new ResizeObserver((()=>{this.resize()})),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const a=this.options.shape,r=this._engine.emitterShapeManager?.getShapeGenerator(a.type);r&&(this._shape=r.generate(this.position,this.size,this.fill,a.options)),this._engine.dispatchEvent("emitterCreated",{container:i,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0))){if(void 0===this._emitDelay){const t=O(this.options.rate.delay);this._emitDelay=1e3*t/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&tt(t,this.container.canvas.size,y.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=vt(this._size,this.container.canvas.size),this._shape?.resize(this.position,this.size)}async update(t){this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,await this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._spawnDelay=1e3*O(this.options.life.delay??0)/this.container.retina.reduceFactor):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay)))}_calcPosition(){if(this.options.domId){const t=this.container,e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{x:(i.x+i.width/2)*t.retina.pixelRatio,y:(i.y+i.height/2)*t.retina.pixelRatio}}}return L({size:this.container.canvas.size,position:this.options.position})}_calcSize(){const t=this.container;if(this.options.domId){const e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:"precise"}}}return this.options.size??(()=>{const t=new vs;return t.load({height:0,mode:"percent",width:0}),t})()}async _emit(){if(this._paused)return;const t=O(this.options.rate.quantity);await this._emitParticles(t)}async _emitParticles(t){const e=ut(this._particlesOptions);for(let i=0;i<t;i++){const t=st({},e);if(this.spawnColor){const e=this.options.spawnColor?.animation;e&&(this.spawnColor.h=this._setColorAnimation(e.h,this.spawnColor.h,360),this.spawnColor.s=this._setColorAnimation(e.s,this.spawnColor.s,100),this.spawnColor.l=this._setColorAnimation(e.l,this.spawnColor.l,100)),ms(t,this.spawnColor)}const i=this.options.shape;let s=this.position;if(this._shape){const e=await this._shape.randomPosition();if(e){s=e.position;const o=i.replace;o.color&&e.color&&ms(t,e.color),o.opacity&&(t.opacity?t.opacity.value=e.opacity:t.opacity={value:e.opacity})}else s=null}s&&this.container.particles.addParticle(s,t)}}}class bs{constructor(t,e){this.container=e,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]},e.getEmitter=t=>void 0===t||_t(t)?this.array[t||0]:this.array.find((e=>e.name===t)),e.addEmitter=async(t,e)=>this.addEmitter(t,e),e.removeEmitter=t=>{const i=e.getEmitter(t);i&&this.removeEmitter(i)},e.playEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPlay()},e.pauseEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPause()}}async addEmitter(t,e){const i=new ws;i.load(t);const s=new _s(this._engine,this,this.container,i,e);return await s.init(),this.array.push(s),s}handleClickMode(t){const e=this.emitters,i=this.interactivityEmitters;if("emitter"!==t)return;let s;if(i&&xt(i.value))if(i.value.length>0&&i.random.enable){s=[];const t=[];for(let e=0;e<i.random.count;e++){const o=J(i.value);t.includes(o)&&t.length<i.value.length?e--:(t.push(o),s.push(K(i.value,o)))}}else s=i.value;else s=i?.value;const o=s??e,n=this.container.interactivity.mouse.clickPosition;dt(o,(t=>{this.addEmitter(t,n)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters)if(xt(this.emitters))for(const t of this.emitters)await this.addEmitter(t);else await this.addEmitter(this.emitters)}pause(){for(const t of this.array)t.pause()}play(){for(const t of this.array)t.play()}removeEmitter(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}async update(t){for(const e of this.array)await e.update(t)}}const Ss=new Map;class xs{constructor(t){this._engine=t}addShapeGenerator(t,e){this.getShapeGenerator(t)||Ss.set(t,e)}getShapeGenerator(t){return Ss.get(t)}getSupportedShapeGenerators(){return Ss.keys()}}class Ps{constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}class Cs{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return new bs(this._engine,t)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;e?.emitters&&(t.emitters=dt(e.emitters,(t=>{const e=new ws;return e.load(t),e})));const i=e?.interactivity?.modes?.emitters;if(i)if(xt(i))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:i.map((t=>{const e=new ws;return e.load(t),e}))};else{const e=i;if(void 0!==e.value)if(xt(e.value))t.interactivity.modes.emitters={random:{count:e.random.count??1,enable:e.random.enable??!1},value:e.value.map((t=>{const e=new ws;return e.load(t),e}))};else{const i=new ws;i.load(e.value),t.interactivity.modes.emitters={random:{count:e.random.count??1,enable:e.random.enable??!1},value:i}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new ws}).value.load(i)}}}needsPlugin(t){if(!t)return!1;const e=t.emitters;return xt(e)&&!!e.length||void 0!==e||!!t.interactivity?.events?.onClick?.mode&&X("emitter",t.interactivity.events.onClick.mode)}}function Os(t,e,i,s=!0){const o=t.getImageData(0,0,e.width,e.height).data;s&&t.clearRect(0,0,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]),n[a.y][a.x]={r:o[t],g:o[t+1],b:o[t+2],a:o[t+3]/255}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}class Ts extends Ps{constructor(t,e,i,s){super(t,e,i,s);const o=s.filter;let n=t=>t.a>0;if(void 0!==o)if(mt(o)){if(Object.hasOwn(window,o)){const t=window[o];bt(t)&&(n=t)}}else n=o;this.filter=n,this.scale=s.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const e=this.options,i=e.selector,s=e.pixels,o=e.image,n=e.element,a=e.text,r=s.offset;if(o){const e=o.src;if(!e)return;t=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${g} Could not get canvas context`));n.drawImage(i,0,0,i.width,i.height,0,0,o.width,o.height),t(Os(n,o,e))}}));return i.src=t,s}(e,r)}else if(a){const e=function(t,e,i){const s=document.createElement("canvas"),o=s.getContext("2d"),{font:n,text:a,lines:r,color:c}=t;if(!a||!o)return;const h=a.split(r.separator),l=_t(n.size)?`${n.size}px`:n.size,d=[];let u=0,p=0;for(const t of h){o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`;const e=o.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};u=Math.max(u||0,i.width),p+=i.height+r.spacing,d.push(i)}s.width=u,s.height=p;let g=0;for(const t of d)o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`,i?(o.fillStyle=c,o.fillText(t.text,0,g+t.measure.actualBoundingBoxAscent)):(o.strokeStyle=c,o.strokeText(t.text,0,g+t.measure.actualBoundingBoxAscent)),g+=t.height+r.spacing;return Os(o,s,e)}(a,r,this.fill);if(!e)return;t=e}else if(n||i){const e=n||i&&document.querySelector(i);if(!e)return;const s=e.getContext("2d");if(!s)return;t=Os(s,e,r)}t&&(this.pixelData=t)}async randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,s=this.position,o=this.scale,n=s.x-e*o/2,a=s.y-t*o/2;for(let s=0;s<100;s++){const s=Math.floor(S()*e*t),r={x:s%e,y:Math.floor(s/e)},c=i.pixels[r.y][r.x];if(this.filter(c))return{position:{x:r.x*o+n,y:r.y*o+a},color:{...c},opacity:c.a}}return null}resize(t,e){super.resize(t,e)}}class As{constructor(){this.offset=4}load(t){t&&void 0!==t.offset&&(this.offset=t.offset)}}class Ms{constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){t&&(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Vs{constructor(){this.separator="\n",this.spacing=0}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Gs{constructor(){this.color="#000000",this.font=new Ms,this.lines=new Vs,this.text=""}load(t){t&&(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class Es{constructor(){this.filter=t=>t.a>0,this.pixels=new As,this.scale=1,this.selector="",this.text=new Gs}load(t){t&&(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class zs{generate(t,e,i,s){const o=new Es;return o.load(s),new Ts(t,e,i,o)}}class Rs extends Ps{constructor(t,e,i,s){super(t,e,i,s);const o=document.createElement("canvas").getContext("2d");if(!o)throw new Error(`${g} No 2d context available`);this.checkContext=o,this.points=s.points;const n=this.points,a=new Path2D,r=t.x-e.width/2,c=t.y-e.height/2;for(const[t,i]of n.entries()){const s={x:r+i.x*e.width/100,y:c+i.y*e.height/100};0===t?a.moveTo(s.x,s.y):a.lineTo(s.x,s.y)}if(n[0]){const t={x:r+n[0].x*e.width/100,y:c+n[0].y*e.height/100};a.lineTo(t.x,t.y)}this.path=a}async init(){}async randomPosition(){const t=this.checkContext,e=this.position,i=this.size,s=this.fill,o=this.path,n=s?function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+S()*s.width-s.width/2,y:i.y+S()*s.height-s.height/2};if(t.isPointInPath(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i):function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+S()*s.width-s.width/2,y:i.y+S()*s.height-s.height/2};if(t.isPointInStroke(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i);return n?{position:n}:null}resize(t,e){super.resize(t,e);const i=this.points,s=new Path2D,o=t.x-e.width/2,n=t.y-e.height/2;for(const[t,a]of i.entries()){const i={x:o+a.x*e.width/100,y:n+a.y*e.height/100};0===t?s.moveTo(i.x,i.y):s.lineTo(i.x,i.y)}if(i[0]){const t={x:o+i[0].x*e.width/100,y:n+i[0].y*e.height/100};s.lineTo(t.x,t.y)}this.path=s}}class ks{constructor(){this.points=[]}load(t){t&&void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??50,y:t.y??50}))))}}class Is{generate(t,e,i,s){const o=new ks;return o.load(s),new Rs(t,e,i,o)}}function Ls(t,e,i,s=0){const o=[],n=2*Math.PI/e;for(let a=0;a<e;a++){const e=n*a+s;o.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return o}function Ds(t,e){let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const n=e[s],a=e[o];n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(i=!i)}return i}class Hs extends Ps{constructor(t,e,i,s){super(t,e,i,s),this.sides=s.sides,this.angle=s.angle*Math.PI/180,this.polygon=Ls(t,this.sides,e.width/2,this.angle)}async init(){}async randomPosition(){const t=this.fill,e=this.polygon,i=t?function(t){const e={...t[0]},i={...t[0]};for(const s of t)s.x<e.x&&(e.x=s.x),s.x>i.x&&(i.x=s.x),s.y<e.y&&(e.y=s.y),s.y>i.y&&(i.y=s.y);let s=null;for(let o=0;o<100;o++){const o={x:e.x+S()*(i.x-e.x),y:e.y+S()*(i.y-e.y)};if(Ds(o,t)){s=o;break}}return s}(e):function(t){const e=Math.floor(S()*t.length),i=t[e],s=t[(e+1)%t.length],o=S();return{x:i.x+(s.x-i.x)*o,y:i.y+(s.y-i.y)*o}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=Ls(t,this.sides,e.width/2,this.angle)}}class Bs{constructor(){this.angle=0,this.sides=5}load(t){t&&(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class Fs{generate(t,e,i,s){const o=new Bs;return o.load(s),new Hs(t,e,i,o)}}class Us{constructor(t,e){this._exportImage=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{e.toBlob((t=>{i(t||void 0)}),t.type??"image/png",t.quality)}))},this._container=t,this._engine=e}async export(t,e){const i={supported:!1};if("image"===t)i.supported=!0,i.blob=await this._exportImage(e);return i}}class Ns{constructor(t){this.id="export-image",this._engine=t}getPlugin(t){return new Us(t,this._engine)}loadOptions(){}needsPlugin(){return!0}}class $s{constructor(t,e){this._exportJSON=async()=>{const t=JSON.stringify(this._container.actualOptions,((t,e)=>{if(!t.startsWith("_"))return e}),2);return new Blob([t],{type:"application/json"})},this._container=t,this._engine=e}async export(t){const e={supported:!1};if("json"===t)e.supported=!0,e.blob=await this._exportJSON();return e}}class qs{constructor(t){this.id="export-json",this._engine=t}getPlugin(t){return new $s(t,this._engine)}loadOptions(){}needsPlugin(){return!0}}const js=["webm","ogg","mp4","x-matroska"],Qs=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class Ws{constructor(t,e){this._supportedTypes=[],this._exportVideo=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{const s=e.captureStream(t.fps??this._container.actualOptions.fpsLimit),o=t.mimeType??this._supportedTypes[0],n=new MediaRecorder(s,{mimeType:o}),a=[];n.addEventListener("dataavailable",(t=>{a.push(t.data)})),n.addEventListener("stop",(()=>{i(new Blob(a,{type:o}))})),n.start(),setTimeout((()=>{n.stop()}),t.duration??5e3)}))},this._container=t,this._engine=e,this._supportedTypes=function(){const t=MediaRecorder.isTypeSupported,e=[];return js.forEach((i=>{const s=`video/${i}`;Qs.forEach((i=>[`${s};codecs=${i}`,`${s};codecs=${i.toUpperCase()}`].forEach((i=>{t(i)&&e.push(i)})))),t(s)&&e.push(s)})),e}()}async export(t,e){const i={supported:!1};if("video"===t)i.supported=!0,i.blob=await this._exportVideo(e);return i}}class Zs{constructor(t){this.id="export-video",this._engine=t}getPlugin(t){return new Ws(t,this._engine)}loadOptions(){}needsPlugin(){return!0}}class Xs extends Mi{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container;if("pop"!==t)return;const i=e.interactivity.mouse.clickPosition;if(!i)return;const s=e.particles.quadTree.queryCircle(i,e.retina.pixelRatio);if(s.length)for(const t of s)e.particles.remove(t)}}clear(){}init(){}async interact(){}isEnabled(){return!0}reset(){}}class Ys{constructor(){this.radius=0,this.mass=0}load(t){t&&(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class Js extends Ee{constructor(){super(),this.density=5,this.value=50,this.limit=new Ys}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),_t(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Ks{constructor(){this.color=new ce,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new Js}load(t){void 0!==t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.draggable&&(this.draggable=t.draggable),this.name=t.name,void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=M(t.position.x)),void 0!==t.position.y&&(this.position.y=M(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.orbits&&(this.orbits=t.orbits))}}class to{constructor(t,e,i,s){this.absorbers=t,this.container=e,this._calcPosition=()=>{const t=L({size:this.container.canvas.size,position:this.options.position});return y.create(t.x,t.y)},this._updateParticlePosition=(t,e)=>{if(t.destroyed)return;const i=this.container,s=i.canvas.size;if(t.needsNewPosition){const e=I({size:s});t.position.setTo(e),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.needsNewPosition=!1}if(this.options.orbits){if(void 0===t.absorberOrbit&&(t.absorberOrbit=y.create(0,0),t.absorberOrbit.length=G(t.getPosition(),this.position),t.absorberOrbit.angle=S()*Math.PI*2),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height);t.absorberOrbit.length=e*(.2*S()-.1+1)}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?"clockwise":"counter-clockwise");const o=t.absorberOrbit.length,n=t.absorberOrbit.angle,a=t.absorberOrbitDirection;t.velocity.setTo(y.origin);const r={x:"clockwise"===a?Math.cos:Math.sin,y:"clockwise"===a?Math.sin:Math.cos};t.position.x=this.position.x+o*r.x(n),t.position.y=this.position.y+o*r.y(n),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(t.retina.moveSpeed??0)*i.retina.pixelRatio/100*i.retina.reduceFactor}else{const i=y.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}},this.initialPosition=s?y.create(s.x,s.y):void 0,i instanceof Ks?this.options=i:(this.options=new Ks,this.options.load(i)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=O(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const o=this.options.size.limit;this.limit={radius:o.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:o.mass},this.color=Mt(this.options.color)??{b:0,g:0,r:0},this.position=this.initialPosition?.copy()??this._calcPosition()}attract(t){const e=this.container,i=this.options;if(i.draggable){const t=e.interactivity.mouse;if(t.clicking&&t.downPosition){G(this.position,t.downPosition)<=this.size&&(this.dragging=!0)}else this.dragging=!1;this.dragging&&t.position&&(this.position.x=t.position.x,this.position.y=t.position.y)}const s=t.getPosition(),{dx:o,dy:n,distance:a}=V(this.position,s),r=y.create(o,n);if(r.length=this.mass/Math.pow(a,2)*e.retina.reduceFactor,a<this.size+t.getRadius()){const s=.033*t.getRadius()*e.retina.pixelRatio;this.size>t.getRadius()&&a<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?i.destroy?t.destroy():(t.needsNewPosition=!0,this._updateParticlePosition(t,r)):(i.destroy&&(t.size.value-=s),this._updateParticlePosition(t,r)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=s),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=s*this.options.size.density*e.retina.reduceFactor)}else this._updateParticlePosition(t,r)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(0,0,this.size,0,2*Math.PI,!1),t.closePath(),t.fillStyle=Ht(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&tt(t,this.container.canvas.size,y.origin)?t:this._calcPosition()}}class eo{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||_t(t)?this.array[t||0]:this.array.find((e=>e.name===t)),t.addAbsorber=(t,e)=>this.addAbsorber(t,e)}addAbsorber(t,e){const i=new to(this,this.container,t,e);return this.array.push(i),i}draw(t){for(const e of this.array)e.draw(t)}handleClickMode(t){const e=this.absorbers,i=this.interactivityAbsorbers;if("absorber"===t){const t=ut(i)??ut(e),s=this.container.interactivity.mouse.clickPosition;this.addAbsorber(t,s)}}async init(){this.absorbers=this.container.actualOptions.absorbers,this.interactivityAbsorbers=this.container.actualOptions.interactivity.modes.absorbers,dt(this.absorbers,(t=>{this.addAbsorber(t)}))}particleUpdate(t){for(const e of this.array)if(e.attract(t),t.destroyed)break}removeAbsorber(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}}class io{constructor(){this.id="absorbers"}getPlugin(t){return new eo(t)}loadOptions(t,e){(this.needsPlugin(t)||this.needsPlugin(e))&&(e?.absorbers&&(t.absorbers=dt(e.absorbers,(t=>{const e=new Ks;return e.load(t),e}))),t.interactivity.modes.absorbers=dt(e?.interactivity?.modes?.absorbers,(t=>{const e=new Ks;return e.load(t),e})))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return xt(e)?!!e.length:!!e||!(!t.interactivity?.events?.onClick?.mode||!X("absorber",t.interactivity.events.onClick.mode))}}class so{load(t){t&&(void 0!==t.bottom&&(this.bottom=M(t.bottom)),void 0!==t.left&&(this.left=M(t.left)),void 0!==t.right&&(this.right=M(t.right)),void 0!==t.top&&(this.top=M(t.top)))}}class oo extends Ee{constructor(){super(),this.value=3}}class no extends Ee{constructor(){super(),this.value={min:4,max:9}}}class ao{constructor(){this.count=1,this.factor=new oo,this.rate=new no,this.sizeOffset=!0}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=dt(t.particles,(t=>st({},t))),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset),t.colorOffset&&(this.colorOffset=this.colorOffset??{},void 0!==t.colorOffset.h&&(this.colorOffset.h=t.colorOffset.h),void 0!==t.colorOffset.s&&(this.colorOffset.s=t.colorOffset.s),void 0!==t.colorOffset.l&&(this.colorOffset.l=t.colorOffset.l)))}}class ro{constructor(){this.bounds=new so,this.mode="none",this.split=new ao}load(t){t&&(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}function co(t,e,i,s){const o=i.options.destroy;if(!o)return;const n=o.split,a=ci(t,e,i.options),r=O(n.factor.value),c=i.getFillColor();n.color?a.color.load(n.color):n.colorOffset&&c?a.color.load({value:{hsl:{h:c.h+O(n.colorOffset.h??0),s:c.s+O(n.colorOffset.s??0),l:c.l+O(n.colorOffset.l??0)}}}):a.color.load({value:{hsl:i.getFillColor()}}),a.move.load({center:{x:i.position.x,y:i.position.y,mode:"precise"}}),_t(a.size.value)?a.size.value/=r:(a.size.value.min/=r,a.size.value.max/=r),a.load(s);const h=n.sizeOffset?M(-i.size.value,i.size.value):0,l={x:i.position.x+C(h),y:i.position.y+C(h)};return e.particles.addParticle(l,a,i.group,(t=>!(t.size.value<.5)&&(t.velocity.length=C(M(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,setTimeout((()=>{t.unbreakable=!1}),500),!0)))}class ho{constructor(t,e){this.engine=t,this.container=e}init(t){const e=this.container,i=t.options.destroy;if(!i)return;t.splitCount=0;const s=i.bounds;t.destroyBounds||(t.destroyBounds={});const{bottom:o,left:n,right:a,top:r}=s,{destroyBounds:c}=t,h=e.canvas.size;o&&(c.bottom=O(o)*h.height/100),n&&(c.left=O(n)*h.width/100),a&&(c.right=O(a)*h.width/100),r&&(c.top=O(r)*h.height/100)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new ro);for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&"split"===i.mode&&function(t,e,i){const s=i.options.destroy;if(!s)return;const o=s.split;if(o.count>=0&&(void 0===i.splitCount||i.splitCount++>o.count))return;const n=O(o.rate.value),a=ut(o.particles);for(let s=0;s<n;s++)co(t,e,i,a)}(this.engine,this.container,t)}update(t){if(!this.isEnabled(t))return;const e=t.getPosition(),i=t.destroyBounds;i&&(void 0!==i.bottom&&e.y>=i.bottom||void 0!==i.left&&e.x<=i.left||void 0!==i.right&&e.x>=i.right||void 0!==i.top&&e.y<=i.top)&&t.destroy()}}class lo extends Ps{constructor(t,e,i,s){super(t,e,i,s)}async init(){}async randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,o]=[t.width/2,t.height/2],n=((t,e)=>{const i=S()/4,s=Math.atan(e/t*Math.tan(2*Math.PI*i)),o=S();return o<.25?s:o<.5?Math.PI-s:o<.75?Math.PI+s:-s})(s,o),a=(l=n,(c=s)*(h=o)/Math.sqrt((h*Math.cos(l))**2+(c*Math.sin(l))**2)),r=e?a*Math.sqrt(S()):a;var c,h,l;return{position:{x:i.x+r*Math.cos(n),y:i.y+r*Math.sin(n)}}}}class uo{generate(t,e,i,s){return new lo(t,e,i,s)}}function po(t,e){return t+e*(S()-.5)}class go extends Ps{constructor(t,e,i,s){super(t,e,i,s)}async init(){}async randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:po(e.x,i.width),y:po(e.y,i.height)}};{const t=i.width/2,s=i.height/2,o=Math.floor(4*S()),n=2*(S()-.5);switch(o){case 0:return{position:{x:e.x+n*t,y:e.y-s}};case 1:return{position:{x:e.x-t,y:e.y+n*s}};case 2:return{position:{x:e.x+n*t,y:e.y+s}};default:return{position:{x:e.x+t,y:e.y+n*s}}}}}}class fo{generate(t,e,i,s){return new go(t,e,i,s)}}class yo{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=st({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}const vo="trail";class wo extends Mi{constructor(t){super(t),this._delay=0}clear(){}init(){}async interact(t){const e=this.container,{interactivity:i}=e;if(!e.retina.reduceFactor)return;const s=e.actualOptions.interactivity.modes.trail;if(!s)return;const o=1e3*s.delay/this.container.retina.reduceFactor;if(this._delay<o&&(this._delay+=t.value),this._delay<o)return;const n=!(s.pauseOnStop&&(i.mouse.position===this._lastPosition||i.mouse.position?.x===this._lastPosition?.x&&i.mouse.position?.y===this._lastPosition?.y)),a=e.interactivity.mouse.position;a?this._lastPosition={...a}:delete this._lastPosition,n&&e.particles.push(s.quantity,e.interactivity.mouse,s.particles),this._delay-=o}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&X(vo,o.onClick.mode)||s.inside&&!!s.position&&X(vo,o.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new yo);for(const i of e)t.trail.load(i?.trail)}reset(){}}class mo{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=M(t.value)))}}class _o{constructor(){this.darken=new mo,this.enable=!1,this.enlighten=new mo,this.mode="vertical",this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=ce.create(this.backColor,t.backColor)),this.darken.load(t.darken),void 0!==t.enable&&(this.enable=t.enable),this.enlighten.load(t.enlighten),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.speed&&(this.speed=M(t.speed)))}}class bo{getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(t){!function(t){const e=t.options.roll;if(e?.enable)if(t.roll={enable:e.enable,horizontal:"horizontal"===e.mode||"both"===e.mode,vertical:"vertical"===e.mode||"both"===e.mode,angle:S()*Math.PI*2,speed:O(e.speed)/360},e.backColor)t.backColor=Et(e.backColor);else if(e.darken.enable&&e.enlighten.enable){const i=S()>=.5?"darken":"enlighten";t.roll.alter={type:i,value:O("darken"===i?e.darken.value:e.enlighten.value)}}else e.darken.enable?t.roll.alter={type:"darken",value:O(e.darken.value)}:e.enlighten.enable&&(t.roll.alter={type:"enlighten",value:O(e.enlighten.value)});else t.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll||(t.roll=new _o);for(const i of e)t.roll.load(i?.roll)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const o=s.speed*e.factor,n=2*Math.PI;s.angle+=o,s.angle>n&&(s.angle-=n)}(t,e)}}function So(t,e,i,s,o,n){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=x(t.velocity.x,-1,1),t.velocity.y=x(t.velocity.y,-1,1));t.lastPathTime-=t.pathDelay}(t,n);const a=t.gravity,r=a?.enable&&a.inverse?-1:1;o&&i&&(t.velocity.x+=o*n.factor/(60*i)),a?.enable&&i&&(t.velocity.y+=r*(a.acceleration*n.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c);const h=t.velocity.mult(i);a?.enable&&s>0&&(!a.inverse&&h.y>=0&&h.y>=s||a.inverse&&h.y<=0&&h.y<=-s)&&(h.y=r*s,i&&(t.velocity.y=h.y/i));const l=t.options.zIndex,d=(1-t.zIndexFactor)**l.velocityRate;h.multTo(d);const{position:u}=t;u.addTo(h),e.vibrate&&(u.x+=Math.sin(u.x*Math.cos(u.y)),u.y+=Math.cos(u.y*Math.sin(u.x)))}class xo{constructor(){this._initSpin=t=>{const e=t.container,i=t.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},o={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},n=G(t.getPosition(),o),a=O(i.acceleration);t.retina.spinAcceleration=a*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?"clockwise":"counter-clockwise",angle:t.velocity.angle,radius:n,acceleration:t.retina.spinAcceleration}}}init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:O(e.acceleration),inverse:e.inverse},this._initSpin(t)}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,e){const i=t.options,s=i.move;if(!s.enable)return;const o=t.container,n=o.retina.pixelRatio,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),r=(t.retina.moveSpeed??=O(s.speed)*n)*o.retina.reduceFactor,c=t.retina.moveDrift??=O(t.options.move.drift)*n,h=A(i.size.value)*n,l=r*(s.size?t.getRadius()/h:1)*a*(e.factor||1)/2,d=t.retina.maxSpeed??o.retina.maxSpeed;s.spin.enable?function(t,e){const i=t.container;if(!t.spin)return;const s={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(i.canvas.size.width,i.canvas.size.height),n=.5*o;t.spin.radius>n?(t.spin.radius=n,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=.01*e*(1-t.spin.radius/o)}(t,l):So(t,s,l,d,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=V(e,t.position),o=Math.abs(i),n=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(r||c)if((r&&o>=r||c&&n>=c)&&!t.misplaced)t.misplaced=!!r&&o>r||!!c&&n>c,r&&(t.velocity.x=.5*t.velocity.y-t.velocity.x),c&&(t.velocity.y=.5*t.velocity.x-t.velocity.y);else if((!r||o<r)&&(!c||n<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;r&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-S()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-S())}}(t)}}class Po{draw(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:2*Math.PI});const o=i.circleRange;e.arc(0,0,s,o.min,o.max,!1)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=St(s)?{min:s.min*Math.PI/180,max:s.max*Math.PI/180}:{min:0,max:s*Math.PI/180}}}function Co(t,e,i,s,o){if(!e||!i.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=t.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=C(i.offset),a=(e.velocity??0)*t.factor+3.6*n,r=e.decay??1;o&&"increasing"!==e.status?(e.value-=a,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status="increasing",e.value+=e.value)):(e.value+=a,e.value>s&&(e.loops||(e.loops=0),e.loops++,o&&(e.status="decreasing",e.value-=e.value%s))),e.velocity&&1!==r&&(e.velocity*=r),e.value>s&&(e.value%=s)}class Oo{constructor(t){this.container=t}init(t){const e=Et(t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=qt(e,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:o}=t;return!t.destroyed&&!t.spawning&&(void 0!==o?.h.value&&e.enable||void 0!==o?.s.value&&i.enable||void 0!==o?.l.value&&s.enable)}update(t,e){!function(t,e){const{h:i,s,l:o}=t.options.color.animation,{color:n}=t;if(!n)return;const{h:a,s:r,l:c}=n;a&&Co(e,a,i,360,!1),r&&Co(e,r,s,100,!0),c&&Co(e,c,o,100,!0)}(t,e)}}class To{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=gt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=O(i.speed)/100*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=S()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.opacity;if(t.destroyed||!i?.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const s=i.min,o=i.max,n=i.decay??1;if(i.time||(i.time=0),(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=e.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case"increasing":i.value>=o?(i.status="decreasing",i.loops||(i.loops=0),i.loops++):i.value+=(i.velocity??0)*e.factor;break;case"decreasing":i.value<=s?(i.status="increasing",i.loops||(i.loops=0),i.loops++):i.value-=(i.velocity??0)*e.factor}i.velocity&&1!==i.decay&&(i.velocity*=n),function(t,e,i,s){switch(t.options.opacity.animation.destroy){case"max":e>=s&&t.destroy();break;case"min":e<=i&&t.destroy()}}(t,i.value,s,o),t.destroyed||(i.value=x(i.value,s,o))}}(t,e)}}class Ao{constructor(t){this.container=t,this.modes=["bounce","bounce-vertical","bounce-horizontal","bounceVertical","bounceHorizontal","split"]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;let n=!1;for(const[,s]of o.plugins)if(void 0!==s.particleBounce&&(n=s.particleBounce(t,i,e)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,c=t.getRadius(),h=it(a,c),l=o.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode||"left"!==t.direction&&"right"!==t.direction)return;t.bounds.right<0&&"left"===t.direction?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&"right"===t.direction&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&e>0||"left"===t.direction&&t.bounds.left<=0&&e<0){const e=O(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&"right"===t.direction?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&"left"===t.direction&&(t.particle.position.x=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c}),function(t){if("bounce"!==t.outMode&&"bounce-vertical"!==t.outMode&&"bounceVertical"!==t.outMode&&"split"!==t.outMode||"bottom"!==t.direction&&"top"!==t.direction)return;t.bounds.bottom<0&&"top"===t.direction?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&"bottom"===t.direction&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&e>0||"top"===t.direction&&t.bounds.top<=0&&e<0){const e=O(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&"bottom"===t.direction?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&"top"===t.direction&&(t.particle.position.y=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c})}}class Mo{constructor(t){this.container=t,this.modes=["destroy"]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case"normal":case"outside":if(tt(t.position,o.canvas.size,y.origin,t.getRadius(),e))return;break;case"inside":{const{dx:e,dy:i}=V(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&e>t.moveCenter.radius||o<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||o>=0&&i<-t.moveCenter.radius)return;break}}o.particles.remove(t,void 0,!0)}}class Vo{constructor(t){this.container=t,this.modes=["none"]}update(t,e,i,s){if(!this.modes.includes(s))return;if(t.options.move.distance.horizontal&&("left"===e||"right"===e)||t.options.move.distance.vertical&&("top"===e||"bottom"===e))return;const o=t.options.move.gravity,n=this.container,a=n.canvas.size,r=t.getRadius();if(o.enable){const i=t.position;(!o.inverse&&i.y>a.height+r&&"bottom"===e||o.inverse&&i.y<-r&&"top"===e)&&n.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=a.height+r||t.velocity.y<0&&t.position.y>=-r||t.velocity.x>0&&t.position.x<=a.width+r||t.velocity.x<0&&t.position.x>=-r)return;tt(t.position,n.canvas.size,y.origin,r,e)||n.particles.remove(t)}}}class Go{constructor(t){this.container=t,this.modes=["out"]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case"inside":{const{x:e,y:i}=t.velocity,s=y.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(y.create(t.moveCenter));const{dx:n,dy:a}=V(t.position,s);if(e<=0&&n>=0||i<=0&&a>=0||e>=0&&n<=0||i>=0&&a<=0)return;t.position.x=Math.floor(C({min:0,max:o.canvas.size.width})),t.position.y=Math.floor(C({min:0,max:o.canvas.size.height}));const{dx:r,dy:c}=V(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction;break}default:if(tt(t.position,o.canvas.size,y.origin,t.getRadius(),e))return;switch(t.outType){case"outside":{t.position.x=Math.floor(C({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(C({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=V(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case"normal":{const i=t.options.move.warp,s=o.canvas.size,n={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},a=t.getRadius(),r=it(t.position,a);"right"===e&&r.left>s.width+t.offset.x?(t.position.x=n.left,t.initialPosition.x=t.position.x,i||(t.position.y=S()*s.height,t.initialPosition.y=t.position.y)):"left"===e&&r.right<-t.offset.x&&(t.position.x=n.right,t.initialPosition.x=t.position.x,i||(t.position.y=S()*s.height,t.initialPosition.y=t.position.y)),"bottom"===e&&r.top>s.height+t.offset.y?(i||(t.position.x=S()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.top,t.initialPosition.y=t.position.y):"top"===e&&r.bottom<-t.offset.y&&(i||(t.position.x=S()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.bottom,t.initialPosition.y=t.position.y);break}}}}}class Eo{constructor(t){this.container=t,this._updateOutMode=(t,e,i,s)=>{for(const o of this.updaters)o.update(t,s,e,i)},this.updaters=[new Ao(t),new Mo(t),new Go(t),new Vo(t)]}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;this._updateOutMode(t,e,i.bottom??i.default,"bottom"),this._updateOutMode(t,e,i.left??i.default,"left"),this._updateOutMode(t,e,i.right??i.default,"right"),this._updateOutMode(t,e,i.top??i.default,"top")}}class zo{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/100*e.retina.reduceFactor,i.sync||(t.size.velocity*=S()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.loops=0}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.size;if(t.destroyed||!i||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const s=(i.velocity??0)*e.factor,o=i.min,n=i.max,a=i.decay??1;if(i.time||(i.time=0),(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=e.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case"increasing":i.value>=n?(i.status="decreasing",i.loops||(i.loops=0),i.loops++):i.value+=s;break;case"decreasing":i.value<=o?(i.status="increasing",i.loops||(i.loops=0),i.loops++):i.value-=s}i.velocity&&1!==a&&(i.velocity*=a),function(t,e,i,s){switch(t.options.size.animation.destroy){case"max":e>=s&&t.destroy();break;case"min":e<=i&&t.destroy()}}(t,i.value,o,n),t.destroyed||(i.value=x(i.value,o,n))}}(t,e)}}async function Ro(t,e=!0){await async function(t,e=!0){await t.addMover("base",(()=>new xo),e)}(t,!1),await async function(t,e=!0){await t.addShape("circle",new Po,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("color",(t=>new Oo(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("opacity",(t=>new To(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("outModes",(t=>new Eo(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("size",(()=>new zo),e)}(t,!1),await t.refresh(e)}const ko=["emoji"],Io='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';class Lo{constructor(){this._emojiShapeDict=new Map}destroy(){for(const[,t]of this._emojiShapeDict)t instanceof ImageBitmap&&t?.close()}draw(t){const{context:e,particle:i,radius:s,opacity:o}=t,n=i.emojiData;n&&(e.globalAlpha=o,e.drawImage(n,-s,-s,2*s,2*s),e.globalAlpha=1)}async init(t){const e=t.actualOptions;if(ko.find((t=>X(t,e.particles.shape.type)))){const t=[Y(Io)],i=ko.map((t=>e.particles.shape.options[t])).find((t=>!!t));i&&dt(i,(e=>{e.font&&t.push(Y(e.font))})),await Promise.all(t)}}particleDestroy(t){delete t.emojiData}particleInit(t,e){if(!e.emojiData){const t=e.shapeData;if(!t?.value)return;const i=ut(t.value,e.randomIndexData),s=t.font??Io;if(!i)return;const o=`${i}_${s}`,n=this._emojiShapeDict.get(o);if(n)return void(e.emojiData=n);const a=2*A(e.size.value);let r;if("undefined"!=typeof OffscreenCanvas){const t=new OffscreenCanvas(a,a),o=t.getContext("2d");if(!o)return;o.font=`400 ${2*A(e.size.value)}px ${s}`,o.textBaseline="middle",o.textAlign="center",o.fillText(i,A(e.size.value),A(e.size.value)),r=t.transferToImageBitmap()}else{const t=document.createElement("canvas");t.width=a,t.height=a;const o=t.getContext("2d");if(!o)return;o.font=`400 ${2*A(e.size.value)}px ${s}`,o.textBaseline="middle",o.textAlign="center",o.fillText(i,A(e.size.value),A(e.size.value)),r=t}this._emojiShapeDict.set(o,r),e.emojiData=r}}}class Do{constructor(){this.distance=200,this.duration=.4,this.easing="ease-out-quad",this.factor=1,this.maxSpeed=50,this.speed=1}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.speed&&(this.speed=t.speed))}}const Ho="attract";class Bo extends Mi{constructor(t,e){super(e),this._clickAttract=()=>{const t=this.container;t.attract||(t.attract={particles:[]});const{attract:e}=t;if(e.finish||(e.count||(e.count=0),e.count++,e.count===t.particles.count&&(e.finish=!0)),e.clicking){const e=t.interactivity.mouse.clickPosition,i=t.retina.attractModeDistance;if(!i||i<0||!e)return;this._processAttract(e,i,new yi(e.x,e.y,i))}else!1===e.clicking&&(e.particles=[])},this._hoverAttract=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.attractModeDistance;!i||i<0||!e||this._processAttract(e,i,new yi(e.x,e.y,i))},this._processAttract=(t,e,i)=>{const s=this.container,o=s.actualOptions.interactivity.modes.attract;if(!o)return;const n=s.particles.quadTree.query(i,(t=>this.isEnabled(t)));for(const i of n){const{dx:s,dy:n,distance:a}=V(i.position,t),r=o.speed*o.factor,c=x(_(o.easing)(1-a/e)*r,0,o.maxSpeed),h=y.create(0===a?r:s/a*c,0===a?r:n/a*c);i.position.subFrom(h)}},this._engine=t,e.attract||(e.attract={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.attract;if(i&&t===Ho){e.attract||(e.attract={particles:[]}),e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout((()=>{e.destroyed||(e.attract||(e.attract={particles:[]}),e.attract.clicking=!1)}),1e3*i.duration)}}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.attract;e&&(t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,o=s.onHover.enable,n=s.onHover.mode,a=s.onClick.enable,c=s.onClick.mode;i&&o&&X(Ho,n)?this._hoverAttract():a&&X(Ho,c)&&this._clickAttract()}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;if(!(s.position&&o.onHover.enable||s.clickPosition&&o.onClick.enable))return!1;const n=o.onHover.mode,a=o.onClick.mode;return X(Ho,n)||X(Ho,a)}loadModeOptions(t,...e){t.attract||(t.attract=new Do);for(const i of e)t.attract.load(i?.attract)}reset(){}}class Fo{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}const Uo="bounce";class No extends Mi{constructor(t){super(t),this._processBounce=(t,e,i)=>{const s=this.container.particles.quadTree.query(i,(t=>this.isEnabled(t)));for(const o of s)i instanceof yi?ht(ct(o),{position:t,radius:e,mass:e**2*Math.PI/2,velocity:y.origin,factor:y.origin}):i instanceof fi&<(o,it(t,e))},this._processMouseBounce=()=>{const t=this.container,e=10*t.retina.pixelRatio,i=t.interactivity.mouse.position,s=t.retina.bounceModeDistance;!s||s<0||!i||this._processBounce(i,s,new yi(i.x,i.y,s+e))},this._singleSelectorBounce=(t,e)=>{const i=this.container,s=document.querySelectorAll(t);s.length&&s.forEach((t=>{const s=t,o=i.retina.pixelRatio,n={x:(s.offsetLeft+s.offsetWidth/2)*o,y:(s.offsetTop+s.offsetHeight/2)*o},a=s.offsetWidth/2*o,r=10*o,c="circle"===e.type?new yi(n.x,n.y,a+r):new fi(s.offsetLeft*o-r,s.offsetTop*o-r,s.offsetWidth*o+2*r,s.offsetHeight*o+2*r);this._processBounce(n,a,c)}))}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bounce;e&&(t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions.interactivity.events,i=t.interactivity.status===r,s=e.onHover.enable,o=e.onHover.mode,n=e.onDiv;i&&s&&X(Uo,o)?this._processMouseBounce():nt(Uo,n,((t,e)=>this._singleSelectorBounce(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv;return s.position&&o.onHover.enable&&X(Uo,o.onHover.mode)||ot(Uo,n)}loadModeOptions(t,...e){t.bounce||(t.bounce=new Fo);for(const i of e)t.bounce.load(i?.bounce)}reset(){}}class $o{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(t){if(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.mix&&(this.mix=t.mix),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.color){const e=xt(this.color)?void 0:this.color;this.color=dt(t.color,(t=>ce.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class qo extends $o{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class jo extends $o{load(t){super.load(t),t&&(this.divs=dt(t.divs,(t=>{const e=new qo;return e.load(t),e})))}}function Qo(t,e,i,s){if(e>=i){return x(t+(e-i)*s,t,e)}if(e<i){return x(t-(i-e)*s,e,t)}}const Wo="bubble";class Zo extends Mi{constructor(t){super(t),this._clickBubble=()=>{const t=this.container,e=t.actualOptions,i=t.interactivity.mouse.clickPosition,s=e.interactivity.modes.bubble;if(!s||!i)return;t.bubble||(t.bubble={});const o=t.retina.bubbleModeDistance;if(!o||o<0)return;const n=t.particles.quadTree.queryCircle(i,o,(t=>this.isEnabled(t))),{bubble:a}=t;for(const e of n){if(!a.clicking)continue;e.bubble.inRange=!a.durationEnd;const n=G(e.getPosition(),i),r=((new Date).getTime()-(t.interactivity.mouse.clickTime||0))/1e3;r>s.duration&&(a.durationEnd=!0),r>2*s.duration&&(a.clicking=!1,a.durationEnd=!1);const c={bubbleObj:{optValue:t.retina.bubbleModeSize,value:e.bubble.radius},particlesObj:{optValue:A(e.options.size.value)*t.retina.pixelRatio,value:e.size.value},type:"size"};this._process(e,n,r,c);const h={bubbleObj:{optValue:s.opacity,value:e.bubble.opacity},particlesObj:{optValue:A(e.options.opacity.value),value:e.opacity?.value??1},type:"opacity"};this._process(e,n,r,h),!a.durationEnd&&n<=o?this._hoverBubbleColor(e,n):delete e.bubble.color}},this._hoverBubble=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.bubbleModeDistance;if(!i||i<0||void 0===e)return;const s=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));for(const o of s){o.bubble.inRange=!0;const s=G(o.getPosition(),e),a=1-s/i;s<=i?a>=0&&t.interactivity.status===r&&(this._hoverBubbleSize(o,a),this._hoverBubbleOpacity(o,a),this._hoverBubbleColor(o,a)):this.reset(o),t.interactivity.status===n&&this.reset(o)}},this._hoverBubbleColor=(t,e,i)=>{const s=this.container.actualOptions,o=i??s.interactivity.modes.bubble;if(o){if(!t.bubble.finalColor){const e=o.color;if(!e)return;const i=ut(e);t.bubble.finalColor=Et(i)}if(t.bubble.finalColor)if(o.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?zt(Ft(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}},this._hoverBubbleOpacity=(t,e,i)=>{const s=this.container.actualOptions,o=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!o)return;const n=t.options.opacity.value,a=Qo(t.opacity?.value??1,o,A(n),e);void 0!==a&&(t.bubble.opacity=a)},this._hoverBubbleSize=(t,e,i)=>{const s=this.container,o=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===o)return;const n=A(t.options.size.value)*s.retina.pixelRatio,a=Qo(t.size.value,o,n,e);void 0!==a&&(t.bubble.radius=a)},this._process=(t,e,i,s)=>{const o=this.container,n=s.bubbleObj.optValue,a=o.actualOptions.interactivity.modes.bubble;if(!a||void 0===n)return;const r=a.duration,c=o.retina.bubbleModeDistance,h=s.particlesObj.optValue,l=s.bubbleObj.value,d=s.particlesObj.value||0,u=s.type;if(c&&!(c<0)&&n!==h)if(o.bubble||(o.bubble={}),o.bubble.durationEnd)l&&("size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity);else if(e<=c){if((l??d)!==n){const e=d-i*(d-n)/r;"size"===u&&(t.bubble.radius=e),"opacity"===u&&(t.bubble.opacity=e)}}else"size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity},this._singleSelectorHover=(t,e,i)=>{const s=this.container,o=document.querySelectorAll(e),n=s.actualOptions.interactivity.modes.bubble;n&&o.length&&o.forEach((e=>{const o=e,a=s.retina.pixelRatio,r={x:(o.offsetLeft+o.offsetWidth/2)*a,y:(o.offsetTop+o.offsetHeight/2)*a},c=o.offsetWidth/2*a,h="circle"===i.type?new yi(r.x,r.y,c):new fi(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.offsetHeight*a),l=s.particles.quadTree.query(h,(t=>this.isEnabled(t)));for(const e of l){if(!h.contains(e.getPosition()))continue;e.bubble.inRange=!0;const i=rt(n.divs,o);e.bubble.div&&e.bubble.div===o||(this.clear(e,t,!0),e.bubble.div=o),this._hoverBubbleSize(e,1,i),this._hoverBubbleOpacity(e,1,i),this._hoverBubbleColor(e,1,i)}}))},t.bubble||(t.bubble={}),this.handleClickMode=e=>{e===Wo&&(t.bubble||(t.bubble={}),t.bubble.clicking=!0)}}clear(t,e,i){t.bubble.inRange&&!i||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bubble;e&&(t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}async interact(t){const e=this.container.actualOptions.interactivity.events,i=e.onHover,s=e.onClick,o=i.enable,n=i.mode,a=s.enable,r=s.mode,c=e.onDiv;o&&X(Wo,n)?this._hoverBubble():a&&X(Wo,r)?this._clickBubble():nt(Wo,c,((e,i)=>this._singleSelectorHover(t,e,i)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,{onClick:n,onDiv:a,onHover:r}=o,c=ot(Wo,a);return!!(c||r.enable&&s.position||n.enable&&s.clickPosition)&&(X(Wo,r.mode)||X(Wo,n.mode)||c)}loadModeOptions(t,...e){t.bubble||(t.bubble=new jo);for(const i of e)t.bubble.load(i?.bubble)}reset(t){t.bubble.inRange=!1}}class Xo{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class Yo{constructor(){this.distance=80,this.links=new Xo,this.radius=60}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}function Jo(t,e,i,s){const o=t.actualOptions.interactivity.modes.connect;if(o)return function(t,e,i,s){const o=Math.floor(i.getRadius()/e.getRadius()),n=e.getFillColor(),a=i.getFillColor();if(!n||!a)return;const r=e.getPosition(),c=i.getPosition(),h=Ft(n,a,e.getRadius(),i.getRadius()),l=t.createLinearGradient(r.x,r.y,c.x,c.y);return l.addColorStop(0,Bt(n,s)),l.addColorStop(o>1?1:o,Ht(h,s)),l.addColorStop(1,Bt(a,s)),l}(e,i,s,o.links.opacity)}function Ko(t,e,i){t.canvas.draw((s=>{const o=Jo(t,s,e,i);if(!o)return;const n=e.getPosition(),a=i.getPosition();!function(t,e,i,s,o){Qt(t,s,o),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,o,n,a)}))}class tn extends Mi{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.connect;e&&(t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}async interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const e=t.interactivity.mouse.position;if(!t.retina.connectModeDistance||t.retina.connectModeDistance<0||!t.retina.connectModeRadius||t.retina.connectModeRadius<0||!e)return;const i=Math.abs(t.retina.connectModeRadius),s=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));let o=0;for(const e of s){const i=e.getPosition();for(const n of s.slice(o+1)){const s=n.getPosition(),o=Math.abs(t.retina.connectModeDistance),a=Math.abs(i.x-s.x),r=Math.abs(i.y-s.y);a<o&&r<o&&Ko(t,e,n)}++o}}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return!(!s.onHover.enable||!i.position)&&X("connect",s.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Yo);for(const i of e)t.connect.load(i?.connect)}reset(){}}class en{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){t&&(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class sn{constructor(){this.distance=100,this.links=new en}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links))}}function on(t,e,i,s,o){t.canvas.draw((t=>{const n=e.getPosition();!function(t,e,i,s,o,n){Qt(t,i,s),t.strokeStyle=Ht(o,n),t.lineWidth=e,t.stroke()}(t,e.retina.linksWidth??0,n,o,i,s)}))}class nn extends Mi{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.grab;e&&(t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions.interactivity;if(!e.modes.grab||!e.events.onHover.enable||t.interactivity.status!==r)return;const i=t.interactivity.mouse.position;if(!i)return;const s=t.retina.grabModeDistance;if(!s||s<0)return;const o=t.particles.quadTree.queryCircle(i,s,(t=>this.isEnabled(t)));for(const n of o){const o=G(n.getPosition(),i);if(o>s)continue;const a=e.modes.grab.links,r=a.opacity,c=r-o*r/s;if(c<=0)continue;const h=a.color??n.options.links?.color;if(!t.particles.grabLineColor&&h){const i=e.modes.grab.links;t.particles.grabLineColor=Nt(h,i.blink,i.consent)}const l=Ut(n,void 0,t.particles.grabLineColor);l&&on(t,n,l,c,i)}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&X("grab",s.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new sn);for(const i of e)t.grab.load(i?.grab)}reset(){}}class an extends Mi{constructor(t){super(t),this.handleClickMode=t=>{if("pause"!==t)return;const e=this.container;e.getAnimationStatus()?e.pause():e.play()}}clear(){}init(){}async interact(){}isEnabled(){return!0}reset(){}}class rn{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(!t)return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map((t=>t))),this.groups.length||(this.default=!0);const e=t.quantity;void 0!==e&&(this.quantity=M(e))}}class cn extends Mi{constructor(t){super(t),this.handleClickMode=t=>{if("push"!==t)return;const e=this.container,i=e.actualOptions.interactivity.modes.push;if(!i)return;const s=O(i.quantity);if(s<=0)return;const o=K([void 0,...i.groups]),n=void 0!==o?e.actualOptions.particles.groups[o]:void 0;e.particles.push(s,e.interactivity.mouse,n,o)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new rn);for(const i of e)t.push.load(i?.push)}reset(){}}class hn{constructor(){this.quantity=2}load(t){if(!t)return;const e=t.quantity;void 0!==e&&(this.quantity=M(e))}}class ln extends Mi{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const s=O(i.interactivity.modes.remove.quantity);e.particles.removeQuantity(s)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new hn);for(const i of e)t.remove.load(i?.remove)}reset(){}}class dn{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing="ease-out-quad"}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed))}}class un extends dn{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class pn extends dn{load(t){super.load(t),t&&(this.divs=dt(t.divs,(t=>{const e=new un;return e.load(t),e})))}}const gn="repulse";class fn extends Mi{constructor(t,e){super(e),this._clickRepulse=()=>{const t=this.container,e=t.actualOptions.interactivity.modes.repulse;if(!e)return;const i=t.repulse||{particles:[]};if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const s=t.retina.repulseModeDistance;if(!s||s<0)return;const o=Math.pow(s/6,3),n=t.interactivity.mouse.clickPosition;if(void 0===n)return;const a=new yi(n.x,n.y,o),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const t of r){const{dx:s,dy:a,distance:r}=V(n,t.position),c=r**2,h=-o*e.speed/c;if(c<=o){i.particles.push(t);const e=y.create(s,a);e.length=h,t.velocity.setTo(e)}}}else if(!1===i.clicking){for(const t of i.particles)t.velocity.setTo(t.initialVelocity);i.particles=[]}},this._hoverRepulse=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.repulseModeDistance;!i||i<0||!e||this._processRepulse(e,i,new yi(e.x,e.y,i))},this._processRepulse=(t,e,i,s)=>{const o=this.container,n=o.particles.quadTree.query(i,(t=>this.isEnabled(t))),a=o.actualOptions.interactivity.modes.repulse;if(!a)return;const{easing:r,speed:c,factor:h,maxSpeed:l}=a,d=_(r),u=(s?.speed??c)*h;for(const i of n){const{dx:s,dy:o,distance:n}=V(i.position,t),a=x(d(1-n/e)*u,0,l),r=y.create(0===n?u:s/n*a,0===n?u:o/n*a);i.position.addTo(r)}},this._singleSelectorRepulse=(t,e)=>{const i=this.container,s=i.actualOptions.interactivity.modes.repulse;if(!s)return;const o=document.querySelectorAll(t);o.length&&o.forEach((t=>{const o=t,n=i.retina.pixelRatio,a={x:(o.offsetLeft+o.offsetWidth/2)*n,y:(o.offsetTop+o.offsetHeight/2)*n},r=o.offsetWidth/2*n,c="circle"===e.type?new yi(a.x,a.y,r):new fi(o.offsetLeft*n,o.offsetTop*n,o.offsetWidth*n,o.offsetHeight*n),h=rt(s.divs,o);this._processRepulse(a,r,c,h)}))},this._engine=t,e.repulse||(e.repulse={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.repulse;if(!i||t!==gn)return;e.repulse||(e.repulse={particles:[]});const s=e.repulse;s.clicking=!0,s.count=0;for(const t of e.repulse.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);s.particles=[],s.finish=!1,setTimeout((()=>{e.destroyed||(s.clicking=!1)}),1e3*i.duration)}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.repulse;e&&(t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,o=s.onHover,n=o.enable,a=o.mode,c=s.onClick,h=c.enable,l=c.mode,d=s.onDiv;i&&n&&X(gn,a)?this._hoverRepulse():h&&X(gn,l)?this._clickRepulse():nt(gn,d,((t,e)=>this._singleSelectorRepulse(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv,a=o.onHover,r=o.onClick,c=ot(gn,n);if(!(c||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const h=a.mode,l=r.mode;return X(gn,h)||X(gn,l)||c}loadModeOptions(t,...e){t.repulse||(t.repulse=new pn);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class yn{constructor(){this.factor=3,this.radius=200}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class vn extends Mi{constructor(t){super(t)}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.slow;e&&(t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}async interact(){}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&X("slow",s.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new yn);for(const i of e)t.slow.load(i?.slow)}reset(t){t.slow.inRange=!1;const e=this.container,i=e.actualOptions,s=e.interactivity.mouse.position,o=e.retina.slowModeRadius,n=i.interactivity.modes.slow;if(!n||!o||o<0||!s)return;const a=G(s,t.getPosition()),r=a/o,c=n.factor,{slow:h}=t;a>o||(h.inRange=!0,h.factor=r/c)}}const wn=[0,4,2,1],mn=[8,8,4,2];class _n{constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce(((t,e)=>t+String.fromCharCode(e)),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t="",e=0;do{e=this.data[this.pos++];for(let i=e;--i>=0;t+=String.fromCharCode(this.data[this.pos++]));}while(0!==e);return t}readSubBlocksBin(){let t=0,e=0;for(let i=0;0!==(t=this.data[this.pos+i]);i+=t+1)e+=t;const i=new Uint8Array(e);for(let e=0;0!==(t=this.data[this.pos++]);)for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(;0!==this.data[this.pos];this.pos+=this.data[this.pos]+1);this.pos++}}function bn(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}async function Sn(t,e,i,s,o,n){switch(t.nextByte()){case 59:return!0;case 44:await async function(t,e,i,s,o,n){const a=e.frames[s(!0)];a.left=t.nextTwoBytes(),a.top=t.nextTwoBytes(),a.width=t.nextTwoBytes(),a.height=t.nextTwoBytes();const r=t.nextByte(),c=128==(128&r),h=64==(64&r);a.sortFlag=32==(32&r),a.reserved=(24&r)>>>3;const l=1<<1+(7&r);c&&(a.localColorTable=bn(t,l));const d=t=>{const{r:s,g:n,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return{r:s,g:n,b:r,a:t===o(null)?i?~~((s+n+r)/3):0:255}},u=(()=>{try{return new ImageData(a.width,a.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p,y=(t,e)=>{const i=t>>>3,s=7&t;return(g[i]+(g[i+1]<<8)+(g[i+2]<<16)&(1<<e)-1<<s)>>>s};if(h){for(let i=0,o=p+1,r=0,c=[[0]],h=0;h<4;h++){if(wn[h]<a.height)for(let t=0,e=0;;){const s=i;if(i=y(r,o),r+=o+1,i===f){o=p+1,c.length=f+2;for(let t=0;t<c.length;t++)c[t]=t<f?[t]:[]}else{i>=c.length?c.push(c[s].concat(c[s][0])):s!==f&&c.push(c[s].concat(c[i][0]));for(let s=0;s<c[i].length;s++){const{r:o,g:n,b:r,a:l}=d(c[i][s]);u.data.set([o,n,r,l],wn[h]*a.width+mn[h]*e+t%(4*a.width)),t+=4}c.length===1<<o&&o<12&&o++}if(t===4*a.width*(e+1)&&(e++,wn[h]+mn[h]*e>=a.height))break}n?.(t.pos/(t.data.length-1),s(!1)+1,u,{x:a.left,y:a.top},{width:e.width,height:e.height})}a.image=u,a.bitmap=await createImageBitmap(u)}else{for(let t=0,e=p+1,i=0,s=[[0]],o=-4;;){const n=t;if(t=y(i,e),i+=e,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=s.length?s.push(s[n].concat(s[n][0])):n!==f&&s.push(s[n].concat(s[t][0]));for(let e=0;e<s[t].length;e++){const{r:i,g:n,b:a,a:r}=d(s[t][e]);u.data.set([i,n,a,r],o+=4)}s.length>=1<<e&&e<12&&e++}}a.image=u,a.bitmap=await createImageBitmap(u),n?.((t.pos+1)/t.data.length,s(!1)+1,a.image,{x:a.left,y:a.top},{width:e.width,height:e.height})}}(t,e,i,s,o,n);break;case 33:await async function(t,e,i,s){switch(t.nextByte()){case 249:{const o=e.frames[i(!1)];t.pos++;const n=t.nextByte();o.GCreserved=(224&n)>>>5,o.disposalMethod=(28&n)>>>2,o.userInputDelayFlag=2==(2&n);const a=1==(1&n);o.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&s(r),t.pos++;break}case 255:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case 254:e.comments.push([i(!1),t.readSubBlocks()]);break;case 1:if(0===e.globalColorTable.length)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()}}(t,e,s,o);break;default:throw new EvalError("undefined block found")}return!1}const xn=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Pn(t){return new Promise((e=>{t.loading=!0;const 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,N().error(`${g} loading image: ${t.source}`),e()})),i.src=t.source}))}async function Cn(t){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i){i||(i=!1);const s=await fetch(t);if(!s.ok&&404===s.status)throw new EvalError("file not found");const o=await s.arrayBuffer(),n={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},a=new _n(new Uint8ClampedArray(o));if("GIF89a"!==a.getString(6))throw new Error("not a supported GIF file");n.width=a.nextTwoBytes(),n.height=a.nextTwoBytes();const r=a.nextByte(),c=128==(128&r);n.colorRes=(112&r)>>>4,n.sortFlag=8==(8&r);const h=1<<1+(7&r),l=a.nextByte();n.pixelAspectRatio=a.nextByte(),0!==n.pixelAspectRatio&&(n.pixelAspectRatio=(n.pixelAspectRatio+15)/64),c&&(n.globalColorTable=bn(a,h));const d=(()=>{try{return new ImageData(n.width,n.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==d)throw new Error("GIF frame size is to large");const{r:u,g:p,b:g}=n.globalColorTable[l];d.data.set(c?[u,p,g,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);n.backgroundImage=d;let f=-1,y=!0,v=-1;const w=t=>(t&&(y=!0),f),m=t=>(null!=t&&(v=t),v);try{do{y&&(n.frames.push({left:0,top:0,width:0,height:0,disposalMethod:0,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),f++,v=-1,y=!1)}while(!await Sn(a,n,i,w,m,e));n.frames.length--;for(const t of n.frames){if(t.userInputDelayFlag&&0===t.delayTime){n.totalTime=1/0;break}n.totalTime+=t.delayTime}return n}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${f} "${t.message}"`);throw t}}(t.source),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}(t.gifData)??0,0===t.gifLoopCount&&(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await Pn(t)}async function On(t){if("svg"!==t.type)return void await Pn(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(N().error(`${g} Image not found`),t.error=!0),t.loading=!1}function Tn(t,e,i,s){const o=function(t,e,i){const{svgData:s}=t;if(!s)return"";const o=Bt(e,i);if(s.includes("fill"))return s.replace(xn,(()=>o));const n=s.indexOf(">");return`${s.substring(0,n)} fill="${o}"${s.substring(n)}`}(t,i,s.opacity?.value??1),n={color:i,gif:e.gif,data:{...t,svgData:o},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise((e=>{const i=new Blob([o],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,a=s.createObjectURL(i),r=new Image;r.addEventListener("load",(()=>{n.loaded=!0,n.element=r,e(n),s.revokeObjectURL(a)})),r.addEventListener("error",(async()=>{s.revokeObjectURL(a);const i={...t,error:!1,loading:!0};await Pn(i),n.loaded=!0,n.element=i.element,e(n)})),r.src=a}))}class An{constructor(t){this.loadImageShape=async t=>{if(!this._engine.loadImage)throw new Error(`${g} image shape not initialized`);await this._engine.loadImage({gif:t.gif,name:t.name,replaceColor:t.replaceColor??!1,src:t.src})},this._engine=t}addImage(t){this._engine.images||(this._engine.images=[]),this._engine.images.push(t)}draw(t){const{context:e,radius:i,particle:s,opacity:o,delta:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=o,a.gif&&a.gifData){const t=new OffscreenCanvas(a.gifData.width,a.gifData.height),o=t.getContext("2d");if(!o)throw new Error("could not create offscreen canvas context");o.imageSmoothingQuality="low",o.imageSmoothingEnabled=!1,o.clearRect(0,0,t.width,t.height),void 0===s.gifLoopCount&&(s.gifLoopCount=a.gifLoopCount??0);let r=s.gifFrame??0;const c={x:.5*-a.gifData.width,y:.5*-a.gifData.height},h=a.gifData.frames[r];if(void 0===s.gifTime&&(s.gifTime=0),!h.bitmap)return;switch(e.scale(i/a.gifData.width,i/a.gifData.height),h.disposalMethod){case 4:case 5:case 6:case 7:case 0:o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y),o.clearRect(0,0,t.width,t.height);break;case 1:o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y);break;case 2:o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y),o.clearRect(0,0,t.width,t.height),0===a.gifData.globalColorTable.length?o.putImageData(a.gifData.frames[0].image,c.x+h.left,c.y+h.top):o.putImageData(a.gifData.backgroundImage,c.x,c.y);break;case 3:{const i=o.getImageData(0,0,t.width,t.height);o.drawImage(h.bitmap,h.left,h.top),e.drawImage(t,c.x,c.y),o.clearRect(0,0,t.width,t.height),o.putImageData(i,0,0)}}if(s.gifTime+=n.value,s.gifTime>h.delayTime){if(s.gifTime-=h.delayTime,++r>=a.gifData.frames.length){if(--s.gifLoopCount<=0)return;r=0,o.clearRect(0,0,t.width,t.height)}s.gifFrame=r}e.scale(a.gifData.width/i,a.gifData.height/i)}else if(r){const t=a.ratio,s={x:-i,y:-i},o=2*i;e.drawImage(r,s.x,s.y,o,o/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(e.preload&&this._engine.loadImage)for(const t of e.preload)await this._engine.loadImage(t)}loadShape(t){if("image"!==t.shape&&"images"!==t.shape)return;this._engine.images||(this._engine.images=[]);const e=t.shapeData;if(!e)return;this._engine.images.find((t=>t.name===e.name||t.source===e.src))||this.loadImageShape(e).then((()=>{this.loadShape(t)}))}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;this._engine.images||(this._engine.images=[]);const i=this._engine.images,s=e.shapeData;if(!s)return;const o=e.getFillColor(),n=i.find((t=>t.name===s.name||t.source===s.src));if(!n)return;const a=s.replaceColor??n.replaceColor;n.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{let t;t=n.svgData&&o?await Tn(n,s,o,e):{color:o,data:n,element:n.element,gif:n.gif,gifData:n.gifData,gifLoopCount:n.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:n.ratio??1,replaceColor:a,source:s.src},t.ratio||(t.ratio=1);const i={image:t,fill:s.fill??e.shapeFill,close:s.close??e.shapeClose};e.image=i.image,e.shapeFill=i.fill,e.shapeClose=i.close})()}}class Mn{constructor(){this.src="",this.gif=!1}load(t){t&&(void 0!==t.gif&&(this.gif=t.gif),void 0!==t.height&&(this.height=t.height),void 0!==t.name&&(this.name=t.name),void 0!==t.replaceColor&&(this.replaceColor=t.replaceColor),void 0!==t.src&&(this.src=t.src),void 0!==t.width&&(this.width=t.width))}}class Vn{constructor(t){this.id="imagePreloader",this._engine=t}getPlugin(){return{}}loadOptions(t,e){if(!e||!e.preload)return;t.preload||(t.preload=[]);const i=t.preload;for(const t of e.preload){const e=i.find((e=>e.name===t.name||e.src===t.src));if(e)e.load(t);else{const e=new Mn;e.load(t),i.push(e)}}}needsPlugin(){return!0}}async function Gn(t,e=!0){!function(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${g} no image source provided`);if(t.images||(t.images=[]),!t.images.find((t=>t.name===e.name||t.source===e.src)))try{const i={gif:e.gif??!1,name:e.name??e.src,source:e.src,type:e.src.substring(e.src.length-3),error:!1,loading:!0,replaceColor:e.replaceColor,ratio:e.width&&e.height?e.width/e.height:void 0};t.images.push(i);const s=e.gif?Cn:e.replaceColor?On:Pn;await s(i)}catch{throw new Error(`${g} ${e.name??e.src} not found`)}})}(t);const i=new Vn(t);await t.addPlugin(i,e),await t.addShape(["image","images"],new An(t),e)}class En extends Ee{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class zn extends Ee{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Rn{constructor(){this.count=0,this.delay=new En,this.duration=new zn}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class kn{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?O(i.delay.value)*(i.delay.sync?1:S())/e.retina.reduceFactor*1e3:0,delayTime:0,duration:e.retina.reduceFactor?O(i.duration.value)*(i.duration.sync?1:S())/e.retina.reduceFactor*1e3:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.life&&(t.spawning=t.life.delay>0))}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.life||(t.life=new Rn);for(const i of e)t.life.load(i?.life)}update(t,e){if(!this.isEnabled(t)||!t.life)return;const i=t.life;let s=!1;if(t.spawning){if(i.delayTime+=e.value,!(i.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,i.delayTime=0,i.time=0}if(-1===i.duration)return;if(t.spawning)return;if(s?i.time=0:i.time+=e.value,i.time<i.duration)return;if(i.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=this.container.canvas.size,n=M(0,o.width),a=M(0,o.width);t.position.x=C(n),t.position.y=C(a),t.spawning=!0,i.delayTime=0,i.time=0,t.reset();const r=t.options.life;r&&(i.delay=1e3*O(r.delay.value),i.duration=1e3*O(r.duration.value))}}class In{draw(t){const{context:e,particle:i,radius:s}=t,o=i.shapeData;e.moveTo(-s/2,0),e.lineTo(s/2,0),e.lineCap=o?.cap??"butt"}getSidesCount(){return 1}}class Ln{init(){}isEnabled(t){return!q()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions.interactivity.events.onHover.parallax;if(q()||!i.enable)return;const s=i.force,o=e.interactivity.mouse.position;if(!o)return;const n=e.canvas.size,a=.5*n.width,r=.5*n.height,c=i.smooth,h=t.getRadius()/s,l=(o.x-a)*h,d=(o.y-r)*h,{offset:u}=t;u.x+=(l-u.x)/c,u.y+=(d-u.y)/c}}class Dn extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=O(t.options.move.attract.distance)*e.retina.pixelRatio);const i=t.attractDistance,s=t.getPosition(),o=e.particles.quadTree.queryCircle(s,i);for(const e of o){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:o,dy:n}=V(s,i),a=t.options.move.attract.rotate,r=o/(1e3*a.x),c=n/(1e3*a.y),h=e.size.value/t.size.value,l=1/h;t.velocity.x-=r*h,t.velocity.y-=c*h,e.velocity.x+=r*l,e.velocity.y+=c*l}}isEnabled(t){return t.options.move.attract.enable}reset(){}}function Hn(t,e,i,s,o,n){const a=x(t.options.collisions.absorb.speed*o.factor/10,0,s);t.size.value+=a/2,i.size.value-=a,s<=n&&(i.size.value=0,i.destroy())}const Bn=t=>{void 0===t.collisionMaxSpeed&&(t.collisionMaxSpeed=O(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function Fn(t,e){ht(ct(t),ct(e)),Bn(t),Bn(e)}function Un(t,e,i,s){switch(t.options.collisions.mode){case"absorb":!function(t,e,i,s){const o=t.getRadius(),n=e.getRadius();void 0===o&&void 0!==n?t.destroy():void 0!==o&&void 0===n?e.destroy():void 0!==o&&void 0!==n&&(o>=n?Hn(t,0,e,n,i,s):Hn(e,0,t,o,i,s))}(t,e,i,s);break;case"bounce":Fn(t,e);break;case"destroy":!function(t,e){t.unbreakable||e.unbreakable||Fn(t,e),void 0===t.getRadius()&&void 0!==e.getRadius()?t.destroy():void 0!==t.getRadius()&&void 0===e.getRadius()?e.destroy():void 0!==t.getRadius()&&void 0!==e.getRadius()&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class Nn extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t,e){if(t.destroyed||t.spawning)return;const i=this.container,s=t.getPosition(),o=t.getRadius(),n=i.particles.quadTree.queryCircle(s,2*o);for(const a of n){if(t===a||!a.options.collisions.enable||t.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const n=a.getPosition(),r=a.getRadius();if(Math.abs(Math.round(s.z)-Math.round(n.z))>o+r)continue;G(s,n)>o+r||Un(t,a,e,i.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class $n extends yi{constructor(t,e,i,s){super(t,e,i),this.canvasSize=s,this.canvasSize={...s}}contains(t){const{width:e,height:i}=this.canvasSize,{x:s,y:o}=t;return super.contains(t)||super.contains({x:s-e,y:o})||super.contains({x:s-e,y:o-i})||super.contains({x:s,y:o-i})}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new yi(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new fi(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class qn{constructor(){this.blur=5,this.color=new ce,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=ce.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class jn{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Qn{constructor(){this.blink=!1,this.color=new ce,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new qn,this.triangles=new jn,this.width=1,this.warp=!1}load(t){t&&(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=ce.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}function Wn(t,e,i,s,o){const{dx:n,dy:a,distance:r}=V(t,e);if(!o||r<=i)return r;const c={x:Math.abs(n),y:Math.abs(a)},h=Math.min(c.x,s.width-c.x),l=Math.min(c.y,s.height-c.y);return Math.sqrt(h**2+l**2)}class Zn extends Vi{constructor(t){super(t),this._setColor=t=>{if(!t.options.links)return;const e=this.linkContainer,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);if(s)return;s=Nt(i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s)},this.linkContainer=t}clear(){}init(){this.linkContainer.particles.linksColor=void 0,this.linkContainer.particles.linksColors=new Map}async interact(t){if(!t.options.links)return;t.links=[];const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<0||e.y<0||e.x>s.width||e.y>s.height)return;const o=t.options.links,n=o.opacity,a=t.retina.linksDistance??0,r=o.warp,c=r?new $n(e.x,e.y,a,s):new yi(e.x,e.y,a),h=i.particles.quadTree.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||o.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some((t=>t.destination===i))||i.links.some((e=>e.destination===t)))continue;const h=i.getPosition();if(h.x<0||h.y<0||h.x>s.width||h.y>s.height)continue;const l=Wn(e,h,a,s,r&&c.warp);if(l>a)continue;const d=(1-l/a)*n;this._setColor(t),t.links.push({destination:i,opacity:d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links||(t.links=new Qn);for(const i of e)t.links.load(i?.links)}reset(){}}function Xn(t,e){const i=((s=t.map((t=>t.id))).sort(((t,e)=>t-e)),s.join("_"));var s;let o=e.get(i);return void 0===o&&(o=S(),e.set(i,o)),o}class Yn{constructor(t){this.container=t,this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const s=this.container,o=s.actualOptions,n=e.destination,a=t.getPosition(),r=n.getPosition();let c=e.opacity;s.canvas.draw((e=>{let h;const l=t.options.twinkle?.lines;if(l?.enable){const t=l.frequency,e=Mt(l.color);S()<t&&e&&(h=e,c=O(l.opacity))}if(!h){const e=void 0!==i.id?s.particles.linksColors.get(i.id):s.particles.linksColor;h=Ut(t,n,e)}if(!h)return;const d=t.retina.linksWidth??0,u=t.retina.linksDistance??0,{backgroundMask:p}=o;!function(t){let e=!1;const{begin:i,end:s,maxDistance:o,context:n,canvasSize:a,width:r,backgroundMask:c,colorLine:h,opacity:l,links:d}=t;if(G(i,s)<=o)Qt(n,i,s),e=!0;else if(d.warp){let t,r;const c=V(i,{x:s.x-a.width,y:s.y});if(c.distance<=o){const e=i.y-c.dy/c.dx*i.x;t={x:0,y:e},r={x:a.width,y:e}}else{const e=V(i,{x:s.x,y:s.y-a.height});if(e.distance<=o){const s=-(i.y-e.dy/e.dx*i.x)/(e.dy/e.dx);t={x:s,y:0},r={x:s,y:a.height}}else{const e=V(i,{x:s.x-a.width,y:s.y-a.height});if(e.distance<=o){const s=i.y-e.dy/e.dx*i.x;t={x:-s/(e.dy/e.dx),y:s},r={x:t.x+a.width,y:t.y+a.height}}}}t&&r&&(Qt(n,i,t),Qt(n,s,r),e=!0)}if(!e)return;n.lineWidth=r,c.enable&&(n.globalCompositeOperation=c.composite),n.strokeStyle=Ht(h,l);const{shadow:u}=d;if(u.enable){const t=Mt(u.color);t&&(n.shadowBlur=u.blur,n.shadowColor=Ht(t))}n.stroke()}({context:e,width:d,begin:a,end:r,maxDistance:u,canvasSize:s.canvas.size,links:i,backgroundMask:p,colorLine:h,opacity:c})}))},this._drawLinkTriangle=(t,e,i)=>{const s=t.options.links;if(!s?.enable)return;const o=s.triangles;if(!o.enable)return;const n=this.container,a=n.actualOptions,r=e.destination,c=i.destination,h=o.opacity??(e.opacity+i.opacity)/2;h<=0||n.canvas.draw((e=>{const i=t.getPosition(),l=r.getPosition(),d=c.getPosition(),u=t.retina.linksDistance??0;if(G(i,l)>u||G(d,l)>u||G(d,i)>u)return;let p=Mt(o.color);if(!p){const e=void 0!==s.id?n.particles.linksColors.get(s.id):n.particles.linksColor;p=Ut(t,r,e)}p&&function(t){const{context:e,pos1:i,pos2:s,pos3:o,backgroundMask:n,colorTriangle:a,opacityTriangle:r}=t;!function(t,e,i,s){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(s.x,s.y),t.closePath()}(e,i,s,o),n.enable&&(e.globalCompositeOperation=n.composite),e.fillStyle=Ht(a,r),e.fill()}({context:e,pos1:i,pos2:l,pos3:d,backgroundMask:a.backgroundMask,colorTriangle:p,opacityTriangle:h})}))},this._drawTriangles=(t,e,i,s)=>{const o=i.destination;if(!t.links?.triangles.enable||!o.options.links?.triangles.enable)return;const n=o.links?.filter((t=>{const e=this._getLinkFrequency(o,t.destination);return o.options.links&&e<=o.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(n?.length)for(const s of n){const n=s.destination;this._getTriangleFrequency(e,o,n)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>Xn([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>Xn([t,e,i],this._freqs.triangles),this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i||i.length<=0)return;const o=i.filter((t=>s.links&&this._getLinkFrequency(e,t.destination)<=s.links.frequency));for(const t of o)this._drawTriangles(s,e,t,o),t.opacity>0&&(e.retina.linksWidth??0)>0&&this._drawLinkLine(e,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map}particleCreated(t){if(t.links=[],!t.options.links)return;const e=this.container.retina.pixelRatio,{retina:i}=t,{distance:s,width:o}=t.options.links;i.linksDistance=s*e,i.linksWidth=o*e}particleDestroyed(t){t.links=[]}}class Jn{constructor(){this.id="links"}getPlugin(t){return new Yn(t)}loadOptions(){}needsPlugin(){return!0}}async function Kn(t,e=!0){await async function(t,e=!0){await t.addInteractor("particlesLinks",(t=>new Zn(t)),e)}(t,e),await async function(t,e=!0){const i=new Jn;await t.addPlugin(i,e)}(t,e)}class ta{draw(t){const{context:e,particle:i,radius:s}=t,o=this.getCenter(i,s),n=this.getSidesData(i,s),a=n.count.numerator*n.count.denominator,r=n.count.numerator/n.count.denominator,c=180*(r-2)/r,h=Math.PI-Math.PI*c/180;if(e){e.beginPath(),e.translate(o.x,o.y),e.moveTo(0,0);for(let t=0;t<a;t++)e.lineTo(n.length,0),e.translate(n.length,0),e.rotate(h)}}getSidesCount(t){const e=t.shapeData;return Math.round(O(e?.sides??5))}}class ea extends ta{getCenter(t,e){return{x:-e/(t.sides/3.5),y:-e/.76}}getSidesData(t,e){const i=t.sides;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class ia extends ta{getCenter(t,e){return{x:-e,y:e/1.66}}getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:2,numerator:3},length:2*e}}}async function sa(t,e=!0){await async function(t,e=!0){await t.addShape("polygon",new ea,e)}(t,e),await async function(t,e=!0){await t.addShape("triangle",new ia,e)}(t,e)}class oa{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class na extends Ee{constructor(){super(),this.animation=new oa,this.direction="clockwise",this.path=!1,this.value=0}load(t){t&&(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class aa{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:O(e.value)*Math.PI/180},t.pathRotation=e.path;let i=e.direction;if("random"===i){i=Math.floor(2*S())>0?"counter-clockwise":"clockwise"}switch(i){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const s=e.animation;s.enable&&(t.rotate.decay=1-O(s.decay),t.rotate.velocity=O(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=S())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&e.animation.enable&&!e.path)}loadOptions(t,...e){t.rotate||(t.rotate=new na);for(const i of e)t.rotate.load(i?.rotate)}update(t,e){this.isEnabled(t)&&(!function(t,e){const i=t.rotate,s=t.options.rotate;if(!i||!s)return;const o=s.animation,n=(i.velocity??0)*e.factor,a=2*Math.PI,r=i.decay??1;o.enable&&("increasing"===i.status?(i.value+=n,i.value>a&&(i.value-=a)):(i.value-=n,i.value<0&&(i.value+=a)),i.velocity&&1!==r&&(i.velocity*=r))}(t,e),t.rotation=t.rotate?.value??0)}}const ra=Math.sqrt(2);class ca{draw(t){const{context:e,radius:i}=t,s=i/ra,o=2*s;e.rect(-s,-s,o,o)}getSidesCount(){return 4}}class ha{draw(t){const{context:e,particle:i,radius:s}=t,o=i.sides,n=i.starInset??2;e.moveTo(0,0-s);for(let t=0;t<o;t++)e.rotate(Math.PI/o),e.lineTo(0,0-s*n),e.rotate(Math.PI/o),e.lineTo(0,0-s)}getSidesCount(t){const e=t.shapeData;return Math.round(O(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=O(i?.inset??2)}}function la(t,e,i,s,o){if(!e||!i.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=t.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=C(i.offset),a=(e.velocity??0)*t.factor+3.6*n,r=e.decay??1;o&&"increasing"!==e.status?(e.value-=a,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status="increasing",e.value+=e.value)):(e.value+=a,e.value>s&&(e.loops||(e.loops=0),e.loops++,o&&(e.status="decreasing",e.value-=e.value%s))),e.velocity&&1!==r&&(e.velocity*=r),e.value>s&&(e.value%=s)}class da{constructor(t){this.container=t}init(t){const e=this.container,i=t.options,s=ut(i.stroke,t.id,i.reduceDuplicates);t.strokeWidth=O(s.width)*e.retina.pixelRatio,t.strokeOpacity=O(s.opacity??1),t.strokeAnimation=s.color?.animation;const o=Et(s.color)??t.getFillColor();o&&(t.strokeColor=qt(o,t.strokeAnimation,e.retina.reduceFactor))}isEnabled(t){const e=t.strokeAnimation,{strokeColor:i}=t;return!t.destroyed&&!t.spawning&&!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable)}update(t,e){this.isEnabled(t)&&function(t,e){if(!t.strokeColor||!t.strokeAnimation)return;const{h:i,s,l:o}=t.strokeColor,{h:n,s:a,l:r}=t.strokeAnimation;i&&la(e,i,n,360,!1),s&&la(e,s,a,100,!0),o&&la(e,o,r,100,!0)}(t,e)}}async function ua(t,e=!0){await async function(t,e=!0){await t.addMover("parallax",(()=>new Ln),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalAttract",(e=>new Bo(t,e)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBounce",(t=>new No(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBubble",(t=>new Zo(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalConnect",(t=>new tn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalGrab",(t=>new nn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPause",(t=>new an(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPush",(t=>new cn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRemove",(t=>new ln(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRepulse",(e=>new fn(t,e)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalSlow",(t=>new vn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesAttract",(t=>new Dn(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesCollisions",(t=>new Nn(t)),e)}(t,!1),await Kn(t,!1),await async function(){m("ease-in-quad",(t=>t**2)),m("ease-out-quad",(t=>1-(1-t)**2)),m("ease-in-out-quad",(t=>t<.5?2*t**2:1-(-2*t+2)**2/2))}(),await async function(t,e=!0){await t.addShape(ko,new Lo,e)}(t,!1),await Gn(t,!1),await async function(t,e=!0){await t.addShape("line",new In,e)}(t,!1),await sa(t,!1),await async function(t,e=!0){await t.addShape(["edge","square"],new ca,e)}(t,!1),await async function(t,e=!0){await t.addShape("star",new ha,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("life",(t=>new kn(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("rotate",(t=>new aa(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("strokeColor",(t=>new da(t)),e)}(t,!1),await Ro(t,e)}const pa=["text","character","char","multiline-text"];class ga{constructor(){this._drawLine=(t,e,i,s,o,n)=>{const a={x:-(e.length*i/2),y:i/2},r=2*i;n?t.fillText(e,a.x,a.y+r*o):t.strokeText(e,a.x,a.y+r*o)}}draw(t){const{context:e,particle:i,radius:s,opacity:o}=t,n=i.shapeData;if(!n)return;const a=n.value;if(void 0===a)return;void 0===i.text&&(i.text=ut(a,i.randomIndexData));const r=i.text,c=n.style??"",h=n.weight??"400",l=2*Math.round(s),d=n.font??"Verdana",u=i.shapeFill,p=r?.split("\n");if(p){e.font=`${c} ${h} ${l}px "${d}"`,e.globalAlpha=o;for(let t=0;t<p.length;t++)this._drawLine(e,p[t],s,o,t,u);e.globalAlpha=1}}async init(t){const e=t.actualOptions;if(pa.find((t=>X(t,e.particles.shape.type)))){const t=pa.map((t=>e.particles.shape.options[t])).find((t=>!!t)),i=[];dt(t,(t=>{i.push(Y(t.font,t.weight))})),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!pa.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;void 0!==s&&(e.text=ut(s,e.randomIndexData))}}class fa{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class ya extends Ee{constructor(){super(),this.animation=new fa,this.direction="clockwise",this.enable=!1,this.value=0}load(t){super.load(t),t&&(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}class va{constructor(t){this.container=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(t){const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:O(e.value)*Math.PI/180,sinDirection:S()>=.5?1:-1,cosDirection:S()>=.5?1:-1};let i=e.direction;if("random"===i){i=Math.floor(2*S())>0?"counter-clockwise":"clockwise"}switch(i){case"counter-clockwise":case"counterClockwise":t.tilt.status="decreasing";break;case"clockwise":t.tilt.status="increasing"}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-O(s.decay),t.tilt.velocity=O(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.tilt.velocity*=S()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt||(t.tilt=new ya);for(const i of e)t.tilt.load(i?.tilt)}update(t,e){this.isEnabled(t)&&function(t,e){if(!t.tilt||!t.options.tilt)return;const i=t.options.tilt.animation,s=(t.tilt.velocity??0)*e.factor,o=2*Math.PI,n=t.tilt.decay??1;i.enable&&("increasing"===t.tilt.status?(t.tilt.value+=s,t.tilt.value>o&&(t.tilt.value-=o)):(t.tilt.value-=s,t.tilt.value<0&&(t.tilt.value+=o)),t.tilt.velocity&&1!==n&&(t.tilt.velocity*=n))}(t,e)}}class wa{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=M(t.opacity)))}}class ma{constructor(){this.lines=new wa,this.particles=new wa}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class _a{getColorStyles(t,e,i,s){const o=t.options.twinkle;if(!o)return{};const n=o.particles,a=n.enable&&S()<n.frequency,r=t.options.zIndex,c=(1-t.zIndexFactor)**r.opacityRate,h=a?O(n.opacity)*c:s,l=Et(n.color),d=l?Bt(l,h):void 0,u={},p=a&&d;return u.fill=p?d:void 0,u.stroke=p?d:void 0,u}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){t.twinkle||(t.twinkle=new ma);for(const i of e)t.twinkle.load(i?.twinkle)}update(){}}class ba{constructor(){this.angle=50,this.move=10}load(t){t&&(void 0!==t.angle&&(this.angle=M(t.angle)),void 0!==t.move&&(this.move=M(t.move)))}}class Sa{constructor(){this.distance=5,this.enable=!1,this.speed=new ba}load(t){if(t&&(void 0!==t.distance&&(this.distance=M(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(_t(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;void 0!==e.min?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class xa{constructor(t){this.container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:S()*Math.PI*2,angleSpeed:O(e.speed.angle)/360,moveSpeed:O(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=O(e?.distance??0)*this.container.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){t.wobble||(t.wobble=new Sa);for(const i of e)t.wobble.load(i?.wobble)}update(t,e){this.isEnabled(t)&&function(t,e){const{wobble:i}=t.options,{wobble:s}=t;if(!i?.enable||!s)return;const o=s.angleSpeed*e.factor,n=s.moveSpeed*e.factor*((t.retina.wobbleDistance??0)*e.factor)/(1e3/60),a=2*Math.PI,{position:r}=t;s.angle+=o,s.angle>a&&(s.angle-=a),r.x+=n*Math.cos(s.angle),r.y+=n*Math.abs(Math.sin(s.angle))}(t,e)}}async function Pa(t,e=!0){await async function(t,e=!0){await t.addParticleUpdater("destroy",(e=>new ho(t,e)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("roll",(()=>new bo),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("tilt",(t=>new va(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("twinkle",(()=>new _a),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("wobble",(t=>new xa(t)),e)}(t,!1),await async function(t,e=!0){await t.addShape(pa,new ga,e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalTrail",(t=>new wo(t)),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new io,e)}(t,!1),await async function(t,e=!0){t.emitterShapeManager||(t.emitterShapeManager=new xs(t)),t.addEmitterShapeGenerator||(t.addEmitterShapeGenerator=(e,i)=>{t.emitterShapeManager?.addShapeGenerator(e,i)});const i=new Cs(t);await t.addPlugin(i,e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("circle",new uo),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("square",new fo),await i.refresh(e)}(t,!1),await ua(t,e)}class Ca{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1,this.startValue="random"}load(t){t&&(void 0!==t.count&&(this.count=M(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.delay&&(this.delay=M(t.delay)))}}class Oa{constructor(){this.value=0,this.animation=new Ca}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=M(t.value)))}}class Ta{constructor(){this.stop=0,this.value=new Me}load(t){t&&(void 0!==t.stop&&(this.stop=t.stop),this.value=Me.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new Oa,_t(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Aa{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=M(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=M(t.speed)),void 0!==t.decay&&(this.decay=M(t.decay)),void 0!==t.delay&&(this.delay=M(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ma{constructor(){this.value=0,this.animation=new Aa,this.direction="clockwise"}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=M(t.value)),void 0!==t.direction&&(this.direction=t.direction))}}class Va{constructor(){this.angle=new Ma,this.colors=[],this.type="random"}load(t){t&&(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new Ta;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}function Ga(t,e){if(!e.enable)return;const i=e.decay??1;switch(e.status){case"increasing":e.value>=e.max?e.status="decreasing":e.value+=(e.velocity??0)*t.factor;break;case"decreasing":e.value<=e.min?e.status="increasing":e.value-=(e.velocity??0)*t.factor}e.velocity&&1!==i&&(e.velocity*=i)}function Ea(t,e,i,s){if(!e||!e.enable)return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=t.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=(e.velocity??0)*t.factor,n=e.decay??1;s&&"increasing"!==e.status?(e.value-=o,e.value<0&&(e.status="increasing",e.value+=e.value)):(e.value+=o,s&&e.value>i&&(e.status="decreasing",e.value-=e.value%i)),e.value>i&&(e.value%=i),e.velocity&&1!==n&&(e.velocity*=n)}function za(t,e){const{gradient:i}=t;if(i){!function(t,e){const i=(e.velocity??0)*t.factor,s=2*Math.PI,o=e.decay??1;e.enable&&("increasing"===e.status?(e.value+=i,e.value>s&&(e.value-=s)):(e.value-=i,e.value<0&&(e.value+=s)),e.velocity&&1!==o&&(e.velocity*=o))}(e,i.angle);for(const s of i.colors)void 0!==t.color?.h&&Ea(e,s.value.h,360,!1),void 0!==t.color?.s&&Ea(e,s.value.s,100,!0),void 0!==t.color?.l&&Ea(e,s.value.l,100,!0),s.opacity&&Ga(e,s.opacity)}}class Ra{getColorStyles(t,e,i,s){const o=t.gradient;if(!o)return{};const n=o.angle.value,a="radial"===o.type?e.createRadialGradient(0,0,0,0,0,i):e.createLinearGradient(Math.cos(n)*-i,Math.sin(n)*-i,Math.cos(n)*i,Math.sin(n)*i);for(const{stop:t,value:e,opacity:i}of o.colors)a.addColorStop(t,Bt({h:e.h.value,s:e.s.value,l:e.l.value},i?.value??s));return{fill:a}}init(t){const e=ut(t.options.gradient);if(!e)return;const{angle:i}=e;t.gradient={angle:{value:O(i.value),enable:i.animation.enable,velocity:O(i.animation.speed)/360*t.container.retina.reduceFactor,decay:1-O(i.animation.decay),delayTime:1e3*O(i.animation.delay),time:0},type:e.type,colors:[]};let s=e.angle.direction;switch("random"===s&&(s=S()>.5?"counter-clockwise":"clockwise"),s){case"counter-clockwise":case"counterClockwise":t.gradient.angle.status="decreasing";break;case"clockwise":t.gradient.angle.status="increasing"}const o=t.options.reduceDuplicates;for(const i of e.colors){const e=Et(i.value,t.id,o);if(!e)continue;const s=qt(e,i.value.animation,t.container.retina.reduceFactor),n={stop:i.stop,value:s,opacity:i.opacity?{enable:i.opacity.animation.enable,max:A(i.opacity.value),min:T(i.opacity.value),status:"increasing",value:O(i.opacity.value),velocity:O(i.opacity.animation.speed)/100*t.container.retina.reduceFactor,decay:1-O(i.opacity.animation.decay),delayTime:1e3*O(i.opacity.animation.delay),time:0}:void 0},{opacity:a}=n;if(i.opacity&&a){const t=i.opacity.value;a.min=T(t),a.max=A(t);switch(i.opacity.animation.startValue){case"min":a.value=a.min,a.status="increasing";break;case"max":a.value=a.max,a.status="decreasing";break;default:a.value=C(a),a.status=S()>=.5?"increasing":"decreasing"}}t.gradient.colors.push(n)}}isEnabled(t){return!t.destroyed&&!t.spawning&&(t.gradient?.angle.enable||(t.gradient?.colors.some((t=>t.value.h.enable||t.value.s.enable||t.value.l.enable))??!1))}loadOptions(t,...e){for(const i of e){if(!i?.gradient)continue;const e=i.gradient;e&&(t.gradient=dt(e,(t=>{const e=new Va;return e.load(t),e})))}}update(t,e){za(t,e)}}class ka{draw(t){const{context:e,radius:i}=t,s=2*i,o=.5*i,n=i+o,a=-i,r=-i;e.moveTo(a,r+i/2),e.quadraticCurveTo(a,r,a+o,r),e.quadraticCurveTo(a+i,r,a+i,r+o),e.quadraticCurveTo(a+i,r,a+n,r),e.quadraticCurveTo(a+s,r,a+s,r+o),e.quadraticCurveTo(a+s,r+i,a+n,r+n),e.lineTo(a+i,r+s),e.lineTo(a+o,r+n),e.quadraticCurveTo(a,r+i,a,r+o)}}function Ia(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/100,o=t.v/100,n=o*s,a=n*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:n,g:a,b:0}:i>1&&i<=2?r={r:a,g:n,b:0}:i>2&&i<=3?r={r:0,g:n,b:a}:i>3&&i<=4?r={r:0,g:a,b:n}:i>4&&i<=5?r={r:a,g:0,b:n}:i>5&&i<=6&&(r={r:n,g:0,b:a}),r){const t=o-n;e.r=Math.floor(255*(r.r+t)),e.g=Math.floor(255*(r.g+t)),e.b=Math.floor(255*(r.b+t))}return e}class La{constructor(){this.key="hsv",this.stringPrefix="hsv"}handleColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Ia(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Ia({h:O(e.h),s:O(e.s),v:O(e.v)})}parseString(t){if(!t.startsWith("hsv"))return;const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?{a:(i={a:e.length>4?B(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}).a,...Ia(i)}:void 0;var i}}async function Da(){Tt(new La)}class Ha{constructor(){this.color=new ce,this.color.value="#ff0000",this.radius=0,this.rate=1}load(t){void 0!==t&&(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),this.duration=t.duration,this.infectedStage=t.infectedStage,void 0!==t.radius&&(this.radius=t.radius),void 0!==t.rate&&(this.rate=t.rate))}}class Ba{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){void 0!==t&&(void 0!==t.cure&&(this.cure=t.cure),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.infections&&(this.infections=t.infections),void 0!==t.stages&&(this.stages=t.stages.map((t=>{const e=new Ha;return e.load(t),e}))))}}class Fa{constructor(t){this._nextInfectionStage=t=>{const e=this._container.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const s=e.stages.length;if(!(s<=0||void 0===i.stage)&&(i.time=0,s<=++i.stage)){if(e.cure)return delete i.stage,void delete i.time;i.stage=0,i.time=0}},this._container=t}startInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;e>i.stages.length||e<0||(s.delay=0,s.delayStage=e)}updateInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;const o=i.stages,n=o.length;if(void 0!==s.delay&&void 0!==s.delayStage){const t=s.delayStage;if(t>n||t<0)return;s.delay>=1e3*i.delay?(s.stage=t,s.time=0,delete s.delay,delete s.delayStage):s.delay+=e}else delete s.delay,delete s.delayStage;if(void 0!==s.stage&&void 0!==s.time){const i=o[s.stage];void 0!==i.duration&&i.duration>=0&&s.time>1e3*i.duration?this._nextInfectionStage(t):s.time+=e}else delete s.stage,delete s.time}updateInfectionStage(t,e){const i=this._container.actualOptions,{infection:s}=t;if(!i.infection||!s)return;e>i.infection.stages.length||e<0||void 0!==s.stage&&s.stage>e||(s.stage=e,s.time=0)}}class Ua{constructor(t){this._container=t,this._container.infecter=new Fa(this._container)}particleFillColor(t){const e=this._container.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,s=e.infection.stages;return void 0!==i?s[i].color:void 0}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this._container.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=K(this._container.particles.filter((t=>{const e=t;return e.infection||(e.infection={}),void 0===e.infection.stage})));this._container.infecter?.startInfection(t,0)}}}class Na extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t,e){const i=this.container.infecter;if(!i)return;if(i.updateInfection(t,e.value),void 0===t.infection?.stage)return;const s=this.container,o=s.actualOptions.infection;if(!o?.enable||o.stages.length<1)return;const n=o.stages[t.infection.stage],a=s.retina.pixelRatio,r=2*t.getRadius()+n.radius*a,c=t.getPosition(),h=n.infectedStage??t.infection.stage,l=s.particles.quadTree.queryCircle(c,r),d=n.rate,u=l.length;for(const e of l){const s=e;if(!(s===t||s.destroyed||s.spawning||void 0!==s.infection?.stage&&s.infection.stage===t.infection.stage||S()>=d/u))if(void 0===s.infection?.stage)i.startInfection(s,h);else if(s.infection.stage<t.infection.stage)i.updateInfectionStage(s,h);else if(s.infection.stage>t.infection.stage){const e=o.stages[s.infection.stage],n=e?.infectedStage??s.infection.stage;i.updateInfectionStage(t,n)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}class $a{constructor(){this.id="infection"}getPlugin(t){return new Ua(t)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.infection;void 0===i?.load&&(t.infection=i=new Ba),i.load(e?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}const qa="light";class ja{constructor(){this.start=new ce,this.stop=new ce,this.start.value="#ffffff",this.stop.value="#000000"}load(t){t&&(this.start=ce.create(this.start,t.start),this.stop=ce.create(this.stop,t.stop))}}class Qa{constructor(){this.gradient=new ja,this.radius=1e3}load(t){t&&(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class Wa{constructor(){this.color=new ce,this.color.value="#000000",this.length=2e3}load(t){t&&(this.color=ce.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class Za{constructor(){this.area=new Qa,this.shadow=new Wa}load(t){t&&(this.area.load(t.area),this.shadow.load(t.shadow))}}class Xa extends Mi{constructor(t){super(t)}clear(){}init(){}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity;if(!e.interactivity.events.onHover.enable||"pointermove"!==i.status)return;const s=i.mouse.position;s&&t.canvas.draw((e=>{!function(t,e,i){const s=t.actualOptions.interactivity.modes.light?.area;if(!s)return;e.beginPath(),e.arc(i.x,i.y,s.radius,0,2*Math.PI);const o=e.createRadialGradient(i.x,i.y,0,i.x,i.y,s.radius),n=t.canvas.mouseLight;n&&n.start&&n.stop&&(o.addColorStop(0,Ht(n.start)),o.addColorStop(1,Ht(n.stop)),e.fillStyle=o,e.fill())}(t,e,s)}))}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=t?.interactivity??e.actualOptions.interactivity,o=s.events;if(!o.onHover.enable||!i.position)return!1;const n=X(qa,o.onHover.mode);if(n&&s.modes.light){const t=s.modes.light.area.gradient;e.canvas.mouseLight={start:Mt(t.start),stop:Mt(t.stop)}}return n}loadModeOptions(t,...e){t.light||(t.light=new Za);for(const i of e)t.light.load(i?.light)}reset(){}}class Ya extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container,i=e.actualOptions,s=e.interactivity;if(!i.interactivity.events.onHover.enable||"pointermove"!==s.status)return;const o=s.mouse.position;o&&e.canvas.draw((i=>{!function(t,e,i,s){const o=i.getPosition(),n=t.actualOptions.interactivity.modes.light?.shadow;if(!n)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,h=2*Math.PI/c,l=-i.rotation+Math.PI/4,d=[];for(let t=0;t<c;t++)d.push({x:o.x+r*Math.sin(l+h*t)*1,y:o.y+r*Math.cos(l+h*t)*1});const u=[],p=n.length;for(const t of d){const e=Math.atan2(s.y-t.y,s.x-t.x),i={x:t.x+p*Math.sin(-e-Math.PI/2),y:t.y+p*Math.cos(-e-Math.PI/2)};u.push({end:i,start:t})}const g=Ht(a);for(let t=u.length-1,i=0;t>=0;i=t--)e.beginPath(),e.moveTo(u[t].start.x,u[t].start.y),e.lineTo(u[i].start.x,u[i].start.y),e.lineTo(u[i].end.x,u[i].end.y),e.lineTo(u[t].end.x,u[t].end.y),e.fillStyle=g,e.fill()}(e,i,t,o)}))}isEnabled(t){const e=this.container,i=t.interactivity??e.actualOptions.interactivity,s=e.interactivity.mouse,o=i.events;if(!o.onHover.enable||!s.position)return!1;const n=X(qa,o.onHover.mode);if(n&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=Mt(e.color)}return n}reset(){}}class Ja{constructor(){this.factor=4,this.value=!0}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class Ka{constructor(){this.disable=!1,this.reduce=new Ja}load(t){t&&(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class tr{constructor(t,e){this._handleMotionChange=t=>{const e=this._container,i=e.actualOptions.motion;i&&(e.retina.reduceFactor=t.matches?i.disable?0:i.reduce.value?1/i.reduce.factor:1:1)},this._container=t,this._engine=e}async init(){const t=this._container,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=Q("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this._handleMotionChange(i);const s=async()=>{this._handleMotionChange(i);try{await t.refresh()}catch{}};void 0!==i.addEventListener?i.addEventListener("change",s):void 0!==i.addListener&&i.addListener(s)}}class er{constructor(t){this.id="motion",this._engine=t}getPlugin(t){return new tr(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin())return;let i=t.motion;i?.load||(t.motion=i=new Ka),i.load(e?.motion)}needsPlugin(){return!0}}class ir extends Ee{constructor(){super(),this.value=45}load(t){void 0!==t&&super.load(t)}}class sr{constructor(){this.animation=new Ce,this.enable=!1,this.opacity=1,this.rotation=new ir,this.width=1}load(t){t&&(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=M(t.opacity)),void 0!==t.width&&(this.width=M(t.width)),void 0!==t.radius&&(this.radius=M(t.radius)),void 0!==t.color&&(this.color=ce.create(this.color,t.color)))}}class or{constructor(t){this.container=t}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,"front")}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,"back")}drawOrbit(t,e){const i=this.container;let s,o;switch(e){case"back":s=Math.PI/2,o=3*Math.PI/2;break;case"front":s=3*Math.PI/2,o=Math.PI/2;break;default:s=0,o=2*Math.PI}i.canvas.draw((e=>{!function(t,e,i,s,o,n,a,r,c){if(n<=0)return;const h=e.getPosition();i&&(t.strokeStyle=Bt(i,o)),t.lineWidth=n;const l=a*Math.PI/180;t.beginPath(),t.ellipse(h.x,h.y,s/2,2*s,l,r,c),t.stroke()}(e,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??i.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*i.retina.pixelRatio,s,o)}))}init(t){const e=this.container,i=t.options.orbit;i?.enable&&(t.orbitRotation=O(i.rotation.value),t.orbitColor=Et(i.color),t.retina.orbitRadius=void 0!==i.radius?O(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?O(i.animation.speed):0,t.orbitWidth=O(i.width),t.orbitOpacity=O(i.opacity))}isEnabled(t){const e=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.orbit||(t.orbit=new sr);for(const i of e)t.orbit.load(i?.orbit)}update(t,e){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/(2*Math.PI))*e.factor)}}class nr extends Ee{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),t&&(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=M(t.distance)),void 0!==t.duration&&(this.duration=M(t.duration)),void 0!==t.factor&&(this.factor=M(t.factor)),void 0!==t.speed&&(this.speed=M(t.speed)))}}class ar extends Vi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container;if(!t.repulse){const i=t.options.repulse;if(!i)return;t.repulse={distance:O(i.distance)*e.retina.pixelRatio,speed:O(i.speed),factor:O(i.factor)}}const i=t.getPosition(),s=e.particles.quadTree.queryCircle(i,t.repulse.distance);for(const e of s){if(t===e||e.destroyed)continue;const s=e.getPosition(),{dx:o,dy:n,distance:a}=V(s,i),r=t.repulse.speed*t.repulse.factor;if(a>0){const i=x((1-Math.pow(a/t.repulse.distance,2))*r,0,r),s=y.create(o/a*i,n/a*i);e.position.addTo(s)}else{const t=y.create(r,r);e.position.addTo(t)}}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){t.repulse||(t.repulse=new nr);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class rr{draw(t){const{context:e,particle:i,radius:s}=t;i.pathData&&function(t,e,i){t.moveTo(i.segments[0].values[0].x*e,i.segments[0].values[0].y*e);for(let s=0;s<i.segments.length;s++){const o=i.segments[s];switch(o.type){case"line":t.lineTo(o.values[0].x*e,o.values[0].y*e);break;case"bezier":t.bezierCurveTo(o.values[1].x*e,o.values[1].y*e,o.values[2].x*e,o.values[2].y*e,o.values[3].x*e,o.values[3].y*e);break;case"quadratic":t.quadraticCurveTo(o.values[1].x*e,o.values[1].y*e,o.values[2].x*e,o.values[2].y*e);break;case"arc":t.arc(o.values[0].x*e,o.values[0].y*e,o.values[1].x*e,o.values[2].x,o.values[2].y);break;case"ellipse":t.ellipse(o.values[0].x*e,o.values[0].y*e,o.values[1].x*e,o.values[1].y*e,o.values[2].x,o.values[3].x,o.values[3].y)}}if(i.half)for(let s=i.segments.length-1;s>=0;s--){const o=i.segments[s];switch(o.type){case"line":t.lineTo(o.values[0].x*-e,o.values[0].y*e);break;case"bezier":t.bezierCurveTo(-o.values[2].x*e,o.values[2].y*e,-o.values[1].x*e,o.values[1].y*e,-o.values[0].x*e,o.values[0].y*e);break;case"quadratic":t.quadraticCurveTo(-o.values[1].x*e,o.values[1].y*e,-o.values[2].x*e,o.values[2].y*e)}}}(e,s,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=st({},i))}}class cr{constructor(t,e,i){this.x=t,this.y=e,this.z=i}dot2(t,e){return this.x*t+this.y*e}dot3(t,e,i){return this.dot2(t,e)+this.z*i}}class hr{constructor(){this._grad3=[new cr(1,1,0),new cr(-1,1,0),new cr(1,-1,0),new cr(-1,-1,0),new cr(1,0,1),new cr(-1,0,1),new cr(1,0,-1),new cr(-1,0,-1),new cr(0,1,1),new cr(0,-1,1),new cr(0,1,-1),new cr(0,-1,-1)],this._p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this._gradP=new Array(512),this._perm=new Array(512)}noise2d(t,e){const{_gradP:i,_perm:s}=this;let o=Math.floor(t),n=Math.floor(e);t-=o,e-=n,o&=255,n&=255;const a=i[o+s[n]].dot2(t,e),r=i[o+s[n+1]].dot2(t,e-1),c=i[o+1+s[n]].dot2(t-1,e),h=i[o+1+s[n+1]].dot2(t-1,e-1),l=this._fade(t);return this._lerp(this._lerp(a,c,l),this._lerp(r,h,l),this._fade(e))}noise3d(t,e,i){const{_gradP:s,_perm:o}=this;let n=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=n,e-=a,i-=r,n&=255,a&=255,r&=255;const c=s[n+o[a+o[r]]].dot3(t,e,i),h=s[n+o[a+o[r+1]]].dot3(t,e,i-1),l=s[n+o[a+1+o[r]]].dot3(t,e-1,i),d=s[n+o[a+1+o[r+1]]].dot3(t,e-1,i-1),u=s[n+1+o[a+o[r]]].dot3(t-1,e,i),p=s[n+1+o[a+o[r+1]]].dot3(t-1,e,i-1),g=s[n+1+o[a+1+o[r]]].dot3(t-1,e-1,i),f=s[n+1+o[a+1+o[r+1]]].dot3(t-1,e-1,i-1),y=this._fade(t),v=this._fade(e),w=this._fade(i);return this._lerp(this._lerp(this._lerp(c,u,y),this._lerp(h,p,y),w),this._lerp(this._lerp(l,g,y),this._lerp(d,f,y),w),v)}seed(t){const{_grad3:e,_gradP:i,_perm:s,_p:o}=this;let n=t;n>0&&n<1&&(n*=65536),n=Math.floor(n),n<256&&(n|=n<<8);for(let t=0;t<256;t++){const a=1&t?o[t]^255&n:o[t]^n>>8&255;s[t]=s[t+256]=a,i[t]=i[t+256]=e[a%12]}}_fade(t){return t*t*t*(t*(6*t-15)+10)}_lerp(t,e,i){return(1-i)*t+i*e}}const lr={draw:!1,size:20,increment:.004,columns:0,rows:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4}};class dr{constructor(){this._calculateField=()=>{const{field:t,noiseGen:e,options:i}=this,s=i.factor.length,o=i.factor.angle;for(let n=0;n<i.columns;n++){const a=t[n];for(let t=0;t<i.rows;t++){const r=a[t];r.length=e.noise3d(n*s+i.offset.x,t*s+i.offset.y,this.noiseZ),r.angle=e.noise3d(n*o,t*o,this.noiseZ)*Math.PI*2}}},this._drawField=t=>{const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const o=e[s];for(let e=0;e<i.rows;e++){const i=o[e],{angle:n,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(n),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*a),t.stroke(),t.setTransform(1,0,0,1,0,0)}}},this._initField=()=>{const{columns:t,rows:e}=this.options;this.field=new Array(t);for(let i=0;i<t;i++){this.field[i]=new Array(e);for(let t=0;t<e;t++)this.field[i][t]=y.origin}},this.noiseGen=new hr,this.field=[],this.noiseZ=0,this.options=st({},lr)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),o=Math.max(Math.floor(e.y/i),0),{field:n}=this;return n&&n[s]&&n[s][o]?n[s][o].copy():y.origin}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseZ+=this.options.increment,this.options.draw&&this.container.canvas.draw((t=>this._drawField(t))))}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options,{options:i}=this;i.size=e.size>0?e.size:lr.size,i.increment=e.increment>0?e.increment:lr.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??lr.offset.x,i.offset.y=s?.y??lr.offset.y;const o=e.factor;i.factor.angle=o?.angle??lr.factor.angle,i.factor.length=o?.length??lr.factor.length,i.width=t.canvas.size.width,i.height=t.canvas.size.height,this.options.seed=e.seed,this.noiseGen.seed(this.options.seed??S()),i.columns=Math.floor(this.options.width/this.options.size)+1,i.rows=Math.floor(this.options.height/this.options.size)+1,this._initField()}_setup(){this.noiseZ=0,this._resetField(),window.addEventListener("resize",(()=>this._resetField()))}}const ur="perlinNoise";!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,s,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,this._y2=a},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,s,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,this._y2=a},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,s,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,s,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=s,this._y2=o},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=s,this._y2=o},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,s,o,n){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,s,o,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,s,o,n){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,s,o,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,s,o,n,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,s,o,n,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,s,o,n,a){return new window.SVGPathSegArcRel(void 0,t,e,i,s,o,n,a)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",i=!0;return t.forEach((function(t){i?(i=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||!t.length)return[];const e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};const s=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};s.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},s.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},s.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},s.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},s.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},s.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},s.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},s.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},s.prototype._parseNumber=function(){let t=0,e=0,i=1,s=0,o=1,n=1;const a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const r=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r){let t=this._currentIndex-1,i=1;for(;t>=r;)e+=i*(this._string.charAt(t--)-"0"),i*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,s+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,n=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let c=e+s;return c*=o,t&&(c*=Math.pow(10,n*t)),a!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),c):void 0},s.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},s.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let i,s=this._pathSegTypeFromChar(t);if(s==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(s=this._nextCommandHelper(t,this._previousCommand),s==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=s,s){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};const o=new i,n=new s(t);if(!n.initialCommandIsMoveTo())return[];for(;n.hasMoreData();){const t=n.parseSegment();if(!t)return[];o.appendSegment(t)}return o.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}();class pr{constructor(){this.color=new ce,this.width=.5,this.opacity=1}load(t){t&&(this.color=ce.create(this.color,t.color),mt(this.color.value)&&(this.opacity=Rt(this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class gr{constructor(){this.enable=!1,this.stroke=new pr}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}class fr{constructor(){this.arrangement="one-per-point"}load(t){t&&void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class yr{constructor(){this.path=[],this.size={height:0,width:0}}load(t){t&&(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}class vr{constructor(){this.radius=10,this.type="path"}load(t){t&&(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}class wr{constructor(){this.draw=new gr,this.enable=!1,this.inline=new fr,this.move=new vr,this.scale=1,this.type="none"}load(t){t&&(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable="none"!==this.type,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&(mt(t.data)?this.data=t.data:(this.data=new yr,this.data.load(t.data))),void 0!==t.position&&(this.position=st({},t.position)))}}function mr(t,e,i){const s=Mt(i.color);if(s){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(const i of e)t.lineTo(i.x,i.y);t.closePath(),t.strokeStyle=Ht(s),t.lineWidth=i.width,t.stroke()}}function _r(t,e,i,s){t.setTransform(1,0,0,1,s.x,s.y);const o=Mt(i.color);o&&(t.strokeStyle=Ht(o,i.opacity),t.lineWidth=i.width,t.stroke(e),t.setTransform(1,0,0,1,0,0))}function br(t,e,i){const{dx:s,dy:o}=V(i,t),{dx:n,dy:a}=V(e,t),r=(s*n+o*a)/(n**2+a**2),c={x:t.x+n*r,y:t.y+a*r,isOnSegment:r>=0&&r<=1};return r<0?(c.x=t.x,c.y=t.y):r>1&&(c.x=e.x,c.y=e.y),c}function Sr(t,e,i){const{dx:s,dy:o}=V(t,e),n=Math.atan2(o,s),a=y.create(Math.sin(n),-Math.cos(n)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}const xr=`${g} No polygon data loaded.`,Pr=`${g} No polygon found, you need to specify SVG url in config.`;class Cr{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,i=e.actualOptions.polygon;if(!i?.enable||"none"===i.type||"inline"===i.type)return!0;if(!this.raw)throw new Error(Pr);const s=e.canvas.size,o=t?.x??S()*s.width,n=t?.y??S()*s.height;let a=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const i=this.raw[t],s=this.raw[e];i.y>n!=s.y>n&&o<(s.x-i.x)*(n-i.y)/(s.y-i.y)+i.x&&(a=!a)}return"inside"===i.type?a:"outside"===i.type&&!a},this._createPath2D=()=>{if(this._container.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element?.getAttribute("d");if(e){const i=new Path2D(e),s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),o=new Path2D,n=s.scale(this._scale);o.addPath?(o.addPath(i,n),t.path2d=o):delete t.path2d}else delete t.path2d;!t.path2d&&this.raw&&(t.path2d=new Path2D,t.path2d.moveTo(this.raw[0].x,this.raw[0].y),this.raw.forEach(((e,i)=>{i>0&&t.path2d?.lineTo(e.x,e.y)})),t.path2d.closePath())}},this._downloadSvgPath=async(t,e)=>{const i=this._container.actualOptions.polygon;if(!i)return;const s=t||i.url,o=e??!1;if(!s||void 0!==this.paths&&!o)return this.raw;const n=await fetch(s);if(!n.ok)throw new Error(`${g} occurred during polygon mask download`);return this._parseSvgPath(await n.text(),e)},this._drawPoints=()=>{if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})},this._getEquidistantPointByIndex=t=>{const e=this._container.actualOptions;if(!e.polygon)return;if(!this.raw||!this.raw.length||!this.paths?.length)throw new Error(xr);let i,s=0;const o=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const n=o*t-s;if(n<=e.length){i=e.element.getPointAtLength(n);break}s+=e.length}const n=this._scale;return{x:(i?.x??0)*n+(this.offset?.x??0),y:(i?.y??0)*n+(this.offset?.y??0)}},this._getPointByIndex=t=>{if(!this.raw||!this.raw.length)throw new Error(xr);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw||!this.raw.length)throw new Error(xr);const t=K(this.raw);return{x:t.x,y:t.y}},this._getRandomPointByLength=()=>{if(!this._container.actualOptions.polygon)return;if(!this.raw||!this.raw.length||!this.paths?.length)throw new Error(xr);const t=K(this.paths),e=Math.floor(S()*t.length)+1,i=t.element.getPointAtLength(e),s=this._scale;return{x:i.x*s+(this.offset?.x||0),y:i.y*s+(this.offset?.y||0)}},this._initRawData=async t=>{const e=this._container.actualOptions.polygon;if(e){if(e.url)this.raw=await this._downloadSvgPath(e.url,t);else if(e.data){const i=e.data;let s;if(mt(i))s=i;else{const t=t=>`<path d="${t}" />`,e=xt(i.path)?i.path.map(t).join(""):t(i.path);s=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${i.size.width}" height="${i.size.height}">${e}</svg>`}this.raw=this._parseSvgPath(s,t)}this._createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}},this._parseSvgPath=(t,e)=>{const i=e??!1;if(void 0!==this.paths&&!i)return this.raw;const s=this._container,o=s.actualOptions.polygon;if(!o)return;const n=(new DOMParser).parseFromString(t,"image/svg+xml"),a=n.getElementsByTagName("svg")[0];let r=a.getElementsByTagName("path");r.length||(r=n.getElementsByTagName("path")),this.paths=[];for(let t=0;t<r.length;t++){const e=r.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const c=this._scale;this.dimension.width=parseFloat(a.getAttribute("width")??"0")*c,this.dimension.height=parseFloat(a.getAttribute("height")??"0")*c;const h=o.position??{x:50,y:50},l=s.canvas.size;return this.offset={x:l.width*h.x/100-this.dimension.width/2,y:l.height*h.y/100-this.dimension.height/2},function(t,e,i){const s=[];for(const o of t){const t=o.element.pathSegList,n=t?.numberOfItems??0,a={x:0,y:0};for(let o=0;o<n;o++){const n=t?.getItem(o),r=window.SVGPathSeg;switch(n?.pathSegType){case r.PATHSEG_MOVETO_ABS:case r.PATHSEG_LINETO_ABS:case r.PATHSEG_CURVETO_CUBIC_ABS:case r.PATHSEG_CURVETO_QUADRATIC_ABS:case r.PATHSEG_ARC_ABS:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=n;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=n.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=n.y;break;case r.PATHSEG_LINETO_REL:case r.PATHSEG_MOVETO_REL:case r.PATHSEG_CURVETO_CUBIC_REL:case r.PATHSEG_CURVETO_QUADRATIC_REL:case r.PATHSEG_ARC_REL:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=n;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=n.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=n.y;break;case r.PATHSEG_UNKNOWN:case r.PATHSEG_CLOSEPATH:continue}s.push({x:a.x*e+i.x,y:a.y*e+i.y})}}return s}(this.paths,c,this.offset)},this._polygonBounce=(t,e,i)=>{const s=this._container.actualOptions.polygon;if(!this.raw||!s?.enable||"top"!==i)return!1;if("inside"===s.type||"outside"===s.type){let e,i,s;const o=t.getPosition(),n=t.getRadius();for(let a=0,r=this.raw.length-1;a<this.raw.length;r=a++){const c=this.raw[a],h=this.raw[r];e=br(c,h,o);const l=V(o,e);if([i,s]=[l.dx,l.dy],l.distance<n)return Sr(c,h,t.velocity),!0}if(e&&void 0!==i&&void 0!==s&&!this._checkInsidePolygon(o)){const i={x:1,y:1},s=2*n;return o.x>=e.x&&(i.x=-1),o.y>=e.y&&(i.y=-1),t.position.x=e.x+s*i.x,t.position.y=e.y+s*i.y,t.velocity.mult(-1),!0}}else if("inline"===s.type&&t.initialPosition){const e=G(t.initialPosition,t.getPosition()),{velocity:i}=t;if(e>this._moveRadius)return i.x=i.y/2-i.x,i.y=i.x/2-i.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let i;if("inline"===e.type)switch(e.inline.arrangement){case"random-point":i=this._getRandomPoint();break;case"random-length":i=this._getRandomPointByLength();break;case"equidistant":i=this._getEquidistantPointByIndex(t.particles.count);break;default:i=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;i={x:S()*e.width,y:S()*e.height}}return this._checkInsidePolygon(i)?i:this._randomPoint()},this._container=t,this._engine=e,this.dimension={height:0,width:0},this._moveRadius=0,this._scale=1}clickPositionValid(t){const e=this._container.actualOptions.polygon;return!!e?.enable&&"none"!==e.type&&"inline"!==e.type&&this._checkInsidePolygon(t)}draw(t){if(!this.paths?.length)return;const e=this._container.actualOptions.polygon;if(!e?.enable)return;const i=e.draw;if(!i.enable)return;const s=this.raw;for(const e of this.paths){const o=e.path2d;t&&(o&&this.offset?_r(t,o,i.stroke,this.offset):s&&mr(t,s,i.stroke))}}async init(){const t=this._container,e=t.actualOptions.polygon,i=t.retina.pixelRatio;e&&(this._moveRadius=e.move.radius*i,this._scale=e.scale*i,e.enable&&await this._initRawData())}particleBounce(t,e,i){return this._polygonBounce(t,e,i)}particlePosition(t){const e=this._container.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return st({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||"inline"!==t.type||"one-per-point"!==t.inline.arrangement&&"per-point"!==t.inline.arrangement)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;e?.enable&&"none"!==e.type&&(this.redrawTimeout&&clearTimeout(this.redrawTimeout),this.redrawTimeout=window.setTimeout((async()=>{await this._initRawData(!0),await t.particles.redraw()}),250))}stop(){delete this.raw,delete this.paths}}class Or{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return new Cr(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.polygon;void 0===i?.load&&(t.polygon=i=new wr),i.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&"none"!==t.polygon.type)}}class Tr{constructor(){this._createDirs=()=>{this.dirsList=[];for(let t=0;t<360;t+=360/this.options.sides){const e=this.options.angle+t;this.dirsList.push(y.create(Math.cos(e*Math.PI/180),Math.sin(e*Math.PI/180)))}},this.dirsList=[],this.options={sides:6,turnSteps:20,angle:30}}generate(t){const{sides:e}=this.options;void 0===t.hexStep&&(t.hexStep=0),void 0===t.hexDirection&&(t.hexDirection=6===e?2*(3*S()|0):S()*e|0),void 0===t.hexSpeed&&(t.hexSpeed=t.velocity.length),t.hexStep%this.options.turnSteps==0&&(t.hexDirection=S()>.5?(t.hexDirection+1)%e:(t.hexDirection+e-1)%e),t.velocity.x=0,t.velocity.y=0,t.hexStep++;const i=this.dirsList[t.hexDirection];return y.create(i.x*t.hexSpeed,i.y*t.hexSpeed)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.sides=e.sides>0?e.sides:6,this.options.angle=e.angle??30,this.options.turnSteps=e.turnSteps>=0?e.turnSteps:20,this._createDirs()}reset(t){delete t.hexStep,delete t.hexDirection,delete t.hexSpeed}update(){}}const Ar="polygonPathGenerator";class Mr{draw(t){const{context:e,particle:i,radius:s}=t;!function(t,e,i){let s=e[0],o=e[1];const n=e.length;t.moveTo((s.x+o.x)/2,(s.y+o.y)/2);for(let a=1;a<=n;a++)s=o,o=e[(a+1)%n],t.arcTo(s.x,s.y,(s.x+o.x)/2,(s.y+o.y)/2,i)}(e,function(t,e,i=0){const s=2*Math.PI/t,o=[];for(let n=0;n<t;n++)o.push({x:Math.cos(n*s+i)*e,y:Math.sin(n*s+i)*e});return o}(i.sides,s),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round(O(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round(O(i?.radius??5))*t.retina.pixelRatio}}const Vr=Math.sqrt(2);class Gr{draw(t){const{context:e,particle:i,radius:s}=t,o=s/Vr,n=2*o,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-o,-o,n,n,a):((t,e,i={topRight:4,bottomRight:4,bottomLeft:4,topLeft:4})=>{const{x:s,y:o,width:n,height:a}=e,r=s+n,c=o+a;t.moveTo(s+i.topLeft,o),t.lineTo(r-i.topRight,o),t.quadraticCurveTo(r,o,r,o+i.topRight),t.lineTo(r,o+a-i.bottomRight),t.quadraticCurveTo(r,c,r-i.bottomRight,c),t.lineTo(s+i.bottomLeft,c),t.quadraticCurveTo(s,c,s,c-i.bottomLeft),t.lineTo(s,o+i.topLeft),t.quadraticCurveTo(s,o,s+i.topLeft,o)})(e,{x:-o,y:-o,height:n,width:n},{topLeft:a,topRight:a,bottomLeft:a,bottomRight:a})}particleInit(t,e){const i=e.shapeData;e.borderRadius=O(i?.radius??5)*t.retina.pixelRatio}}class Er{constructor(){this._paths=[],this._reverse=!1,this._size={width:0,height:0},this._scale=1,this._offset={x:0,y:0,mode:"percent"},this._width=0}generate(t,e){const i=t.container.retina.pixelRatio;void 0===t.svgDirection&&(t.svgDirection=S()>.5?0:1),void 0===t.svgPathIndex&&(t.svgPathIndex=Math.floor(Math.random()*this._paths.length)),void 0===t.svgSpeed&&(t.svgSpeed=t.velocity.mult((t.retina.moveSpeed??1)/2).length),void 0===t.svgStep&&(t.svgStep=C({min:0,max:this._paths[t.svgPathIndex].length})*i),void 0===t.svgOffset&&(t.svgOffset={width:C({min:-this._width/2,max:this._width/2})*i,height:C({min:-this._width/2,max:this._width/2})*i}),void 0===t.svgInitialPosition&&(t.svgInitialPosition={...t.position}),t.velocity.x=0,t.velocity.y=0,0===t.svgDirection?t.svgStep+=t.svgSpeed*e.factor:t.svgStep-=t.svgSpeed*e.factor;let s=this._paths[t.svgPathIndex];if(s){const e=s.length;t.svgStep>=e?(t.svgPathIndex=t.svgPathIndex+1,t.svgPathIndex>=this._paths.length&&(this._reverse?(t.svgPathIndex=this._paths.length-1,t.svgDirection=1):(t.svgPathIndex=0,t.svgStep=0))):t.svgStep<=0&&(t.svgPathIndex=t.svgPathIndex-1,t.svgPathIndex<0&&(this._reverse?(t.svgPathIndex=0,t.svgDirection=0):(t.svgPathIndex=this._paths.length-1,s=this._paths[t.svgPathIndex],t.svgStep=s.length))),s=this._paths[t.svgPathIndex]}if(s){const e=s.element.getPointAtLength(t.svgStep),o=t.container.canvas.size,n=yt(this._offset,o),a=this._scale*i;t.position.x=(e.x-this._size.width/2)*a+t.svgInitialPosition.x+n.x+t.svgOffset.width,t.position.y=(e.y-this._size.height/2)*a+t.svgInitialPosition.y+n.y+t.svgOffset.height}return y.origin}init(t){const e=t.actualOptions.particles.move.path.options,i=e.position??this._offset;if(this._reverse=e.reverse??this._reverse,this._scale=e.scale??1,this._offset.x=i.x,this._offset.y=i.y,this._offset.mode=i.mode,this._width=e.width??0,e.url&&!e.path){const t=e.url;(async()=>{const e=await fetch(t),i=await e.text(),s=(new DOMParser).parseFromString(i,"image/svg+xml"),o=s.getElementsByTagName("svg")[0];let n=o.getElementsByTagName("path");n.length||(n=s.getElementsByTagName("path")),this._paths=[];for(let t=0;t<n.length;t++){const e=n.item(t);e&&this._paths.push({element:e,length:e.getTotalLength()})}this._size.height=parseFloat(o.getAttribute("height")??"0"),this._size.width=parseFloat(o.getAttribute("width")??"0")})()}else if(e.path){const t=e.path;this._paths=[];for(const e of t.data){const t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",e),this._paths.push({element:t,length:t.getTotalLength()})}this._size.height=t.size.height,this._size.width=t.size.width}}reset(){}update(){}}const zr="svgPathGenerator";const Rr={size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,offset:{x:4e4,y:4e4,z:4e4}};class kr{constructor(){const t=new rs;this._simplex=t.noise4d,this.field=[],this.noiseW=0,this.options=st({},Rr)}generate(t){const e=t.getPosition(),i=Math.max(Math.floor(e.x/this.options.size),0),s=Math.max(Math.floor(e.y/this.options.size),0),o=Math.max(Math.floor(e.z/this.options.size),0),n=y.origin;if(!(this.field&&this.field[i]&&this.field[i][s]&&this.field[i][s][o]))return n;const a=this.field[i][s][o];return n.length=a[1],n.angle=a[0],n}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseW+=this.options.increment)}_calculateField(){const t=this.options;for(let e=0;e<t.columns;e++)for(let i=0;i<t.rows;i++)for(let s=0;s<t.layers;s++)this.field[e][i][s][0]=this._simplex.noise(e/50,i/50,s/50,this.noiseW)*Math.PI*2,this.field[e][i][s][1]=this._simplex.noise(e/100+t.offset.x,i/100+t.offset.y,s/100+t.offset.z,this.noiseW)}_initField(){this.field=new Array(this.options.columns);for(let t=0;t<this.options.columns;t++){this.field[t]=new Array(this.options.rows);for(let e=0;e<this.options.rows;e++){this.field[t][e]=new Array(this.options.layers);for(let i=0;i<this.options.layers;i++)this.field[t][e][i]=[0,0]}}}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options;this.options.size=e.size>0?e.size:Rr.size,this.options.increment=e.increment>0?e.increment:Rr.increment,this.options.width=t.canvas.size.width,this.options.height=t.canvas.size.height;const i=e.offset;this.options.offset.x=i?.x??Rr.offset.x,this.options.offset.y=i?.y??Rr.offset.y,this.options.offset.z=i?.z??Rr.offset.z,this.options.seed=e.seed??Rr.seed,this._simplex.seed(this.options.seed??S()),this.options.columns=Math.floor(this.options.width/this.options.size)+1,this.options.rows=Math.floor(this.options.height/this.options.size)+1,this.options.layers=Math.floor(t.zLayers/this.options.size)+1,this._initField()}_setup(){this.noiseW=0,this._resetField(),addEventListener("resize",(()=>this._resetField()))}}const Ir="simplexNoise";class Lr{constructor(){this.loop=!1,this.source=""}load(t){void 0!==t&&(St(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class Dr{constructor(){this.duration=500,this.value=[]}load(t){t&&(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class Hr{constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){void 0!==t&&(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Hr;return e.load(t),e}))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Dr;return e.load(t),e}))))}}class Br{constructor(){this.event=[],this.notes=[]}load(t){t&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(xt(t.audio)?this.audio=t.audio.map((t=>{const e=new Lr;return e.load(t),e})):(this.audio=new Lr,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Dr;return e.load(t),e}))),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Hr;return e.load(t),e}))),void 0!==t.filter&&(mt(t.filter)?bt(window[t.filter])&&(this.filter=window[t.filter]):this.filter=t.filter))}}class Fr{constructor(){this.width=24,this.height=24}load(t){t&&(void 0!==t.path&&(this.path=t.path),void 0!==t.svg&&(this.svg=t.svg),void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height))}}class Ur{constructor(){this.mute=new Fr,this.unmute=new Fr,this.volumeDown=new Fr,this.volumeUp=new Fr,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){t&&(this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class Nr{constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){void 0!==t&&(St(t)?(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.step&&(this.step=t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class $r{constructor(){this.enable=!1,this.events=[],this.icons=new Ur,this.volume=new Nr}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.events&&(this.events=t.events.map((t=>{const e=new Br;return e.load(t),e}))),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const qr=new Map;function jr(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e||!e.length)return;const i=e[2]||e[0],s=qr.get(i);return s?s[parseInt(e[3]||"0")]:void 0}function Qr(t){const e=document.createElement("img"),{clickCb:i,container:s,display:o,iconOptions:n,margin:a,options:r,pos:c,rightOffsets:h}=t,{width:l,path:d,svg:u}=n;!function(t,e,i,s,o,n,a){t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.position="absolute",t.style.top=`${e+a}px`,t.style.left=i-a-n+"px",t.style.display=s,t.style.zIndex=`${o+1}`}(e,c.top+a,c.right-(a*(h.length+1)+l+h.reduce(((t,e)=>t+e),0)),o,r.fullScreen.zIndex+1,l,a),e.src=d??(u?`data:image/svg+xml;base64,${btoa(u)}`:"");return(s.canvas.element?.parentNode||document.body).append(e),e.addEventListener("click",i),e}function Wr(t){t&&t.remove()}qr.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),qr.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),qr.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),qr.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),qr.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),qr.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),qr.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),qr.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),qr.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),qr.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),qr.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),qr.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),qr.set("pause",[0]);class Zr{constructor(t,e){this._addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e},this._addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e},this._initEvents=()=>{const t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(const t of e.events){const e=async i=>{if(this._container===i.container)if(!this._container||this._container.muted||this._container.destroyed)dt(t.event,(t=>{this._engine.removeEventListener(t,e)}));else if(!t.filter||t.filter(i))if(t.audio)this._playBuffer(ut(t.audio));else if(t.melodies){const e=K(t.melodies);e.melodies.length?await Promise.allSettled(e.melodies.map((t=>this._playNote(t.notes,0,e.loop)))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=K(t.notes);await this._playNote([e],0,!1)}};dt(t.event,(t=>{this._engine.addEventListener(t,e)}))}},this._mute=()=>{const t=this._container;if(t.audioContext){for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),t.audioContext.close(),t.audioContext=void 0,this._engine.dispatchEvent("soundsMuted",{container:this._container})}},this._playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const s=this._addBuffer(i);s.loop=t.loop,s.buffer=e,s.connect(this._gain??i.destination),s.start()},this._playFrequency=async(t,e)=>{if(!this._container.audioContext||!this._gain)return;const i=this._addOscillator(this._container.audioContext);return i.connect(this._gain),i.type="sine",i.frequency.value=t,i.start(),new Promise((t=>{setTimeout((()=>{this._removeAudioSource(i),t()}),e)}))},this._playMuteSound=()=>{const t=this._container;if(!t.audioContext)return;const e=t.audioContext.createGain();e.connect(t.audioContext.destination),e.gain.value=0;const i=t.audioContext.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout((()=>{i.stop(),i.disconnect(),e.disconnect()}))},this._playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const o=dt(s.value,(async(i,s)=>this._playNoteValue(t,e,s)));await(xt(o)?Promise.allSettled(o):o);let n=e+1;i&&n>=t.length&&(n%=t.length),this._container.muted||await this._playNote(t,n,i)},this._playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const o=ut(s.value,i,!0);try{const t=jr(o);if(!_t(t))return;await this._playFrequency(t,s.duration)}catch(t){N().error(t)}},this._removeAudioSource=t=>{t.stop(),t.disconnect(),this._audioSources.splice(this._audioSources.indexOf(t),1)},this._unmute=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e)return;t.audioContext||(t.audioContext=new AudioContext);const{audioContext:i}=t;this._audioSources||(this._audioSources=[]);const s=i.createGain();s.connect(i.destination),s.gain.value=e.volume.value/100,this._gain=s,this._initEvents(),this._engine.dispatchEvent("soundsUnmuted",{container:this._container})},this._updateMuteIcons=()=>{const t=this._container,e=this._muteImg,i=this._unmuteImg;e&&(e.style.display=t.muted?"block":"none"),i&&(i.style.display=t.muted?"none":"block")},this._updateMuteStatus=()=>{this._container.muted?this._mute():(this._unmute(),this._playMuteSound())},this._updateVolume=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;x(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/100)},this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;this._volume=e.volume.value;const i=e.events;this._audioMap=new Map;for(const e of i)e.audio&&dt(e.audio,(async e=>{const i=await fetch(e.source);if(!i.ok)return;const s=await i.arrayBuffer();t.audioContext=new AudioContext;const o=await t.audioContext.decodeAudioData(s);this._audioMap.set(e.source,o)}))}async start(){const t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;const s=t.canvas.element,o={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:n,unmute:a,volumeDown:r,volumeUp:c}=i.icons,h=()=>{t.muted=!t.muted,this._updateMuteIcons(),this._updateMuteStatus()};this._muteImg=Qr({container:t,options:e,pos:o,display:"block",iconOptions:n,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._unmuteImg=Qr({container:t,options:e,pos:o,display:"none",iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._volumeDownImg=Qr({container:t,options:e,pos:o,display:"block",iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:()=>{t.muted&&(this._volume=0),this._volume-=i.volume.step,this._updateVolume()}}),this._volumeUpImg=Qr({container:t,options:e,pos:o,display:"block",iconOptions:c,margin:10,rightOffsets:[],clickCb:()=>{t.muted&&(this._volume=0),this._volume+=i.volume.step,this._updateVolume()}})}stop(){this._container.muted=!0,this._mute(),Wr(this._muteImg),Wr(this._unmuteImg),Wr(this._volumeDownImg),Wr(this._volumeUpImg)}}class Xr{constructor(t){this.id="sounds",this._engine=t}getPlugin(t){return new Zr(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.sounds;void 0===i?.load&&(t.sounds=i=new $r),i.load(e?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}class Yr{draw(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.spiralInnerRadius||void 0===i.spiralLineSpacing||void 0===i.spiralWidthFactor)return;const o=(s-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*o;t++){const s=t/10,o=i.spiralInnerRadius+i.spiralLineSpacing*s,n={x:o*Math.cos(s),y:o*Math.sin(s)};e.lineTo(n.x,n.y)}}particleInit(t,e){const i=t.retina.pixelRatio,s=e.shapeData;e.spiralInnerRadius=O(s?.innerRadius??1)*i,e.spiralLineSpacing=O(s?.lineSpacing??1)*i,e.spiralWidthFactor=O(s?.widthFactor??10)}}class Jr{draw(t){const{context:e,radius:i,particle:s}=t,o=2*i,n=s.container.retina.pixelRatio,a=s.getPosition();if(!s.trail||!s.trailLength)return;const r=s.trailLength;if(s.trail.push({color:e.fillStyle??e.strokeStyle,position:{x:a.x,y:a.y}}),s.trail.length<2)return;for(;s.trail.length>r;)s.trail.shift();const c=Math.min(s.trail.length,r),h=a.x,l=a.y,d=s.container.canvas.size.width+o,u=s.container.canvas.size.height+o;let p=s.trail[c-1].position;e.setTransform(1,0,0,1,a.x,a.y);for(let t=c;t>0;t--){const i=s.trail[t-1],a=i.position;e.beginPath(),e.moveTo(p.x-h,p.y-l);const r={x:(p.x+d)%d,y:(p.y+u)%u};if(Math.abs(p.x-a.x)>d/2||Math.abs(p.y-a.y)>u/2){p=a;continue}e.lineTo((Math.abs(p.x-a.x)>d/2?r.x:a.x)-h,(Math.abs(p.y-a.y)>u/2?r.y:a.y)-l);const g=Math.max(t/c*o,n,s.trailMinWidth??-1),f=e.globalAlpha;e.globalAlpha=s.trailFade?t/c:1,e.lineWidth=s.trailMaxWidth?Math.min(g,s.trailMaxWidth):g,e.strokeStyle=i.color,e.stroke(),e.globalAlpha=f,p=a}const{transformData:g}=t;e.setTransform(g.a,g.b,g.c,g.d,a.x,a.y)}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=O(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?O(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?O(i.minWidth)*t.retina.pixelRatio:void 0}}async function Kr(t,e=!0){Ri(t),await Pa(t,!1),await Da(),await async function(){m("ease-in-back",(t=>2.70158*t**3-1.70158*t**2)),m("ease-out-back",(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)})),m("ease-in-out-back",(t=>{const e=2.5949095;return t<.5?(2*t)**2*(7.189819*t-e)/2:((2*t-2)**2*((e+1)*(2*t-2)+e)+2)/2}))}(),await async function(){m("ease-in-circ",(t=>1-Math.sqrt(1-t**2))),m("ease-out-circ",(t=>Math.sqrt(1-(t-1)**2))),m("ease-in-out-circ",(t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2))}(),await async function(){m("ease-in-cubic",(t=>t**3)),m("ease-out-cubic",(t=>1-(1-t)**3)),m("ease-in-out-cubic",(t=>t<.5?4*t**3:1-(-2*t+2)**3/2))}(),await async function(){m("ease-in-expo",(t=>t?2**(10*t-10):0)),m("ease-out-expo",(t=>1===t?1:1-Math.pow(2,-10*t))),m("ease-in-out-expo",(t=>t?1===t?1:t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0))}(),await async function(){m("ease-in-linear",(t=>t)),m("ease-out-linear",(t=>t)),m("ease-in-out-linear",(t=>t))}(),await async function(){m("ease-in-quart",(t=>t**4)),m("ease-out-quart",(t=>1-(1-t)**4)),m("ease-in-out-quart",(t=>t<.5?8*t**4:1-(-2*t+2)**4/2))}(),await async function(){m("ease-in-quint",(t=>t**5)),m("ease-out-quint",(t=>1-(1-t)**5)),m("ease-in-out-quint",(t=>t<.5?16*t**5:1-(-2*t+2)**5/2))}(),await async function(){m("ease-in-sine",(t=>1-Math.cos(t*Math.PI/2))),m("ease-out-sine",(t=>Math.sin(t*Math.PI/2))),m("ease-in-out-sine",(t=>-(Math.cos(Math.PI*t)-1)/2))}(),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("canvas",new zs),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("path",new Is),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator&&i.addEmitterShapeGenerator("polygon",new Fs),await i.refresh(e)}(t,!1),await Da(),await async function(t,e=!0){await t.addPlugin(new Wi(t),e)}(t,!1),await async function(t,e=!0){const i=new $a;await t.addPlugin(i,e),await t.addInteractor("particlesInfection",(t=>new Na(t)),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new er(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Or(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Xr(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Ns(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new qs(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Zs(t),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPop",(t=>new Xs(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalLight",(t=>new Xa(t)),e),await t.addInteractor("particlesLight",(t=>new Ya(t)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesRepulse",(t=>new ar(t)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("gradient",(()=>new Ra),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("orbit",(t=>new or(t)),e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(us,new ds,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(ls,new hs,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(ur,new dr,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Ar,new Tr,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(zr,new Er,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Ir,new kr,e)}(t,!1),await async function(t,e=!0){await t.addEffect("bubble",new Ii,e)}(t,!1),await async function(t,e=!0){await t.addShape("arrow",new ki,e)}(t,!1),await async function(t,e=!0){await t.addShape(["spade","spades"],new Ji,e),await t.addShape(["heart","hearts"],new Ki,e),await t.addShape(["diamond","diamonds"],new ts,e),await t.addShape(["club","clubs"],new es,e)}(t,!1),await async function(t,e=!0){await t.addShape("cog",new is,e)}(t,!1),await async function(t,e=!0){await t.addShape("heart",new ka,e)}(t,!1),await async function(t,e=!0){await t.addShape("path",new rr,e)}(t,!1),await async function(t,e=!0){await t.addShape("rounded-polygon",new Mr,e)}(t,!1),await async function(t,e=!0){await t.addShape("rounded-rect",new Gr,e)}(t,!1),await async function(t,e=!0){await t.addShape("spiral",new Yr,e)}(t,!1),await async function(t,e=!0){await t.addEffect("trail",new Jr,e)}(t,!1),await t.refresh(e)}return Kr(Gi),e})()));
|