tsparticles 4.2.1 → 4.3.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 +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +15 -15
- package/report.html +1 -1
- package/tsparticles.bundle.js +369 -686
- package/tsparticles.bundle.min.js +1 -1
- package/tsparticles.js +2 -2
- package/tsparticles.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.full=t.__tsParticlesInternals.bundles.full||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,b=100,w=.25,x=.75;var P;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class k{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return k.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return k.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new k(t,e??l.y,i??l.z):new k(t.x,t.y,M(t))}add(t){return k.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return k.clone(this)}div(t){return k.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return k.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 k.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return k.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends k{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return C.create(l.x,l.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??l.y):new C(t.x,t.y)}}function D(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function z(t){return"number"==typeof t}function S(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const E=Math.PI/180;let R=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return V(R(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function F(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function H(t){const e=j(t);let i=W(t);return e===i&&(i=0),L(i,e)}function q(t){return z(t)?t:H(t)}function W(t){return z(t)?t:t.min}function j(t){return z(t)?t:t.max}function $(t,e){if(t===e||void 0===e&&z(t))return t;const i=W(t),s=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:$(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function X(t,e){return Math.sqrt(N(t,e))}function Y(t,e,i){return N(t,e)<=i*i}function Q(t){return t*E}function K(e,i,s){if(z(e))return Q(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function Z(t){const e=C.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function et(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return tt({size:t.size,position:e})}function it(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var nt,at;t.OutModeDirection=void 0,(nt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",nt.left="left",nt.right="right",nt.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function ot(){return globalThis.document}function rt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function lt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ct(t,e){return t===e||I(e)&&e.includes(t)}function ht(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function dt(t,e,i,s,n){return ut(pt(t,s??0),e,i,n)}function ut(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function gt(t,...e){for(const i of e){if(T(i))continue;if(!S(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):S(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return S(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>gt(void 0,t)):gt(e[n],a)}}return t}function ft(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:C.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}}function yt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=G(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=J(d,u,c,h),g=J(u,d,c,h),f=p.rotate(-l),y=g.rotate(-l);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 mt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return I(t)?ht(t,e,i):t}function bt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function wt(t){const e=ot().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let xt,Pt;function Mt(t){if(xt!==t||!Pt){xt=t;const e=ot().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}Pt=e}return Pt}function kt(t,e,i,s,n){if(s){let s={passive:!0};D(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Ct(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function Dt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Ot{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var zt;t.EventType=void 0,(zt=t.EventType||(t.EventType={})).configAdded="configAdded",zt.containerInit="containerInit",zt.particlesSetup="particlesSetup",zt.containerStarted="containerStarted",zt.containerStopped="containerStopped",zt.containerDestroyed="containerDestroyed",zt.containerPaused="containerPaused",zt.containerPlay="containerPlay",zt.containerBuilt="containerBuilt",zt.particleAdded="particleAdded",zt.particleDestroyed="particleDestroyed",zt.particleRemoved="particleRemoved";class St{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ct(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const It=t=>(...e)=>{t(...e)},Tt={debug:It(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:It(console.info),log:It(console.log),trace:It(console.trace),verbose:It(console.log),warning:It(console.warn)};function Et(){return Tt}const Rt="100%";class _t{pluginManager=new St(this);#h=[];#d=new Ot;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Fr}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Et().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=vt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ot();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Rt,s.style.height||=Rt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ot();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var At,Lt,Ft,Bt,Vt,Ut,Ht,qt,Wt,jt,$t;!function(t){t.circle="circle",t.rectangle="rectangle"}(At||(At={}));class Gt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Nt extends Gt{radius;constructor(t,e,i){super(t,e,At.circle),this.radius=i}contains(t){return Y(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Nt||t.type===At.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Xt||t.type===At.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Xt extends Gt{size;constructor(t,e,i,s){super(t,e,At.rectangle),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){if(t instanceof Nt)return t.intersects(this);if(!(t instanceof Xt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Lt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Lt.counterClockwise="counter-clockwise",Lt.random="random",t.AnimationMode=void 0,(Ft=t.AnimationMode||(t.AnimationMode={})).auto="auto",Ft.increase="increase",Ft.decrease="decrease",Ft.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Vt=t.OutMode||(t.OutMode={})).bounce="bounce",Vt.none="none",Vt.out="out",Vt.destroy="destroy",Vt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.DestroyType=void 0,(Ht=t.DestroyType||(t.DestroyType={})).none="none",Ht.max="max",Ht.min="min",t.GradientType=void 0,(qt=t.GradientType||(t.GradientType={})).linear="linear",qt.radial="radial",qt.random="random",t.ParticleOutType=void 0,(Wt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Wt.inside="inside",Wt.outside="outside",t.StartValueType=void 0,(jt=t.StartValueType||(t.StartValueType={})).max="max",jt.min="min",jt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing";class Yt{load(t){T(t)||this.doLoad(t)}}function Qt(t,...e){for(const i of e)t.load(i)}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Zt(t,e,i){void 0!==i&&(t[e]=$(i))}function Jt(t,e,i){void 0!==i&&t[e].load(i)}function te(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ee(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class ie extends Yt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Zt(this,"count",t.count),Kt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Zt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class se extends ie{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class ne extends ie{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Zt(this,"offset",t.offset)}}class ae extends Yt{h=new ne(0,m);l=new ne(0,b);s=new ne(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class oe extends Yt{value="";static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){T(t.value)||(this.value=t.value)}}class re extends oe{animation=new ae;static create(t,e){const i=new re;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class le extends Yt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new oe,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class ce extends Yt{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class he extends Yt{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class de extends Yt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class ue extends Yt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"enable",t.enable),Zt(this,"opacity",t.opacity)}}class pe extends Yt{offset=0;value=90;doLoad(t){Zt(this,"offset",t.offset),Zt(this,"value",t.value)}}class ge extends Yt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class fe extends Yt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Zt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Zt(this,"maxSpeed",t.maxSpeed)}}class ye extends Yt{value=0;doLoad(t){T(t.value)||(this.value=$(t.value))}}class me extends ye{animation=new ie;doLoad(t){super.doLoad(t),Jt(this,"animation",t.animation)}}class ve extends me{animation=new se}class be extends Yt{clamp=!0;delay=new ye;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=gt(this.options,t.options))}}class we extends Yt{bottom;default=t.OutMode.out;left;right;top;doLoad(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 xe extends Yt{acceleration=0;enable=!1;position;doLoad(t){Zt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=gt({},t.position))}}class Pe extends Yt{angle=new pe;center=new ge;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new fe;outModes=new we;path=new be;random=!1;size=!1;speed=2;spin=new xe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(z(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Zt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=z(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Zt(this,"drift",t.drift),Kt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(S(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Kt(this,"random",t.random),Kt(this,"size",t.size),Zt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class Me extends Yt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Zt(this,"width",t.width),Zt(this,"opacity",t.opacity)}}class ke extends Yt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),te(this,"fill",t.fill,()=>new ue),te(this,"stroke",t.stroke,()=>new Me)}}class Ce extends ye{value=1}class De extends Yt{horizontal=new Ce;vertical=new Ce;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Oe extends Yt{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class ze extends Yt{mode=t.LimitMode.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class Se extends Yt{density=new Oe;limit=new ze;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class Ie extends Yt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=gt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class Te extends ye{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Ee extends Yt{bounce=new De;effect=new de;groups={};move=new Pe;number=new Se;paint;palette;reduceDuplicates=!1;shape=new Ie;zIndex=new Te;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new ke,this.paint.color=new re,this.paint.color.value="#fff",this.paint.fill=new ue,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=gt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=mt(e,t=>{const e=new ke;return e.load(t),e}):I(this.paint)?(this.paint=new ke,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Re(t,e,...i){const s=new Ee(t,e);return Qt(s,...i),s}class _e extends Yt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new le,this.fullScreen=new ce,this.particles=Re(this.#p,this.#u),this.resize=new he}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,mt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Zt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Zt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit),Kt(this,"hdr",t.hdr),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;D(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=gt(this.style,t.style),Kt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ae=new Map;function Le(t,e){let i=Ae.get(t);return i||(i=e(),Ae.size>2e3&&Ae.clear(),Ae.set(t,i)),i}function Fe(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Be(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return Ve(t,n.value,i,s);if(I(n.value)){const e=ht(n.value,i,s);if(!e)return;return Be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ve(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?Ge():qe(t,n.value);if(I(n.value)){const e=ht(n.value,i,s);if(!e)return;return Ve(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ue(t,e,i,s=!0){const n=Be(t,e,i,s);return n?He(n):void 0}function He(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function qe(t,e){return Fe(t,e)}function We(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function je(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,a=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,h=1/3,d=Math.min(y,y*We(c,l,n+h)),u=Math.min(y,y*We(c,l,n)),p=Math.min(y,y*We(c,l,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function $e(t){const e=je(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ge(t){const e=t??0,i=()=>Math.floor(L(e,256));return{b:i(),g:i(),r:i()}}function Ne(t,e,i){const s=i??1;return Le(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Xe(t,e,i){const s=i??1;return Le(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ne(je(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Ye(t,e,i,s){let n=t,a=e;return"r"in n||(n=je(t)),"r"in a||(a=je(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function Qe(t,e,i){if(i===h)return Ge();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ye(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return je(t)}}}function Ke(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Be(t,{value:n}):i?h:d:n===d?d:Be(t,{value:n})}function Ze(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Je(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ti(s.h,e.h,i),ti(s.s,e.s,i),ti(s.l,e.l,i)),s}function ti(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=$(i.offset)):e.velocity=0}function ei(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?H(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,l,r)}function ii(t,e){if(!t)return;const{h:i,s:s,l:n}=t;ei(i,!1,e),ei(s,!0,e),ei(n,!0,e)}function si(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ni=new _t;class ai{enable=!1;mode=[];load(t){T(t)||(Kt(this,"enable",t.enable),Kt(this,"mode",t.mode))}}var oi,ri,li;!function(t){t.circle="circle",t.rectangle="rectangle"}(oi||(oi={}));class ci{enable=!1;mode=[];selectors=[];type=oi.circle;load(t){T(t)||(Kt(this,"selectors",t.selectors),Kt(this,"enable",t.enable),Kt(this,"mode",t.mode),Kt(this,"type",t.type))}}class hi{enable=!1;mode=[];load(t){T(t)||(Kt(this,"enable",t.enable),Kt(this,"mode",t.mode))}}class di{onClick=new ai;onDiv=new ci;onHover=new hi;load(t){if(T(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=mt(e,t=>{const e=new ci;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(ri||(ri={}));class ui{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(T(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class pi{detectsOn=ri.window;events=new di;modes;constructor(t,e){this.modes=new ui(t,e)}load(t){if(T(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class gi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Ur});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new pi(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=gt({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(li||(li={}));class fi{type=li.external;container;constructor(t){this.container=t}}class yi{type=li.particles;container;constructor(t){this.container=t}}const mi="pointerdown",vi="pointerup",bi="pointerleave",wi="pointermove",xi="touchstart",Pi="touchend",Mi="touchmove",ki="touchcancel";function Ci(t,e){if(I(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Di(t,e){return!!Ci(e,e=>e.enable&&ct(t,e.mode))}function Oi(t,e,i){mt(e,e=>{const s=e.mode;e.enable&&ct(t,s)&&function(t,e){const i=t.selectors;mt(i,i=>{e(i,t)})}(e,i)})}function zi(t,e){if(e&&t)return Ci(t,t=>function(t,e){const i=mt(e,e=>t.matches(e));return I(i)?i.some(t=>t):i}(e,t.selectors))}function Si(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Ii{count;delay;duration;wait=!1;load(t){T(t)||(Kt(this,"count",t.count),Zt(this,"delay",t.delay),Zt(this,"duration",t.duration),Kt(this,"wait",t.wait))}}class Ti{mass=0;radius=0;load(t){T(t)||(Kt(this,"mass",t.mass),Kt(this,"radius",t.radius))}}class Ei extends ye{density=5;limit=new Ti;value=50;load(t){T(t)||(super.load(t),Kt(this,"density",t.density),z(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Ri{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new oe,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ii,this.size=new Ei}load(t){T(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Kt(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,Kt(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=$(t.position.x)),void 0!==t.position.y&&(this.position.y=$(t.position.y))),void 0!==t.size&&this.size.load(t.size),Kt(this,"destroy",t.destroy),Kt(this,"orbits",t.orbits))}}const _i="absorbers";class Ai extends fi{handleClickMode;maxDistance;#y=!1;#m;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==_i)return;const{clickPosition:a}=i.mouse;if(a){if(e.getArray(this.container).some(t=>X(t.position,a)<t.size))return}const o=ht(n)??new Ri;this.#v.addAbsorber(s,o,a)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){X(s.position,e.downPosition)<=s.size&&(this.#y=!0,this.#m=s)}else this.#y=!1,this.#m=void 0;this.#y&&this.#m==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ct(_i,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(I(i.absorbers))for(const e of i.absorbers){const i=new Ri;i.load(e),t.absorbers.push(i)}else{const e=new Ri;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Li=new WeakMap;function Fi(t){const e=t.pluginManager;let i=Li.get(e);return i||(i=Promise.resolve().then(function(){return Hr}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Li.delete(e),t}),Li.set(e,i)),i}class Bi{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return qr});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=mt(i.absorbers,t=>{const e=new Ri;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return I(e)?!!e.length:!!e}}async function Vi(t){await async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Fi(t);e.addPlugin(new Bi(i))})}(t),await async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Fi(t);Si(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new Ai(t,i)))})}(t)}class Ui{bottom;left;right;top;load(t){T(t)||(Zt(this,"bottom",t.bottom),Zt(this,"left",t.left),Zt(this,"right",t.right),Zt(this,"top",t.top))}}var Hi;!function(t){t.explode="explode",t.none="none",t.split="split"}(Hi||(Hi={}));class qi{maxSizeFactor=3;speed=2;load(t){T(t)||(Kt(this,"maxSizeFactor",t.maxSizeFactor),Kt(this,"speed",t.speed))}}class Wi extends ye{value=3}class ji extends ye{value={min:4,max:9}}class $i{count=1;factor=new Wi;fillColor;fillColorOffset;particles;rate=new ji;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){T(t)||(void 0!==t.fillColor&&(this.fillColor=oe.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=oe.create(this.strokeColor,t.strokeColor)),Kt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=mt(t.particles,t=>gt({},t)),Kt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let Gi=class{bounds=new Ui;explode=new qi;mode=Hi.none;split=new $i;load(t){T(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function Ni(t,e,i,s){return t&&s?function(t,e){const i=q(e.h??0),s=q(e.s??0),n=q(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return re.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?re.create(void 0,e):i?re.create(void 0,i):s?function(t){return re.create(void 0,{value:{hsl:t}})}(s):void 0}function Xi(e,i,s,n){const a=s.options.destroy;if(!a)return;const o=a.split,r=Re(e,i,s.options),l=vt(o.fillColor),c=vt(o.strokeColor),h=s.getFillColor(),d=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/q(o.factor.value),p=r.size;p&&(z(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=vt(r.paint),f=g?.fill,y=g?.stroke,m=Ni(o.fillColorOffset,l,f?.color,h),v=Ni(o.strokeColorOffset,c,y?.color,d);m&&f&&(f.color=m),v&&y&&(y.color=v);const b=o.sizeOffset?$(-s.size.value,s.size.value):0,w={x:s.position.x+H(b),y:s.position.y+H(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=H($(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Yi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:r,top:l}=s,{destroyBounds:c}=t,h=e.canvas.size;n&&(c.bottom=q(n)*h.height/a),o&&(c.left=q(o)*h.width/a),r&&(c.right=q(r)*h.width/a),l&&(c.top=q(l)*h.height/a)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ee(t,"destroy",Gi,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case Hi.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=q(n.rate.value),o=vt(n.particles);for(let s=0;s<a;s++)Xi(t,e,i,o)}(this.#p,this.#u,t);break;case Hi.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Qi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Yi(t.pluginManager,e)))})}class Ki{count;delay;duration;wait=!1;load(t){T(t)||(Kt(this,"count",t.count),Zt(this,"delay",t.delay),Zt(this,"duration",t.duration),Kt(this,"wait",t.wait))}}class Zi{delay=.1;quantity=1;load(t){T(t)||(Zt(this,"quantity",t.quantity),Zt(this,"delay",t.delay))}}class Ji{color=!1;opacity=!1;load(t){T(t)||(Kt(this,"color",t.color),Kt(this,"opacity",t.opacity))}}class ts{options={};replace=new Ji;type="square";load(t){T(t)||(void 0!==t.options&&(this.options=gt({},t.options??{})),this.replace.load(t.replace),Kt(this,"type",t.type))}}class es{height=0;mode=t.PixelMode.percent;width=0;load(t){T(t)||(Kt(this,"mode",t.mode),Kt(this,"height",t.height),Kt(this,"width",t.width))}}class is{fill;stroke;load(t){T(t)||(t.fill&&(this.fill??=new ue,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Me,this.stroke.load(t.stroke)))}}class ss{autoPlay=!0;direction;domId;fill=!0;life=new Ki;name;particles;position;rate=new Zi;shape=new ts;size;spawn=new is;spawnFillColor;spawnStrokeColor;startCount=0;load(t){T(t)||(Kt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new es,this.size.load(t.size)),Kt(this,"direction",t.direction),Kt(this,"domId",t.domId),Kt(this,"fill",t.fill),this.life.load(t.life),Kt(this,"name",t.name),this.particles=mt(t.particles,t=>gt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=$(t.position.x)),void 0!==t.position.y&&(this.position.y=$(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new re,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new re,this.spawnStrokeColor.load(t.spawnStrokeColor)),Kt(this,"startCount",t.startCount))}}const ns={count:1,enable:!0},as="emitters";class os extends fi{handleClickMode;maxDistance;#v;constructor(t,e){super(e),this.#v=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==as)return;let s;if(I(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const a=Math.floor(A()*i.value.length);if(t.has(a)&&t.size<e){n--;continue}t.add(a);const o=ht(i.value,a);o&&s.push(o)}}else s=i.value}else s=i.value;const n=s,a=e.mouse.clickPosition;mt(n,async t=>{await this.#v.addEmitter(this.container,t,a)})}}clear(){}init(){}interact(t,e){for(const t of this.#v.getArray(this.container))t.update(e)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&ct(as,n.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:ns,value:[]};for(const i of e)if(i?.emitters)if(I(i.emitters))for(const e of i.emitters){const i=new ss;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,I(e.value))for(const i of e.value){const e=new ss;e.load(i),t.emitters.value.push(e)}else{const i=new ss;i.load(e.value),t.emitters.value.push(i)}}else{const e=new ss;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#v.getArray(this.container).indexOf(t);e>=0&&this.#v.getArray(this.container).splice(e,1)}reset(){}}async function rs(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return jr}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const ls=new WeakMap;function cs(t){const e=t.pluginManager;let i=ls.get(e);return i||(i=Promise.resolve().then(function(){return $r}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw ls.delete(e),t}),ls.set(e,i)),i}class hs{fill;options;position;size;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}}var ds;!function(t){t.emitter="emitter"}(ds||(ds={}));class us{id="emitters";#v;constructor(t){this.#v=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Gr});return new e(this.#v,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=mt(i.emitters,t=>{const e=new ss;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}function ps(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}async function gs(t){await async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await cs(t);await rs(t),t.pluginManager.addPlugin(new us(e))})}(t),await async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await cs(t);Si(t),await rs(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new os(e,t)))})}(t)}class fs extends hs{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*o,t.height*o],a=((t,e)=>{const i=A()*w,s=Math.atan(e/t*Math.tan(u*i)),n=A();return n<w?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),r=(d=a,(c=s)*(h=n)/Math.sqrt((h*Math.cos(d))**2+(c*Math.sin(d))**2)),l=e?r*Math.sqrt(A()):r;var c,h,d;return{position:{x:i.x+l*Math.cos(a),y:i.y+l*Math.sin(a)}}}}class ys{generate(t,e,i,s,n){return new fs(e,i,s,n)}}async function ms(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{ps(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new ys)})}var vs;function bs(t,e){return t+e*(A()-o)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(vs||(vs={}));class ws extends hs{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:bs(e.x,i.width),y:bs(e.y,i.height)}};{const t=i.width*o,s=i.height*o,n=function(t){return Math.floor(A()*t)}(4),a=2*(A()-o);switch(n){case vs.TopLeft:return{position:{x:e.x+a*t,y:e.y-s}};case vs.TopRight:return{position:{x:e.x-t,y:e.y+a*s}};case vs.BottomRight:return{position:{x:e.x+a*t,y:e.y+s}};case vs.BottomLeft:default:return{position:{x:e.x+t,y:e.y+a*s}}}}}}class xs{generate(t,e,i,s,n){return new ws(e,i,s,n)}}async function Ps(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{ps(t),t.pluginManager.addEmitterShapeGenerator?.("square",new xs)})}class Ms{momentumFactor=.03;preserveMomentum=false;load(t){T(t)||(Kt(this,"momentumFactor",t.momentumFactor),Kt(this,"preserveMomentum",t.preserveMomentum))}}const ks=16.666666666666668;class Cs extends fi{maxDistance=0;#b;#w;#x;#P;#M;#k=[];#C=!1;#D;constructor(t){super(t)}clear(t,e){}init(){}interact(t,e){const i=t.mouse,s=i.position;if(s&&(this.#M=s),this.#x){const t=performance.now();i.clicking?this.#w=void 0:this.#w??=t;const e=void 0===this.#b&&void 0!==this.#w&&t-this.#w>=50;if(!i.inside||this.#O(i)||e)return this.#z(),void(this.#C=!1);const n=s??this.#M;if(!n)return;this.#k.push({x:n.x,y:n.y,t:t}),this.#k.length>5&&this.#k.shift();const a=n.x+(this.#P?.x??0),o=n.y+(this.#P?.y??0);return this.#x.position.x=a-this.#x.offset.x,this.#x.position.y=o-this.#x.offset.y,this.#x.velocity.x=0,this.#x.velocity.y=0,this.#x.initialPosition.x=this.#x.position.x,this.#x.initialPosition.y=this.#x.position.y,void(this.#x.misplaced=!1)}if(!i.clicking)return this.#z(),void(this.#C=!1);if(this.#C)return;this.#C=!0;const n=i.downPosition??s??this.#M,a=this.#S(t,n);if(!a||!s)return void(a||(this.#C=!1));const o=a.getPosition();this.#x=a,this.#b=i.clickTime,this.#P={x:o.x-s.x,y:o.y-s.y},this.#D={x:a.velocity.x,y:a.velocity.y},this.#w=void 0,this.#k=[{x:s.x,y:s.y,t:performance.now()}],a.velocity.x=0,a.velocity.y=0,a.position.x=o.x-a.offset.x,a.position.y=o.y-a.offset.y,a.initialPosition.x=a.position.x,a.initialPosition.y=a.position.y,a.misplaced=!1}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!this.#x&&!this.#C)||!!n?.onClick.enable&&s.clicking&&!!s.position&&ct("drag",n.onClick.mode)}loadModeOptions(t,...e){ee(t,"drag",Ms,...e)}reset(t,e){}#S(t,e){if(!e)return;const i=this.container.particles.filter(e=>this.isEnabled(t,e));let s,n=1/0;for(const t of i){const i=X(t.getPosition(),e),a=t.getRadius();!Number.isFinite(i)||!Number.isFinite(a)||i>a||i>=n||(s=t,n=i)}return s}#O(t){return void 0!==this.#b&&void 0!==t.clickTime&&t.clickTime!==this.#b}#z(){if(this.#x){const t=this.container.actualOptions.interactivity?.modes.drag;if((t?.preserveMomentum??!1)&&this.#k.length>=2){const e=this.#k[0],i=this.#k[this.#k.length-1];if(e&&i){const s=i.t-e.t;if(s>0){const n=t?.momentumFactor??.03;this.#x.velocity.x=(i.x-e.x)/s*ks*n,this.#x.velocity.y=(i.y-e.y)/s*ks*n}else this.#D&&(this.#x.velocity.x=this.#D.x,this.#x.velocity.y=this.#D.y)}else this.#D&&(this.#x.velocity.x=this.#D.x,this.#x.velocity.y=this.#D.y)}else this.#D&&(this.#x.velocity.x=this.#D.x,this.#x.velocity.y=this.#D.y)}this.#x=void 0,this.#b=void 0,this.#w=void 0,this.#P=void 0,this.#M=void 0,this.#k=[],this.#D=void 0}}async function Ds(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalDrag",t=>Promise.resolve(new Cs(t)))})}class Os{x=0;y=0;load(t){t&&(Kt(this,"x",t.x),Kt(this,"y",t.y))}}class zs{value;weights=new Os;load(t){t&&(t.weights&&(this.weights??=new Os,this.weights.load(t.weights)),T(t.value)||(this.value=$(t.value)))}}class Ss{h=new zs;l=new zs;s=new zs;load(t){t&&(t.h&&(this.h??=new zs,this.h.load(t.h)),t.s&&(this.s??=new zs,this.s.load(t.s)),t.l&&(this.l??=new zs,this.l.load(t.l)))}}class Is{colorCoords=new Ss;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){T(t)||(Kt(this,"delay",t.delay),Kt(this,"quantity",t.quantity),Kt(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=gt({},t.particles)),t.colorCoords&&(this.colorCoords??=new Ss,this.colorCoords.load(t.colorCoords)))}}const Ts="trail";class Es extends fi{maxDistance=0;#I;#T;#p;constructor(t,e){super(e),this.#p=t,this.#I=0}clear(){}init(){}interact(t,e){const i=this.container;if(!i.retina.reduceFactor)return;const s=i.actualOptions,n=s.interactivity?.modes.trail;if(!n)return;const a=n.delay*r/this.container.retina.reduceFactor;if(this.#I<a&&(this.#I+=e.value),this.#I<a)return;const o=t.mouse.position,l=!(n.pauseOnStop&&(o===this.#T||o?.x===this.#T?.x&&o?.y===this.#T?.y));if(this.#T=o?{...o}:void 0,l&&o){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:a}=i.canvas.size,r={x:o.x/s,y:o.y/a},l=t=>!!(t?.weights?.x??t?.weights?.y),c=(t,e,i)=>{if(!l(t))return;const s=t?.weights,n=r.x*(s?.x??0)+r.y*(s?.y??0),a=t?.value??e,o=W(a??0),c=j(a??i),h=o+n*(c-o);return Math.min(c,Math.max(o,h))},h=n.particles?.paint?vt(n.particles.paint):void 0,d=h?.fill,u=d?Ue(this.#p,re.create(void 0,d.color)):void 0,p=c(e.h,u?.h,m),g=c(e.s,u?.s,v),f=c(e.l,u?.l,b);void 0===p&&void 0===g&&void 0===f||(t=gt({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:g??u?.s,l:f??u?.l}}}}}))}i.particles.push(n.quantity,o,t)}this.#I-=a}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&(s.clicking&&s.inside&&!!s.position&&ct(Ts,n.onClick.mode)||s.inside&&!!s.position&&ct(Ts,n.onHover.mode))}loadModeOptions(t,...e){ee(t,"trail",Is,...e)}reset(){}}async function Rs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new Es(t.pluginManager,e)))})}var _s;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(_s||(_s={}));class As{enable=!1;value=0;load(t){T(t)||(Kt(this,"enable",t.enable),Zt(this,"value",t.value))}}class Ls{backColor;darken=new As;enable=!1;enlighten=new As;mode=_s.vertical;speed=25;load(t){T(t)||(void 0!==t.backColor&&(this.backColor=oe.create(this.backColor,t.backColor)),this.darken.load(t.darken),Kt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Kt(this,"mode",t.mode),Zt(this,"speed",t.speed))}}class Fs{#p;constructor(t){this.#p=t}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(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===_s.horizontal||s.mode===_s.both,vertical:s.mode===_s.vertical||s.mode===_s.both,angle:A()*u,speed:q(s.speed)/360},s.backColor)i.backColor=Ue(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:q(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:q(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:q(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ee(t,"roll",Ls,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function Bs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new Fs(t.pluginManager)))})}class Vs{enable=!1;mode="destination-out";load(t){T(t)||(Kt(this,"mode",t.mode),Kt(this,"enable",t.enable))}}class Us{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Nr});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Vs),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Vs,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Hs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Us)})}class qs{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=S(s)?{min:Q(s.min),max:Q(s.max)}:{min:0,max:Q(s)}}}async function Ws(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new qs))})}var js;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(js||(js={}));const $s=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Gs=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ns{accepts(t){return t.startsWith("#")}handleColor(t){return this.#E(t.value)}handleRangeColor(t){return this.#E(t.value)}parseString(t){return this.#E(t)}#E(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace($s,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Gs.exec(e);return i?{a:i[js.a]?Number.parseInt(i[js.a],16)/255:1,b:Number.parseInt(i[js.b]??"0",16),g:Number.parseInt(i[js.g]??"0",16),r:Number.parseInt(i[js.r]??"0",16)}:void 0}}async function Xs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ns)})}var Ys;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ys||(Ys={}));const Qs=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ks{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return je(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return je({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Qs.exec(t);return e?$e({a:e.length>4?st(e[Ys.a]):1,h:Number.parseInt(e[Ys.h]??"0",10),l:Number.parseInt(e[Ys.l]??"0",10),s:Number.parseInt(e[Ys.s]??"0",10)}):void 0}}async function Zs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ks)})}class Js{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Yr});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function tn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Js(t.pluginManager))})}function en(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:j(s)*i,min:W(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=H(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function sn(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=a.value,i.time<h))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=V(i.value,r,l))}}class nn extends se{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Kt(this,"destroy",t.destroy)}}class an extends ve{animation=new nn;value=1;load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class on{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=en(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}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))}loadOptions(t,...e){ee(t,"opacity",an,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&sn(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function rn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new on(t)))})}class ln{modes;#u;#R;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#R=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#R)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=pt(r,c),d=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c})}}class cn{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=G(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class hn{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;dt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const dn=C.origin;class un{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;dn.setTo(l),dn.length=e.moveCenter.radius,dn.angle=e.velocity.angle+Math.PI,dn.addTo(e.moveCenter);const{dx:s,dy:n}=G(e.position,dn);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(H({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(H({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=G(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=G(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=pt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class pn{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#_(e,t.OutMode.bounce,t=>new ln(t)),this.#_(e,t.OutMode.out,t=>new un(t)),this.#_(e,t.OutMode.destroy,t=>new cn(t)),this.#_(e,t.OutMode.none,t=>new hn(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#A(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#A(e,i,s.left??s.default,t.OutModeDirection.left),this.#A(e,i,s.right??s.default,t.OutModeDirection.right),this.#A(e,i,s.top??s.default,t.OutModeDirection.top)}#_(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#A(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function gn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new pn(t)))})}class fn{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=vt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=re.create(void 0===a?void 0:re.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=Ue(this.#p,i);s&&(t.fillColor=Je(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=re.create(void 0===a?void 0:re.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ue(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Je(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!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),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ii(t.fillColor,e),ii(t.strokeColor,e))}}async function yn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new fn(t.pluginManager,e)))})}var mn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(mn||(mn={}));const vn=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class bn{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=vn.exec(t);return e?{a:e.length>4?st(e[mn.a]):1,b:parseInt(e[mn.b]??"0",10),g:parseInt(e[mn.g]??"0",10),r:parseInt(e[mn.r]??"0",10)}:void 0}}async function wn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new bn)})}class xn extends se{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Kt(this,"destroy",t.destroy)}}class Pn extends ve{animation=new xn;value=3;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Mn{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}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))}loadOptions(t,...e){ee(t,"size",Pn,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=en(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&sn(t,t.size,!0,t.options.size.animation.destroy,e)}}async function kn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Mn(t)))})}async function Cn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Hs(t),Xs(t),Zs(t),wn(t),tn(t),Ws(t),yn(t),rn(t),gn(t),kn(t)])})}const Dn=new Map;async function On(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{for(const[e,i]of Dn)t.pluginManager.addEasing(e,i)})}Dn.set("ease-in-quad",t=>t**2),Dn.set("ease-out-quad",t=>1-(1-t)**2),Dn.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const zn=["emoji"];function Sn(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function In(t,e){try{await ot().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Tn='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class En{#L=new Map;destroy(){for(const[t,e]of this.#L)e instanceof ImageBitmap&&e.close(),this.#L.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#L.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!zn.some(t=>ct(t,e.type)))return;const i=[In(Tn)];mt(zn.map(t=>e.options[t])[0],t=>{t.font&&i.push(In(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=vt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Tn,padding:i.padding??0,value:s}:{font:Tn,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#L.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=j(e.size.value),h=c+l,d=2*h,u=new OffscreenCanvas(d,d),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,h,h);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#L.set(r,g),e.emojiDataKey=r}}async function Rn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(zn,()=>Promise.resolve(new En))})}const _n=C.origin;function An(t,e,i,s,n,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const l=e.particles.grid.query(n,a);for(const e of l){const{dx:n,dy:a,distance:l}=G(e.position,i),c=r.speed*r.factor,h=V(t.getEasing(r.easing)(1-l/s)*c,1,r.maxSpeed);_n.x=l?n/l*h:c,_n.y=l?a/l*h:c,o?.(e),e.position.subFrom(_n)}}let Ln=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){T(t)||(Kt(this,"distance",t.distance),Kt(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),Kt(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),Kt(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const Fn="attract";let Bn=class extends fi{handleClickMode;#F;#B;#p;#V;constructor(t,e){super(e),this.#p=t,this.#B=0,this.#F=new Set,this.#V=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.attract;if(n&&t===Fn){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},n.duration*r)}}}get maxDistance(){return this.#B}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#B=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===wi,s=e.interactivity?.events;if(!s)return;const{enable:n,mode:a}=s.onHover,{enable:o,mode:r}=s.onClick;i&&n&&ct(Fn,a)?function(t,e,i,s,n){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||An(t,e,a,o,new Nt(a.x,a.y,o),t=>s(t),n)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#U(t)}):o&&ct(Fn,r)&&function(t,e,i,s,n){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;An(t,e,a,o,new Nt(a.x,a.y,o),t=>s(t),n)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#U(t)}),this.#H()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!(s.position&&n?.onHover.enable||s.clickPosition&&n?.onClick.enable))return!1;const a=n.onHover.mode,o=n.onClick.mode;return ct(Fn,a)||ct(Fn,o)}loadModeOptions(t,...e){ee(t,"attract",Ln,...e)}reset(){}#H(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#V.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#V){if(this.#F.has(n))continue;if(n.destroyed){this.#V.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-n.position.x,l=o.y-n.position.y,c=o.z-n.position.z;if(t.follow&&n.options.move.enable){const{x:t,y:e,z:i}=n.velocity,s=t*t+e*e+i*i;if(s>0){const n=(r*t+l*e+c*i)/s;r-=t*n,l-=e*n,c-=i*n}}n.position.x+=r*s,n.position.y+=l*s,n.position.z+=c*s,Math.abs(r)<=.5&&Math.abs(l)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#V.delete(n))}}#U(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#V.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#V.set(t,s)),s.lastInteractionTime=i}};async function Vn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new Bn(t.pluginManager,e)))})}const Un=Math.PI*o;function Hn(t,e,i,s,n){const a=t.particles.grid.query(s,n);for(const t of a)s instanceof Nt?yt(ft(t),{position:e,mass:i**2*Un,velocity:C.origin,factor:C.origin}):s instanceof Xt&&jn(t,pt(e,i))}function qn(t,e,i,s){Oi(i,e,(e,i)=>{!function(t,e,i,s){const n=ot().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,a=t.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth*o)*a,y:(n.offsetTop+n.offsetHeight*o)*a},l=n.offsetWidth*o*a,c=10*a,h=i.type===oi.circle?new Nt(r.x,r.y,l+c):new Xt(n.offsetLeft*a-c,n.offsetTop*a-c,n.offsetWidth*a+2*c,n.offsetHeight*a+2*c);s(r,l,h)})}(t,e,i,(e,i,n)=>{Hn(t,e,i,n,s)})})}function Wn(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:a,velocity:r,factor:l}=t;return s.min<a.min||s.min>a.max||s.max<a.min||s.max>a.max||(i.max>=n.min&&i.max<=(n.max+n.min)*o&&r>0||i.min<=n.max&&i.min>(n.max+n.min)*o&&r<0)&&(e.velocity=r*-l,e.bounced=!0),e}function jn(t,e){const i=pt(t.getPosition(),t.getRadius()),s=t.options.bounce,n=Wn({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:q(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const a=Wn({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:q(s.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class $n{distance=200;load(t){T(t)||Kt(this,"distance",t.distance)}}const Gn="bounce";class Nn extends fi{#B;constructor(t){super(t),this.#B=0}get maxDistance(){return this.#B}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#B=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===wi;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ct(Gn,a)?function(t,e,i){const s=10*t.retina.pixelRatio,n=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!n||Hn(t,n,a,new Nt(n.x,n.y,a+s),i)}(this.container,t,e=>this.isEnabled(t,e)):qn(this.container,o,Gn,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ct(Gn,n.onHover.mode)||Di(Gn,a)}loadModeOptions(t,...e){ee(t,"bounce",$n,...e)}reset(){}}async function Xn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new Nn(t)))})}class Yn{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!T(t)){if(Kt(this,"distance",t.distance),Kt(this,"duration",t.duration),Kt(this,"mix",t.mix),Zt(this,"opacity",t.opacity),void 0!==t.color){const e=I(this.color)?void 0:this.color;this.color=mt(t.color,t=>oe.create(e,t))}Kt(this,"size",t.size)}}}class Qn extends Yn{selectors=[];load(t){super.load(t),T(t)||Kt(this,"selectors",t.selectors)}}class Kn extends Yn{divs;load(t){super.load(t),T(t)||(this.divs=mt(t.divs,t=>{const e=new Qn;return e.load(t),e}))}}var Zn;function Jn(t,e,i,s){if(e>=i){return V(t+(e-i)*s,t,e)}if(e<i){return V(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Zn||(Zn={}));const ta="bubble";class ea extends fi{handleClickMode;#B;#p;constructor(t,e){super(e),this.#p=t,this.#B=0,e.bubble??={},this.handleClickMode=t=>{t===ta&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#B}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&&(this.#B=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,s=i.interactivity?.events;if(!s)return;const n=s.onHover,a=s.onClick,o=n.enable,r=n.mode,l=a.enable,c=a.mode,h=s.onDiv;o&&ct(ta,r)?this.#q(t):l&&ct(ta,c)?this.#W(t):Oi(ta,h,(i,s)=>{this.#j(t,e,i,s)})}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const{onClick:a,onDiv:o,onHover:r}=n,l=Di(ta,o);return!!(l||r.enable&&s.position||a.enable&&s.clickPosition)&&(ct(ta,r.mode)||ct(ta,a.mode)||l)}loadModeOptions(t,...e){ee(t,"bubble",Kn,...e)}reset(t,e){e.bubble.inRange=!1}#W(t){const e=this.container,i=e.actualOptions,s=t.mouse.clickPosition,n=i.interactivity?.modes.bubble;if(!n||!s)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(s,a,e=>this.isEnabled(t,e)),{bubble:l}=e;for(const i of o){if(!l.clicking)continue;i.bubble.inRange=!l.durationEnd;const o=X(i.getPosition(),s),c=(performance.now()-(t.mouse.clickTime??0))/r;c>n.duration&&(l.durationEnd=!0),c>2*n.duration&&(l.clicking=!1,l.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:i.bubble.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:Zn.size};this.#$(i,o,c,h);const d={bubbleObj:{optValue:n.opacity,value:i.bubble.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:Zn.opacity};this.#$(i,o,c,d),!l.durationEnd&&o<=a?this.#G(i,o):delete i.bubble.color}}#q(t){const e=this.container,i=t.mouse.position,s=e.retina.bubbleModeDistance;if(!s||s<0||!i)return;const n=e.particles.grid.queryCircle(i,s,e=>this.isEnabled(t,e));for(const e of n){e.bubble.inRange=!0;const n=X(e.getPosition(),i),a=1-n/s;n<=s?a>=0&&t.status===wi&&(this.#N(e,a),this.#X(e,a),this.#G(e,a)):this.reset(t,e),t.status===bi&&this.reset(t,e)}}#G(t,e,i){const s=this.container.actualOptions,n=i??s.interactivity?.modes.bubble;if(n){if(!t.bubble.finalColor){const e=n.color;if(!e)return;const i=vt(e);t.bubble.finalColor=Ue(this.#p,i)}if(t.bubble.finalColor)if(n.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?He(Ye(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}}#X(t,e,i){const s=this.container.actualOptions,n=i?.opacity??s.interactivity?.modes.bubble?.opacity;if(!n)return;const a=Jn(t.opacity?.value??1,n,t.opacity?.max??1,e);void 0!==a&&(t.bubble.opacity=a)}#N(t,e,i){const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const a=Jn(t.size.value,n,t.size.max,e);void 0!==a&&(t.bubble.radius=a)}#$(t,e,i,s){const n=this.container,a=s.bubbleObj.optValue,o=n.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const l=r.duration,c=n.retina.bubbleModeDistance,h=s.particlesObj.optValue,d=s.bubbleObj.value,u=s.particlesObj.value??0,p=s.type;if(c&&!(c<0)&&a!==h)if(n.bubble??={},n.bubble.durationEnd)d&&(p===Zn.size&&delete t.bubble.radius,p===Zn.opacity&&delete t.bubble.opacity);else if(e<=c){if((d??u)!==a){const e=u-i*(u-a)/l;p===Zn.size&&(t.bubble.radius=e),p===Zn.opacity&&(t.bubble.opacity=e)}}else p===Zn.size&&delete t.bubble.radius,p===Zn.opacity&&delete t.bubble.opacity}#j(t,e,i,s){const n=this.container,a=ot().querySelectorAll(i),r=n.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,l=n.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*l,y:(a.offsetTop+a.offsetHeight*o)*l},h=a.offsetWidth*o*l,d=s.type===oi.circle?new Nt(c.x,c.y,h):new Xt(a.offsetLeft*l,a.offsetTop*l,a.offsetWidth*l,a.offsetHeight*l),u=n.particles.grid.query(d,e=>this.isEnabled(t,e));for(const t of u){if(!d.contains(t.getPosition()))continue;t.bubble.inRange=!0;const i=zi(r.divs,a);t.bubble.div&&t.bubble.div===a||(this.clear(t,e,!0),t.bubble.div=a),this.#N(t,1,i),this.#X(t,1,i),this.#G(t,1,i)}})}}async function ia(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new ea(t.pluginManager,e)))})}class sa{opacity=.5;load(t){T(t)||Zt(this,"opacity",t.opacity)}}class na{distance=80;links=new sa;radius=60;load(t){T(t)||(Kt(this,"distance",t.distance),this.links.load(t.links),Kt(this,"radius",t.radius))}}function aa(t,e,i,s){const n=t.actualOptions,a=n.interactivity?.modes.connect;if(a)return function(t,e,i,s,n){const a=Math.floor(s.getRadius()/i.getRadius()),o=i.getFillColor(),r=s.getFillColor();if(!o||!r)return;const l=i.getPosition(),c=s.getPosition(),h=Ye(o,r,i.getRadius(),s.getRadius()),d=e.createLinearGradient(l.x,l.y,c.x,c.y);return d.addColorStop(0,Xe(o,t.hdr,n)),d.addColorStop(V(a,0,1),Ne(h,t.hdr,n)),d.addColorStop(1,Xe(r,t.hdr,n)),d}(t,e,i,s,a.links.opacity)}function oa(t,e,i){t.canvas.render.draw(s=>{const n=aa(t,s,e,i);if(!n)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,s,n){Sn(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,a,o)})}class ra extends fi{#B;constructor(t){super(t),this.#B=0}get maxDistance(){return this.#B}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#B=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:s,connectModeRadius:n}=e.retina;if(!s||s<0||!n||n<0||!i)return;const a=Math.abs(n),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const n=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(s),r=Math.abs(n.x-i.x),l=Math.abs(n.y-i.y);r<o&&l<o&&oa(e,t,a)}})}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!n?.onHover.enable||!s.position)&&ct("connect",n.onHover.mode)}loadModeOptions(t,...e){ee(t,"connect",na,...e)}reset(){}}async function la(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new ra(t)))})}function ca(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ha(t,e,i){Oi(i,e,(e,i)=>{!function(t,e,i){const s=ot().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,n=t.retina.pixelRatio,a={x:(s.offsetLeft+s.offsetWidth*o)*n,y:(s.offsetTop+s.offsetHeight*o)*n},r=s.offsetWidth*o*n,l=10*n,c=i.type===oi.circle?new Nt(a.x,a.y,r+l):new Xt(s.offsetLeft*n-l,s.offsetTop*n-l,s.offsetWidth*n+2*l,s.offsetHeight*n+2*l);ca(t,c)})}(t,e,i)})}class da{distance=200;load(t){T(t)||Kt(this,"distance",t.distance)}}const ua="destroy";class pa extends fi{#B;constructor(t){super(t),this.#B=0}get maxDistance(){return this.#B}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#B=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===wi;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ct(ua,a)?function(t,e){const i=10*t.retina.pixelRatio,s=e.mouse.position,n=t.retina.destroyModeDistance;!n||n<0||!s||ca(t,new Nt(s.x,s.y,n+i))}(this.container,t):ha(this.container,o,ua)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ct(ua,n.onHover.mode)||Di(ua,a)}loadModeOptions(t,...e){ee(t,"destroy",da,...e)}reset(){}}async function ga(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new pa(t)))})}class fa{blink=!1;color;consent=!1;opacity=1;load(t){T(t)||(Kt(this,"blink",t.blink),void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Kt(this,"consent",t.consent),Zt(this,"opacity",t.opacity))}}class ya{distance=100;links=new fa;load(t){T(t)||(Kt(this,"distance",t.distance),this.links.load(t.links))}}function ma(t,e,i,s,n){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,s,n,a,o=!1){Sn(t,i,s),t.strokeStyle=Ne(n,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,n,i,s,t.hdr)})}class va extends fi{#B;#p;constructor(t,e){super(e),this.#p=t,this.#B=0}get maxDistance(){return this.#B}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#B=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==wi)return;const s=t.mouse.position;if(!s)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const a=e.particles.grid.queryCircle(s,n,e=>this.isEnabled(t,e));for(const t of a){const a=X(t.getPosition(),s);if(a>n)continue;const o=i.modes.grab.links,r=o.opacity,l=r-a*r/n;if(l<=0)continue;const c=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&c){const t=i.modes.grab.links;e.particles.grabLineColor=Ke(this.#p,c,t.blink,t.consent)}const h=Qe(t,void 0,e.particles.grabLineColor);h&&ma(e,t,h,l,s)}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ct("grab",n.onHover.mode)}loadModeOptions(t,...e){ee(t,"grab",ya,...e)}reset(){}}async function ba(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new va(t.pluginManager,e)))})}class wa{force=2;smooth=10;load(t){T(t)||(Kt(this,"force",t.force),Kt(this,"smooth",t.smooth))}}class xa extends fi{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#Y(t,e)}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ct("parallax",n.onHover.mode)}loadModeOptions(t,...e){ee(t,"parallax",wa,...e)}reset(){}#Y(t,e){if(!this.isEnabled(t,e))return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.parallax;if(!n)return;const a=n.force,r=t.mouse.position;if(!r)return;const l=i.canvas.size,c=l.width*o,h=l.height*o,d=n.smooth,u=e.getRadius()/a,p=(r.x-c)*u,g=(r.y-h)*u,{offset:f}=e;f.x+=(p-f.x)/d,f.y+=(g-f.y)/d}}async function Pa(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new xa(t)))})}const Ma="pause";class ka extends fi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==Ma)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=(e?.interactivity??i.interactivity)?.events;return!!s&&ct(Ma,s.onClick.mode)}reset(){}}async function Ca(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new ka(t)))})}class Da{default=!0;groups=[];particles;quantity=4;load(t){T(t)||(Kt(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),Zt(this,"quantity",t.quantity),this.particles=mt(t.particles,t=>gt({},t)))}}const Oa="push";class za extends fi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==Oa)return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.push;if(!n)return;const a=q(n.quantity);if(a<=0)return;const o=ht([void 0,...n.groups]),r=gt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,vt(n.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ct(Oa,n.onClick.mode)}loadModeOptions(t,...e){ee(t,"push",Da,...e)}reset(){}}async function Sa(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new za(t)))})}class Ia{quantity=2;load(t){T(t)||Zt(this,"quantity",t.quantity)}}const Ta="remove";class Ea extends fi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==Ta)return;const s=q(i.interactivity.modes.remove.quantity);for(let t=0;t<s;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ct(Ta,n.onClick.mode)}loadModeOptions(t,...e){ee(t,"remove",Ia,...e)}reset(){}}async function Ra(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Ea(t)))})}class _a{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){T(t)||(Kt(this,"distance",t.distance),Kt(this,"duration",t.duration),Kt(this,"easing",t.easing),Kt(this,"factor",t.factor),Kt(this,"speed",t.speed),Kt(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Aa extends _a{selectors=[];load(t){super.load(t),T(t)||Kt(this,"selectors",t.selectors)}}class La extends _a{divs;load(t){super.load(t),T(t)||(this.divs=mt(t.divs,t=>{const e=new Aa;return e.load(t),e}))}}const Fa="repulse";class Ba extends fi{handleClickMode;#Q;#F;#B;#K;#p;#V;constructor(t,e){super(e),this.#p=t,this.#B=0,this.#K=C.origin,this.#F=new Set,this.#Q=C.origin,this.#V=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.repulse;if(!n||t!==Fa)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},n.duration*r)}}get maxDistance(){return this.#B}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#B=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===wi,s=e.interactivity?.events;if(!s)return;const n=s.onHover,a=n.enable,o=n.mode,r=s.onClick,l=r.enable,c=r.mode,h=s.onDiv;i&&a&&ct(Fa,o)?this.#Z(t):l&&ct(Fa,c)?this.#J(t):Oi(Fa,h,(e,i)=>{this.#tt(t,e,i)}),this.#H()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv,o=n.onHover,r=n.onClick,l=Di(Fa,a);if(!(l||o.enable&&s.position||r.enable&&s.clickPosition))return!1;const c=o.mode,h=r.mode;return ct(Fa,c)||ct(Fa,h)||l}loadModeOptions(t,...e){ee(t,"repulse",La,...e)}reset(){}#J(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const s=e.repulse??{particles:[]};if(s.finish||(s.count??=0,s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const n=e.retina.repulseModeDistance;if(!n||n<0)return;const a=Math.pow(n/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Nt(o.x,o.y,a),l=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of l){const{dx:e,dy:n,distance:r}=G(o,t.position),l=r**2,c=-a*i.speed/l;l<=a&&(this.#U(t),s.particles.push(t),this.#Q.x=e,this.#Q.y=n,this.#Q.length=c,t.velocity.setTo(this.#Q))}}else if(!1===s.clicking){for(const t of s.particles)t.velocity.setTo(t.initialVelocity);s.particles=[]}}#Z(t){const e=this.container,i=t.mouse.position,s=e.retina.repulseModeDistance;!s||s<0||!i||this.#et(t,i,s,new Nt(i.x,i.y,s))}#et(t,e,i,s,n){const a=this.container,o=a.particles.grid.query(s,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:l,speed:c,factor:h,maxSpeed:d}=r,u=this.#p.getEasing(l),p=(n?.speed??c)*h;for(const t of o){const{dx:s,dy:n,distance:a}=G(t.position,e),o=V(u(1-a/i)*p,0,d);this.#K.x=a?s/a*o:p,this.#K.y=a?n/a*o:p,this.#U(t),t.position.addTo(this.#K)}}#H(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#V.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#V){if(this.#F.has(n))continue;if(n.destroyed){this.#V.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&n.options.move.enable&&(o.x+=n.velocity.x,o.y+=n.velocity.y,o.z+=n.velocity.z);const r=o.x-n.position.x,l=o.y-n.position.y,c=o.z-n.position.z;n.position.x+=r*s,n.position.y+=l*s,n.position.z+=c*s,Math.abs(r)<=.5&&Math.abs(l)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#V.delete(n))}}#tt(t,e,i){const s=this.container,n=s.actualOptions.interactivity?.modes.repulse;if(!n)return;const a=ot().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=s.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},c=a.offsetWidth*o*r,h=i.type===oi.circle?new Nt(l.x,l.y,c):new Xt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),d=zi(n.divs,a);this.#et(t,l,c,h,d)})}#U(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#V.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#V.set(t,s)),s.lastInteractionTime=i,e.follow&&t.options.move.enable&&(s.target.x+=t.velocity.x,s.target.y+=t.velocity.y,s.target.z+=t.velocity.z)}}async function Va(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Ba(e,t)))})}class Ua{factor=3;radius=200;load(t){T(t)||(Kt(this,"factor",t.factor),Kt(this,"radius",t.radius))}}class Ha extends fi{#B;constructor(t){super(t),this.#B=0}get maxDistance(){return this.#B}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#B=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ct("slow",n.onHover.mode)}loadModeOptions(t,...e){ee(t,"slow",Ua,...e)}reset(t,e){e.slow.inRange=!1;const i=this.container,s=i.actualOptions,n=t.mouse.position,a=i.retina.slowModeRadius,o=s.interactivity?.modes.slow;if(!o||!a||a<0||!n)return;const r=X(n,e.getPosition()),l=r/a,c=o.factor,{slow:h}=e;r>a||(h.inRange=!0,h.factor=l/c)}}async function qa(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new Ha(t)))})}const Wa=["image","images"],ja=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function $a(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,Et().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Ga(t){if("svg"!==t.type)return void await $a(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Et().error("Image not found"),t.error=!0),t.loading=!1}function Na(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Xe(e,s,i);if(n.includes("fill"))return n.replaceAll(ja,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,gif:e.gif,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await $a(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}const Xa=[0,4,2,1],Ya=[8,8,4,2];class Qa{data;pos;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="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var Ka,Za;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(Ka||(Ka={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(Za||(Za={}));function Ja(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}function to(t,e,i){const s=e>>>3,n=7&e;return(t[s]+(t[s+1]<<8)+(t[s+2]<<16)&(1<<i)-1<<n)>>>n}async function eo(t,e,i,s,n,a,o){switch(t.nextByte()){case Za.EndOfFile:return!0;case Za.Image:await async function(t,e,i,s,n,a){const o=e.frames[s(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const r=t.nextByte(),l=!(128&~r),c=!(64&~r);o.sortFlag=!(32&~r),o.reserved=(24&r)>>>3;const h=1<<1+(7&r);l&&(o.localColorTable=Ja(t,h));const d=t=>{const{r:s,g:a,b:r}=(l?o.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:a,b:r,a:255}:{r:s,g:a,b:r,a:i?Math.trunc((s+a+r)/3):0}},u=(()=>{try{return new ImageData(o.width,o.height,a)}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;if(c){for(let t=0,e=p+1,i=0,s=[[0]],n=0;n<4;n++)if(Xa[n]<o.height){let a=0,r=0,l=!1;for(;!l;){const c=t;if(t=to(g,i,e),i+=e+1,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{t>=s.length?s.push(s[c].concat(s[c][0])):c!==f&&s.push(s[c].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:l}=d(e);u.data.set([t,i,s,l],Xa[n]*o.width+Ya[n]*r+a%(4*o.width)),a+=4}s.length===1<<e&&e<12&&e++}a===4*o.width*(r+1)&&(r++,Xa[n]+Ya[n]*r>=o.height&&(l=!0))}}o.image=u,o.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,s=-4;const n=[[0]];for(;;){const a=t;if(t=to(g,i,e),i+=e,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=n.length?n.push(n[a].concat(n[a][0])):a!==f&&n.push(n[a].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:a}=d(e);s+=4,u.data.set([t,i,n,a],s)}n.length>=1<<e&&e<12&&e++}}o.image=u,o.bitmap=await createImageBitmap(u)}}(t,e,i,s,n,a);break;case Za.Extension:!function(t,e,i,s){switch(t.nextByte()){case Za.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const a=t.nextByte();n.GCreserved=(224&a)>>>5,n.disposalMethod=(28&a)>>>2,n.userInputDelayFlag=!(2&~a);const o=!(1&~a);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();o&&s(r),t.pos++;break}case Za.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case Za.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case Za.PlainTextExtension: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,n);break;default:throw new EvalError("undefined block found")}return!1}async function io(t,e){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i,s){s??=!1;const n=await fetch(t);if(!n.ok&&404===n.status)throw new EvalError("file not found");const a=await n.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new Qa(new Uint8ClampedArray(a));if("GIF89a"!==r.getString(6))throw new Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();const l=r.nextByte(),c=!(128&~l);o.colorRes=(112&l)>>>4,o.sortFlag=!(8&~l);const h=1<<1+(7&l),d=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),c&&(o.globalColorTable=Ja(r,h));const u=(()=>{try{return new ImageData(o.width,o.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error("GIF frame size is to large");const{r:p,g:g,b:f}=o.globalColorTable[d];u.data.set(c?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);o.backgroundImage=u;let y=-1,m=!0,v=-1;const b=t=>(t&&(m=!0),y),w=t=>(null!=t&&(v=t),v);try{do{m&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:Ka.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),y++,v=-1,m=!1)}while(!await eo(r,o,s,b,w,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${y.toString()} "${t.message}"`,{cause:t});throw t}}(t.source,e),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 Number.NaN}(t.gifData),t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await $a(t)}class so{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=n,a.gif&&a.gifData)!function(t,e){const{context:i,radius:s,particle:n,delta:a}=t,r=n.image;if(!r?.gifData||!r.gif)return;const c=new OffscreenCanvas(r.gifData.width,r.gifData.height),h=c.getContext("2d",e);if(!h)throw new Error("could not create offscreen canvas context");h.imageSmoothingQuality="low",h.imageSmoothingEnabled=!1,h.clearRect(l.x,l.y,c.width,c.height),n.gifLoopCount??=r.gifLoopCount??0;let d=n.gifFrame??0;const u={x:-r.gifData.width*o,y:-r.gifData.height*o},p=r.gifData.frames[d];if(n.gifTime??=0,p.bitmap){switch(i.scale(s/r.gifData.width,s/r.gifData.height),p.disposalMethod){case Ka.UndefinedA:case Ka.UndefinedB:case Ka.UndefinedC:case Ka.UndefinedD:case Ka.Replace:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height);break;case Ka.Combine:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y);break;case Ka.RestoreBackground:h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),r.gifData.globalColorTable.length?h.putImageData(r.gifData.backgroundImage,u.x,u.y):h.putImageData(r.gifData.frames[0].image,u.x+p.left,u.y+p.top);break;case Ka.RestorePrevious:{const t=h.getImageData(l.x,l.y,c.width,c.height);h.drawImage(p.bitmap,p.left,p.top),i.drawImage(c,u.x,u.y),h.clearRect(l.x,l.y,c.width,c.height),h.putImageData(t,l.x,l.y)}}if(n.gifTime+=a.value,n.gifTime>p.delayTime){if(n.gifTime-=p.delayTime,++d>=r.gifData.frames.length){if(--n.gifLoopCount<=0)return;d=0,h.clearRect(l.x,l.y,c.width,c.height)}n.gifFrame=d}i.scale(r.gifData.width/s,r.gifData.height/s)}}(t,this.#u.canvas.render.settings);else if(r){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(r,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Wa.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#it(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await Na(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,gif:a.gif,gifData:a.gifData,gifLoopCount:a.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#it=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{gif:e.gif,name:e.name,replaceColor:e.replaceColor,src:e.src})}}class no{gif=!1;height;name;replaceColor;src="";width;load(t){T(t)||(Kt(this,"gif",t.gif),Kt(this,"height",t.height),Kt(this,"name",t.name),Kt(this,"replaceColor",t.replaceColor),Kt(this,"src",t.src),Kt(this,"width",t.width))}}class ao{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return Qr});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new no;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function oo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={gif:i.gif,name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.gif?t=>io(t,{colorSpace:"srgb"}):i.replaceColor?Ga:$a,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new ao(t)),t.pluginManager.addShape(Wa,e=>Promise.resolve(new so(t,e)))})}class ro extends ye{sync=!1;load(t){T(t)||(super.load(t),Kt(this,"sync",t.sync))}}class lo extends ye{sync=!1;load(t){T(t)||(super.load(t),Kt(this,"sync",t.sync))}}class co{count=0;delay=new ro;duration=new lo;load(t){T(t)||(Kt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class ho{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?q(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?q(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ee(t,"life",co,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=$(0,i.width),o=$(0,i.width);t.position.x=H(a),t.position.y=H(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=q(l.delay.value)*r,s.duration=q(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function uo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new ho(t)))})}class po{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function go(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new po))})}class fo{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!T(t)&&(Zt(this,"distance",t.distance),Kt(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 yo extends yi{#B;constructor(t){super(t),this.#B=0}get maxDistance(){return this.#B}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(T(t.attractDistance)){const i=q(t.options.attract.distance);i>this.#B&&(this.#B=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,s=t.getPosition(),n=e.particles.grid.queryCircle(s,i);for(const e of n){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:a}=G(s,i),o=t.options.attract.rotate,r=n/(1e3*o.x),l=a/(1e3*o.y),c=e.size.value/t.size.value,h=1/c;t.velocity.x-=r*c,t.velocity.y-=l*c,e.velocity.x+=r*h,e.velocity.y+=l*h}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ee(t,"attract",fo,...e)}reset(){}}async function mo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new yo(t)))})}var vo;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(vo||(vo={}));class bo{speed=2;load(t){T(t)||Kt(this,"speed",t.speed)}}class wo{enable=!0;retries=0;load(t){T(t)||(Kt(this,"enable",t.enable),Kt(this,"retries",t.retries))}}class xo{absorb=new bo;bounce=new De;enable=!1;maxSpeed=50;mode=vo.bounce;overlap=new wo;load(t){T(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Kt(this,"enable",t.enable),Zt(this,"maxSpeed",t.maxSpeed),Kt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function Po(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=V(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const Mo=t=>{t.options.collisions&&(t.collisionMaxSpeed??=q(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function ko(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;yt(ft(t),ft(e));const r=t.velocity.length,l=e.velocity.length,c=i*r*r+s*l*l;if(c>1e-6*o){const i=Math.sqrt(o/c);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=l*i)}Mo(t),Mo(e)}function Co(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case vo.absorb:!function(t,e,i,s){const n=t.getRadius(),a=e.getRadius();!n&&a?t.destroy():n&&!a?e.destroy():n&&a&&(n>=a?Po(t,n,e,a,i,s):Po(e,a,t,n,i,s))}(t,e,i,s);break;case vo.bounce:ko(t,e);break;case vo.destroy:!function(t,e){t.unbreakable||e.unbreakable||ko(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class Do extends yi{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=this.container,n=t.getPosition(),a=t.getRadius(),o=s.particles.grid.queryCircle(n,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(n.z)-Math.round(o.z))>a+r)continue;X(n,o)>a+r||Co(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ee(t,"collisions",xo,...e)}reset(){}}class Oo{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return Kr});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function zo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{Si(t),t.pluginManager.addPlugin(new Oo),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new Do(t)))})}class So extends Nt{#st;constructor(t,e,i,s){super(t,e,i),this.#st=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#st,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#st,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Nt)n=new Nt(i.x,i.y,t.radius);else{const e=t;n=new Xt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Io{blur=5;color=new oe;enable=!1;constructor(){this.color.value="#000"}load(t){T(t)||(Kt(this,"blur",t.blur),this.color=oe.create(this.color,t.color),Kt(this,"enable",t.enable))}}class To{color;enable=!1;frequency=1;opacity;load(t){T(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Kt(this,"enable",t.enable),Kt(this,"frequency",t.frequency),Kt(this,"opacity",t.opacity))}}class Eo{blink=!1;color=new oe;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new Io;triangles=new To;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){T(t)||(Kt(this,"id",t.id),Kt(this,"blink",t.blink),this.color=oe.create(this.color,t.color),Kt(this,"consent",t.consent),Kt(this,"distance",t.distance),Kt(this,"enable",t.enable),Kt(this,"frequency",t.frequency),Kt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Kt(this,"width",t.width),Kt(this,"warp",t.warp))}}function Ro(t,e,i){const{dx:s,dy:n}=G(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class _o extends yi{#B;#p;constructor(t,e){super(e),this.#p=t,this.#B=0}get maxDistance(){return this.#B}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#B&&(this.#B=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<l.x||e.y<l.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,r=n.warp,c=r?new So(e.x,e.y,o,s):new Nt(e.x,e.y,o),h=i.particles.grid.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||n.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<l.x||h.y<l.y||h.x>s.width||h.y>s.height)continue;const d=G(e,h).distance,u=r&&c.warp?Ro(e,h,s):d,p=Math.min(d,u);if(p>o)continue;const g=(1-p/o)*a;this.#nt(t),t.links.push({destination:i,opacity:g,color:this.#at(t,i),isWarped:u<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ee(t,"links",Eo,...e)}reset(){}#at(t,e){const i=this.container,s=t.options.links;if(!s)return;return Qe(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#nt(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=Ke(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Ao{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return Jr});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Lo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;Si(t),e.addPlugin(new Ao(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new _o(e,t)))})}const Fo=new Map;function Bo(t,e){const{context:i,radius:s}=t,n=function(t){const e=Fo.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Fo.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Vo{draw(t){const{particle:e,radius:i}=t;Bo(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}}class Uo extends Vo{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Ho extends Vo{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function qo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Uo))})}async function Wo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Ho))})}async function jo(t){t.checkVersion("4.2.1"),await Promise.all([qo(t),Wo(t)])}class $o{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Kt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Kt(this,"sync",t.sync))}}class Go extends ye{animation=new $o;direction=t.RotateDirection.clockwise;path=!1;load(t){T(t)||(super.load(t),Kt(this,"direction",t.direction),this.animation.load(t.animation),Kt(this,"path",t.path))}}class No{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Q(q(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-q(n.decay),e.rotate.velocity=q(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ee(t,"rotate",Go,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(sn(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Xo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new No(t)))})}class Yo{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Qo(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Yo))})}const Ko=0,Zo=0;class Jo{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(Ko,Zo-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(Ko,Zo-s*a),e.rotate(Math.PI/n),e.lineTo(Ko,Zo-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=q(i?.inset??2)}}async function tr(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Jo))})}async function er(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Cn(t),(async t=>{await async function(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new gi(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,Ct(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([Pa(t),Vn(t),Xn(t),ia(t),la(t),ga(t),ba(t),Ca(t),Sa(t),Ra(t),Va(t),qa(t),mo(t),zo(t),Lo(t)])})(t),On(t),Rn(t),oo(t),go(t),jo(t),Qo(t),tr(t),uo(t),yn(t),Xo(t)])})}const ir=["text","character","char","multiline-text"];function sr(t,e,i,s,n,a){const r={x:-e.length*i*o,y:i*o+s*i};n&&t.fillText(e,r.x,r.y),a&&t.strokeText(e,r.x,r.y)}class nr{draw(t){!function(t){const{context:e,particle:i,fill:s,stroke:n,radius:a,opacity:o}=t,r=i.shapeData;if(!r)return;const l=r.value;if(i.textLines??=vt(l,i.randomIndexData)?.split("\n")??[],i.maxTextLength??=i.textLines.length?Math.max(...i.textLines.map(t=>t.length)):i.textLines[0]?.length??0,!i.textLines.length||!i.maxTextLength)return;const c=i.textLines,h=r.style??"",d=r.weight??"400",u=r.font??"Verdana",p=2*Math.round(a)/(c.length*i.maxTextLength);e.font=`${h} ${d} ${p.toString()}px "${u}"`;const g=e.globalAlpha;e.globalAlpha=o;for(let t=0;t<c.length;t++){const i=c[t];i&&sr(e,i,p,t,s,n)}e.globalAlpha=g}(t)}async init(t){const e=t.actualOptions;if(ir.find(t=>ct(t,e.particles.shape.type))){const t=ir.map(t=>e.particles.shape.options[t]).find(t=>!!t),i=[];mt(t,t=>{i.push(In(t.font,t.weight))}),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!ir.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;s&&(e.textLines=vt(s,e.randomIndexData)?.split("\n")??[],e.maxTextLength=e.textLines.length?Math.max(...e.textLines.map(t=>t.length)):e.textLines[0]?.length??0)}}async function ar(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(ir,()=>Promise.resolve(new nr))})}var or;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(or||(or={}));class rr{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Kt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Kt(this,"sync",t.sync))}}class lr extends ye{animation=new rr;direction=or.clockwise;enable=!1;load(t){super.load(t),T(t)||(this.animation.load(t.animation),Kt(this,"direction",t.direction),Kt(this,"enable",t.enable))}}class cr{#u;constructor(t){this.#u=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(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:Q(q(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===or.random){s=Math.floor(2*A())>0?or.counterClockwise:or.clockwise}switch(s){case or.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case or.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-q(n.decay),e.tilt.velocity=q(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ee(t,"tilt",lr,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&sn(e,e.tilt,!1,t.DestroyType.none,i)}}async function hr(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new cr(t)))})}class dr{color;enable=!1;frequency=.05;opacity=1;load(t){T(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Kt(this,"enable",t.enable),Kt(this,"frequency",t.frequency),Zt(this,"opacity",t.opacity))}}class ur{enable=!1;fillColor;frequency=.05;opacity=1;strokeColor;load(t){T(t)||(void 0!==t.fillColor&&(this.fillColor=oe.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=oe.create(this.strokeColor,t.strokeColor)),Kt(this,"enable",t.enable),Kt(this,"frequency",t.frequency),Zt(this,"opacity",t.opacity))}}class pr{links=new dr;particles=new ur;load(t){T(t)||(this.links.load(t.links),this.particles.load(t.particles))}}class gr{#u;#p;constructor(t,e){this.#p=t,this.#u=e}getColorStyles(t,e,i,s){const n=t.options,a=this.#u,o=n.twinkle;if(!o)return{};const r=o.particles,l=r.enable&&A()<r.frequency,c=t.options.zIndex,h=(1-t.zIndexFactor)**c.opacityRate,d=l?q(r.opacity)*h:s,u=Ue(this.#p,r.fillColor),p=Ue(this.#p,r.strokeColor),g=(()=>{if(u)return Xe(u,a.hdr,d)})(),f=(()=>{if(p)return Xe(p,a.hdr,d)})(),y={},m=l&&(!!g||!!f);return y.fill=m?g:void 0,y.stroke=m?f:void 0,y}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){ee(t,"twinkle",pr,...e)}update(){}}async function fr(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("twinkle",e=>Promise.resolve(new gr(t.pluginManager,e)))})}class yr{angle=50;move=10;load(t){T(t)||(Zt(this,"angle",t.angle),Zt(this,"move",t.move))}}class mr{distance=5;enable=!1;speed=new yr;load(t){if(!T(t)&&(Zt(this,"distance",t.distance),Kt(this,"enable",t.enable),void 0!==t.speed))if(z(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class vr{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:q(e.speed.angle)/360,moveSpeed:q(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=q(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){ee(t,"wobble",mr,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function br(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new vr(t)))})}async function wr(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=async t=>{await gs(t),await Promise.all([ms(t),Ps(t)])};await Promise.all([(async t=>{await er(t),await Promise.all([Ds(t),Rs(t),Vi(t),e(t)])})(t),Qi(t),Bs(t),hr(t),fr(t),br(t),ar(t)])})}const xr=globalThis;xr.loadFull=wr,xr.tsParticles=ni;function Pr(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Mr{#ot;#rt;#lt;#ct;#ht;#u;#dt;#ut;#pt;#gt;#ft;#yt;#mt;#vt;#p;#bt;#wt;#xt={};#Pt=[void 0,void 0];#Mt={};constructor(t,e,i){this.#p=t,this.#u=e,this.#rt=i,this.#dt=null,this.#wt=[],this.#bt=[],this.#ht=[],this.#ot=[],this.#lt=[],this.#ct=[],this.#pt=[],this.#gt=[],this.#ft=[],this.#yt=[],this.#vt=[],this.#mt=[]}get settings(){return this.#ut}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#rt.size.width,this.#rt.size.height)})}clear(){let t=!1;for(const e of this.#ot)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#wt=[],this.#bt=[],this.#ht=[],this.#ot=[],this.#lt=[],this.#ct=[],this.#pt=[],this.#gt=[],this.#ft=[],this.#yt=[],this.#vt=[],this.#mt=[]}draw(t){const e=this.#dt;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(),n=t.getStrokeColor();let[a,o]=this.#kt(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#Mt,g=this.#xt,f=a?Xe(a,r.hdr,h*d):void 0,y=o?Xe(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this.#ft)i.drawParticleSetup?.(s,t,e);this.#Ct(s,t,i,d,g,p),this.#Dt({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#Ot(t);for(const i of this.#gt)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#pt)this.#zt(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#vt)e.drawSettingsSetup?.(i,t);for(const e of this.#yt)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#ct)e.clearDraw?.(i,t);for(const e of this.#mt)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#ht=[],this.#ot=[],this.#lt=[],this.#ct=[],this.#pt=[],this.#ft=[],this.#gt=[],this.#yt=[],this.#vt=[],this.#mt=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#ht.push(t),t.canvasClear&&this.#ot.push(t),t.canvasPaint&&this.#lt.push(t),t.drawParticle&&this.#pt.push(t),t.drawParticleSetup&&this.#ft.push(t),t.drawParticleCleanup&&this.#gt.push(t),t.draw&&this.#yt.push(t),t.drawSettingsSetup&&this.#vt.push(t),t.drawSettingsCleanup&&this.#mt.push(t),t.clearDraw&&this.#ct.push(t)}initUpdaters(){this.#wt=[],this.#bt=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#bt.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#wt.push(t)}paint(){let t=!1;for(const e of this.#lt)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#rt.size.width,this.#rt.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#rt.size.width,this.#rt.size.height),i.globalAlpha=s})}setContext(t){this.#dt=t,this.#dt&&(this.#dt.globalCompositeOperation=i)}setContextSettings(t){this.#ut=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#rt.size.width,this.#rt.size.height)})}#Ot(t){for(const e of this.#bt)e.afterDraw?.(t)}#Ct(t,e,i,s,n,a){for(const o of this.#wt){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Pr(a,t,e)}o.beforeDraw?.(e)}}#St(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#It(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#Dt(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#It(m,y),this.#Tt(v,y),this.#Et(v,y),this.#Rt(v,y),this.#St(m,y),i.resetTransform()}#zt(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Et(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#Rt(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Tt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#kt(t){let e,i;for(const s of this.#ht)if(!e&&s.particleFillColor&&(e=Ue(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ue(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#Pt[0]=e,this.#Pt[1]=i,this.#Pt}}const kr=new WeakMap;function Cr(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Dr{domElement;render;renderCanvas;size;zoom=1;#u;#_t;#At;#Lt;#p;#Ft;#Bt;#Vt;#Ut;constructor(t,e){this.#p=t,this.#u=e,this.render=new Mr(t,e,this),this.#Vt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#Vt;this.size={height:s.height*i,width:s.width*i},this.#_t=!1,this.#Bt=[],this.#Ft="none"}get#Ht(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#_t){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#qt();this.render.destroy(),this.#Bt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Ut?this.#Ut:{x:e*o/t,y:i*o/t}}init(){this.#Wt(t=>{t.disconnect()}),this.#At=lt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#jt()}),this.resize(),this.#$t(),this.initBackground(),this.#Wt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Gt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Be(this.#p,e.color);s.backgroundColor=n?Ne(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#Bt=[];for(const t of this.#u.plugins)t.resize&&this.#Bt.push(t)}loadCanvas(t){this.#_t&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#_t=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=kr.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return kr.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Lt=wt(s.style));const n=this.#Vt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#Vt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Ft=t,this.#jt())}setZoom(t,e){this.zoom=t,this.#Ut=e}stop(){this.#Wt(t=>{t.disconnect()}),this.#At=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Nt(),e&&await t.refresh()}#Nt(){for(const t of this.#Bt)t.resize?.()}#Gt(){const t=this.#u.actualOptions.hdr&&rt("(color-gamut: p3)")?.matches&&rt("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#$t(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Ht?this.#Xt():this.#qt();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#jt(){const t=this.domElement;if(!t)return;this.#Wt(t=>{t.disconnect()}),this.#$t(),this.initBackground();const e=this.#Ft;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Wt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#qt(){const t=this.domElement,e=this.#Lt;t&&e&&Cr(t,e,!0)}#Wt(t){this.#At&&t(this.#At)}#Xt(){const t=this.domElement;t&&Cr(t,Mt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Or{#u;#Yt;#Qt;#Kt;constructor(t){this.#u=t,this.#Yt={visibilityChange:()=>{this.#Zt()},resize:()=>{this.#Jt()}}}addListeners(){this.#te(!0)}removeListeners(){this.#te(!1)}#Zt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(ot().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Jt(){this.#Kt&&(clearTimeout(this.#Kt),this.#Kt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#Kt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#te(t){const e=this.#Yt;this.#ee(t),kt(document,n,e.visibilityChange,t,!1)}#ee(t){const e=this.#Yt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void kt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#Qt&&!t?(n&&this.#Qt.unobserve(n),this.#Qt.disconnect(),this.#Qt=void 0):!this.#Qt&&t&&n&&(this.#Qt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#Jt()}),this.#Qt.observe(n))}}function zr(t){if(!ct(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)}function Sr(t,e){const i=t%e;return i<0?i+e:i}function Ir(t,e,i,s){const n=Re(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,a),t.shape=vt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===h){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===h){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},vt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return gt({close:e.close},vt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class Tr{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#ie={fillOpacity:1,opacity:1,strokeOpacity:1};#se=k.origin;#ne={sin:0,cos:0};#ae={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#oe(this.bubble.color??Ze(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#ie.fillOpacity=i*s*e,this.#ie.opacity=i*e,this.#ie.strokeOpacity=i*n*e,this.#ie}getPosition(){return this.#se.x=this.position.x+this.offset.x,this.#se.y=this.position.y+this.offset.y,this.#se.z=this.position.z,this.#se}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ne.sin=Math.sin(t),this.#ne.cos=Math.cos(t),this.#ne}getStrokeColor(){return this.#oe(this.bubble.color??Ze(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#ae.a=e.cos*(t.a??c.a),this.#ae.b=i?e.sin*(t.b??1):t.b??c.b,this.#ae.c=i?-e.sin*(t.c??1):t.c??c.c,this.#ae.d=e.cos*(t.d??c.d),this.#ae}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Ir(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#re(i),this.initialVelocity=this.#le(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#ce({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ce({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Sr(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Sr(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Sr(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#he(t,e){let i=0,s=t?k.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return k.create(i.x,i.y,e)}const t=it({size:l,position:s}),c=k.create(t.x,t.y,e);this.#de(c,r,o.left??o.default),this.#de(c,r,o.right??o.default),this.#ue(c,r,o.top??o.default),this.#ue(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#le(){const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Q(q(e.angle.value)),n=Q(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=H($(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#de(e,i,s){zr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#ue(e,i,s){zr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#pe(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#ge(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#ce(t){const e=this.#pe(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#ge(t.direction,t.outMode),l=a?this.#fe(a(r),"shape"):void 0,c=o?this.#fe(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#oe(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?si(t,this.roll.alter.type,this.roll.alter.value):t:t}#re(e){const i=this.#u,s=Math.floor(q(this.options.zIndex.value)),n=this.#he(e,V(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...bt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=K(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=C.origin}#fe(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Er{#ye;#me=new Map;#ve=[];#be;#we;#xe=[];#Pe;constructor(t){this.#ye=t,this.#be=0,this.#Pe=0}clear(){this.#me.clear();const t=this.#we;t&&(this.#ye=t),this.#we=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Me(e,i);this.#me.has(s)||this.#me.set(s,[]),this.#me.get(s)?.push(t)}query(t,e,i=[]){const s=this.#ke(t);if(!s)return i;const n=Math.floor(s.minX/this.#ye),a=Math.floor(s.maxX/this.#ye),o=Math.floor(s.minY/this.#ye),r=Math.floor(s.maxY/this.#ye);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#me.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Ce(t.x,t.y,e),a=this.query(n,i,s);return this.#De(),a}queryRectangle(t,e,i,s=[]){const n=this.#Oe(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#De(),a}setCellSize(t){this.#we=t}#Ce(t,e,i){return(this.#ve[this.#be++]??=new Nt(t,e,i)).reset(t,e,i)}#Oe(t,e,i,s){return(this.#xe[this.#Pe++]??=new Xt(t,e,i,s)).reset(t,e,i,s)}#Me(t,e){return`${Math.floor(t/this.#ye)}_${Math.floor(e/this.#ye)}`}#ke(t){if(t instanceof Nt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Xt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#De(){this.#be=0,this.#Pe=0}}class Rr{checkParticlePositionPlugins;grid;#ze;#u;#Se;#Ie;#Te;#Ee;#Re;#_e;#p;#Ae;#Le;#Fe;#Be;#Ve;#Ue;constructor(t,e){this.#p=t,this.#u=e,this.#Te=0,this.#ze=[],this.#Ae=[],this.#Ie=0,this.#Se=new Map,this.#Ee=new Map,this.#Ue=this.#He(this.#u.zLayers),this.grid=new Er(100),this.checkParticlePositionPlugins=[],this.#Re=[],this.#_e=[],this.#Fe=[],this.#Le=[],this.#Ve=[]}get count(){return this.#ze.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Ie:this.#Se.get(s)??this.#Ie,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Ae.pop()??new Tr(this.#p,this.#u);a.init(this.#Te,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#ze.push(a),this.#qe(a),this.#Te++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ae.push(a)}catch(t){Et().warning(`error adding particle: ${t}`)}}clear(){this.#ze=[],this.#Ee.clear(),this.#We(this.#u.zLayers)}destroy(){this.#ze=[],this.#Ae.length=0,this.#Ee.clear(),this.#Ue=[],this.checkParticlePositionPlugins=[],this.#Re=[],this.#_e=[],this.#Fe=[],this.#Le=[],this.#Ve=[]}drawParticles(t){for(let e=this.#Ue.length-1;e>=0;e--){const i=this.#Ue[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#ze.filter(t)}find(t){return this.#ze.find(t)}get(t){return this.#ze[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Ve=[],this.#_e=[],this.#Fe=[],this.#Re=[],this.#Le=[],this.#Ee.clear(),this.#We(t.zLayers),this.grid=new Er(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ve.push(e),e.particleUpdate&&this.#_e.push(e),e.postUpdate&&this.#Fe.push(e),e.particleReset&&this.#Re.push(e),e.postParticleUpdate&&this.#Le.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)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 n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#ze.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#je(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Re(this.#p,this.#u,s);this.#$e(n,i,t)}this.#$e(t.particles,i)}setResizeFactor(t){this.#Be=t}update(t){this.grid.clear();for(const e of this.#Ve)e.update?.(t);const e=this.#Ge(t);for(const e of this.#Fe)e.postUpdate?.(t);if(this.#Ne(t,e),e.size)for(const t of e)this.remove(t);this.#Be=void 0}#Xe(...t){this.#Ae.push(...t)}#$e(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Ie=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Se.set(i,s?.number.limit.value??n.limit.value));const a=this.#Ye(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Ie=n.limit.value*a:this.#Se.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#He(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Qe(t){const e=this.#Ue.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Ye(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#qe(t){const e=this.#Qe(t.position.z),i=this.#Ue[e];i&&(i.push(t),this.#Ee.set(t.id,e))}#je(e,i,s){const n=this.#ze[e];return!!n&&(n.group===i&&(this.#ze.splice(e,1),this.#Ke(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#Xe(n),!0))}#Ke(t){const e=this.#Ee.get(t.id)??this.#Qe(t.position.z),i=this.#Ue[e];if(!i)return void this.#Ee.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Ee.delete(t.id)}#We(t){const e=Math.max(Math.floor(t),1);if(this.#Ue.length===e)for(const t of this.#Ue)t.length=0;else this.#Ue=this.#He(e)}#Ze(t){const e=this.#Qe(t.position.z),i=this.#Ee.get(t.id);if(void 0===i)return void this.#qe(t);if(i===e)return;const s=this.#Ue[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#Ue[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Ee.set(t.id,e)}else this.#Ee.set(t.id,e)}#Ge(t){const e=new Set,i=this.#Be;for(const s of this.#ze){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#Re)t.particleReset?.(s);for(const e of this.#_e){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#Ne(t,e){for(const i of this.#ze)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Le)e.postParticleUpdate?.(i,t);this.#Ze(i)}}}class _r{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Ar(t){return!t.destroyed}function Lr(t,e,...i){const s=new _e(t,e);return Qt(s,...i),s}var Fr=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#I;#Je;#ti={value:0,factor:0};#ei;#ii;#si;#ni;#ai;#oi;#ri;#li;#ci;#hi;#di;#p;#ui;#pi;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ei=i,this.#ci=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#ui=!1,this.#I=0,this.#si=0,this.#li=0,this.#ai=!0,this.started=!1,this.destroyed=!1,this.#di=!0,this.#ri=0,this.zLayers=100,this.pageHidden=!1,this.#pi=o,this.#oi=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new _r(this),this.canvas=new Dr(this.#p,this),this.particles=new Rr(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#hi=Lr(this.#p,this),this.actualOptions=Lr(this.#p,this),this.#ni=new Or(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#di&&!this.pageHidden&&Ar(this)}get options(){return this.#hi}get sourceOptions(){return this.#pi}addLifeTime(t){this.#li+=t}alive(){return!this.#si||this.#li<=this.#si}destroy(e=!0){if(Ar(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#ci(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ei(t,{container:this,data:e})}draw(t){if(!Ar(this))return;let e=t;this.#ii=F(t=>{e&&(this.#ri=void 0,e=!1),this.#gi(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}Et().error(`Export plugin with type ${t} not found`)}async init(){if(!Ar(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#hi=Lr(this.#p,this,this.#oi,this.sourceOptions),this.actualOptions=Lr(this.#p,this,this.#hi),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this.#si=q(s)*r,this.#I=q(i)*r,this.#li=0,this.fpsLimit=n>0?n:120,this.#ui=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(Ar(this)&&(void 0!==this.#ii&&(B(this.#ii),this.#ii=void 0),!this.#di)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#di=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Ar(this))return;const i=this.#di||e;if(!this.#ai||this.actualOptions.autoPlay){if(this.#di&&(this.#di=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ai=!1}async refresh(){if(Ar(this))return this.stop(),this.start()}async reset(t){if(Ar(this))return this.#oi=t,this.#pi=t,this.#hi=Lr(this.#p,this,this.#oi,this.sourceOptions),this.actualOptions=Lr(this.#p,this,this.#hi),this.refresh()}async start(){Ar(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#ni.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Je=setTimeout(()=>{i()},this.#I)}))}stop(){if(Ar(this)&&this.started){this.#Je&&(clearTimeout(this.#Je),this.#Je=void 0),this.#ai=!0,this.started=!1,this.#ni.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#pi=this.#hi,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#gi(t){try{if(!this.#ui&&void 0!==this.#ri&&t<this.#ri+r/this.fpsLimit)return void this.draw(!1);if(this.#ri??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ti,t-this.#ri,this.fpsLimit,this.#ui),this.addLifeTime(this.#ti.value),this.#ri=t,this.#ti.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ti),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Et().error("error in animation loop",t)}}}});class Br{#fi=!0;#yi;#u;#Yt;#mi;#vi;constructor(t,e){this.#u=t,this.#yi=[],this.#mi=e,this.#vi=new Map,this.#Yt={mouseDown:()=>{this.#bi()},mouseLeave:()=>{this.#wi()},mouseMove:t=>{this.#xi(t)},mouseUp:t=>{this.#Pi(t)},touchStart:t=>{this.#Mi(t)},touchMove:t=>{this.#xi(t)},touchEnd:t=>{this.#ki(t)},touchCancel:t=>{this.#ki(t)},touchEndClick:t=>{this.#Ci(t)},visibilityChange:()=>{this.#Zt()}}}addListeners(){this.#te(!0)}init(){this.#yi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#yi.push(t)}removeListeners(){this.#te(!1)}#Di(t){const e=this.#u,i=this.#mi,s=e.actualOptions;if(this.#fi){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;mt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#wi()},500)}#Zt(){this.#wi()}#Oi(t){const e=this.#Yt,i=this.#u,s=this.#mi,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(kt(a,wi,e.mouseMove,t),kt(a,xi,e.touchStart,t),kt(a,Mi,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(kt(a,Pi,e.touchEndClick,t),kt(a,vi,e.mouseUp,t),kt(a,mi,e.mouseDown,t)):kt(a,Pi,e.touchEnd,t):(kt(a,Pi,e.touchEndClick,t),kt(a,vi,e.mouseUp,t),kt(a,mi,e.mouseDown,t),kt(a,Pi,e.touchEnd,t)),kt(a,bi,e.mouseLeave,t),kt(a,ki,e.touchCancel,t))}#te(t){const e=this.#Yt,i=this.#u,s=this.#mi,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===ri.window?s.interactivityData.element=ot():o===ri.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#Oi(t),kt(document,n,e.visibilityChange,t,!1)}#bi(){const{interactivityData:t}=this.#mi,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Pi(t){const e=this.#u,i=this.#mi,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this.#yi)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Di(t),n.clicking=!1}}#wi(){const{interactivityData:t}=this.#mi,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=bi,e.inside=!1,e.clicking=!1}#xi(t){const e=this.#u,i=this.#mi,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#fi=!0;const e=t;if(n.element===ot()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===ri.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#fi="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=wi}#ki(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#vi.delete(t.identifier);this.#wi()}#Ci(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#vi.delete(t.identifier);this.#Pi(t)}#Mi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#vi.set(t.identifier,performance.now());this.#xi(t)}}class Vr{interactivityData;#zi;#u;#ni;#Si;#Ii;#Ti;#Ei;#p;constructor(t,e){this.#u=e,this.#p=t,this.#Ii=[],this.#Si=[],this.#Ei=[],this.#zi=new Map,this.#ni=new Br(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Ti=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Ri(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#zi.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#zi.set(xi,()=>{e.destroyed||(a=!0,o=!1)}),this.#zi.set(Mi,()=>{e.destroyed||(o=!0)}),this.#zi.set(Pi,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#zi.set(ki,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#zi)s.addEventListener(t,e)}addListeners(){this.#ni.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#zi)e.element?.removeEventListener(t,i);this.#zi.clear()}}externalInteract(t){for(const e of this.#Si){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#Si)i.handleClickMode?.(t,e)}init(){this.#ni.init();for(const t of this.#Ii){switch(t.type){case li.external:this.#Si.push(t);break;case li.particles:this.#Ei.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#Ii=t,this.#Si=[],this.#Ei=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Si)i.clear(t,e);for(const s of this.#Ei)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#ni.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Si)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Ei)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Ti&&this.#Ti.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Ti&&this.#Ti.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#Ii)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Ri(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var Ur=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new Vr(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new pi(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var Hr=Object.freeze({__proto__:null,AbsorbersInstancesManager:class{#_i;#p;constructor(t){this.#p=t,this.#_i=new Map}async addAbsorber(t,e,i){const{AbsorberInstance:s}=await Promise.resolve().then(function(){return il}),n=new s(this.#p,t,e,i);return this.getArray(t).push(n),n}clear(t){this.initContainer(t),this.#_i.set(t,[])}getArray(t){this.initContainer(t);let e=this.#_i.get(t);return e||(e=[],this.#_i.set(t,e)),e}initContainer(t){this.#_i.has(t)||(this.#_i.set(t,[]),t.getAbsorber??=e=>{const i=this.getArray(t);return void 0===e||z(e)?i[e??0]:i.find(t=>t.name===e)},t.addAbsorber??=(e,i)=>this.addAbsorber(t,e,i))}removeAbsorber(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var qr=Object.freeze({__proto__:null,AbsorbersPluginInstance:class{#u;#v;constructor(t,e){this.#u=t,this.#v=e,this.#v.initContainer(t)}draw(t){for(const e of this.#v.getArray(this.#u))e.draw(t)}async init(){const t=mt(this.#u.actualOptions.absorbers,async t=>{await this.#v.addAbsorber(this.#u,t)});I(t)?await Promise.all(t):await t}particleUpdate(t,e){for(const i of this.#v.getArray(this.#u))if(i.attract(t,e),t.destroyed)break}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}}});const Wr=new Map;var jr=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Wr.set(t,e)}getShapeGenerator(t){return Wr.get(t)}getSupportedShapeGenerators(){return Wr.keys()}}});var $r=Object.freeze({__proto__:null,EmittersInstancesManager:class{#_i;#p;constructor(t){this.#_i=new Map,this.#p=t}async addEmitter(t,e,i){const s=new ss;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return al}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#_i.set(t,[])}getArray(t){this.initContainer(t);let e=this.#_i.get(t);return e||(e=[],this.#_i.set(t,e)),e}initContainer(t){this.#_i.has(t)||(this.#_i.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||z(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Gr=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#v;constructor(t,e){this.#v=t,this.#u=e,this.#v.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#v.addEmitter(this.#u,e);else await this.#v.addEmitter(this.#u,t)}pause(){for(const t of this.#v.getArray(this.#u))t.pause()}play(){for(const t of this.#v.getArray(this.#u))t.play()}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}update(t){this.#v.getArray(this.#u).forEach(e=>{e.update(t)})}}});var Nr=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Ai;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ai&&(t.globalCompositeOperation=this.#Ai)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ai=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Xr(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var Yr=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-q(i.decay),e.pathDelay=q(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:q(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=X(i.getPosition(),a),r=q(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,h=e.size.max,d=l*(s.size?e.getRadius()/h:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,d,r):Xr(e,s,d,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#Li()}redrawInit(){return this.#Li()}update(){for(const t of this.pathGenerators.values())t.update()}async#Li(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Qr=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var Kr=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#Fi(t,e,i)}#Fi(t,e,i){const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const a=n.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>X(e,i.position)<t.getRadius()+i.getRadius())}}});function Zr(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=A(),e.set(i,n)),n}var Jr=Object.freeze({__proto__:null,LinkInstance:class{#Bi=new Map;#u;#Vi;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Vi={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,a=e.retina.linksWidth??0,r=e.getPosition(),c=e.options.twinkle?.links,h=n.triangles.enable,d=h?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,y=!1;const m=()=>{y&&(t.stroke(),y=!1)};for(const u of i){if(n.frequency<1&&this.#Ui(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(h&&!u.isWarped&&d&&(m(),this.#Hi(s,e,u,d,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,b=u.color;const w=c?.enable&&A()<c.frequency?Be(this.#p,c.color):void 0;if(c&&w&&(b=w,v=q(c.opacity)),!b){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;b=Qe(e,u.destination,t)}if(!b)continue;const x=this.#qi(b);if(x===p&&a===g&&v===f||(m(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),y=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=l.x,c=l.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(c=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+c),t.moveTo(r.x-a,r.y-c),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}m(),t.globalAlpha=u}init(){return this.#Vi.links.clear(),this.#Vi.triangles.clear(),this.#Bi.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#Hi(t,e,i,s,n,a,r){const l=i.destination,c=t.links?.triangles;if(!c?.enable||!l.options.links?.triangles.enable)return;const h=l.links;if(h?.length)for(const d of h){if(d.isWarped||this.#Ui(l,d.destination)>l.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this.#Wi(e,l,h)>(t.links?.triangles.frequency??0))continue;const u=c.opacity??(i.opacity+d.opacity)*o,p=Be(this.#p,c.color)??i.color;if(!p||u<=0)continue;const g=h.getPosition();r.save(),r.fillStyle=this.#qi(p),r.globalAlpha=u,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#qi(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#Bi.get(e);return i||(i=Ne(t,this.#u.hdr),this.#Bi.set(e,i)),i}#Ui(t,e){return Zr([t,e],this.#Vi.links)}#Wi(t,e,i){return Zr([t,e,i],this.#Vi.triangles)}}});const tl=u,el=1/360;var il=Object.freeze({__proto__:null,AbsorberInstance:class{color;limit;mass;name;opacity;options;position;size;#u;#ji;#$i;#si;#Gi;#Ni;#Xi;#Yi;#p;#Qi;constructor(t,e,i,s){this.#u=e,this.#p=t,this.#ji=0,this.#$i=0,this.#Xi=s?C.create(s.x,s.y):void 0,i instanceof Ri?this.options=i:(this.options=new Ri,this.options.load(i)),this.name=this.options.name,this.opacity=this.options.opacity,this.size=q(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const n=this.options.size.limit;this.limit={radius:n.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:n.mass},this.color=Be(this.#p,this.options.color)??{b:0,g:0,r:0},this.position=this.#Xi?.copy()??this.#he(),this.#Gi=!this.options.life.wait,this.#Yi=this.options.life.count??-1,this.#Ni=this.#Yi<=0,this.#Qi=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0}attract(t,e){const i=this.#u,s=this.options,n=t.getPosition(),{dx:a,dy:o,distance:r}=G(this.position,n),l=C.create(a,o);if(l.length=this.mass/Math.pow(r,2)*i.retina.reduceFactor,r<this.size+t.getRadius()){const n=.033*t.getRadius()*i.retina.pixelRatio*e.factor;this.size>t.getRadius()&&r<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?s.destroy?t.destroy():(t.needsNewPosition=!0,this.#Ki(t,e,l)):(s.destroy&&(t.size.value-=n),this.#Ki(t,e,l)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=n),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=n*this.options.size.density*i.retina.reduceFactor)}else this.#Ki(t,e,l)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(l.x,l.y,this.size,0,tl,!1),t.closePath(),t.fillStyle=Ne(this.color,this.#u.hdr,this.opacity),t.fill()}resize(){const t=this.#Xi;this.position=t&&dt(t,this.#u.canvas.size,C.origin)?t:this.#he()}update(t){this.#Gi&&(this.#Gi=!1,this.#$i=this.#Qi??0),void 0!==this.#si&&(this.#ji+=t.value,this.#ji>=this.#si&&(this.#Ni||this.#Yi--,(this.#Yi>0||this.#Ni)&&(this.position=this.#he(),this.#Qi=this.#u.retina.reduceFactor?q(this.options.life.delay??0)*r/this.#u.retina.reduceFactor:1/0),this.#ji-=this.#si,this.#si=void 0)),void 0!==this.#Qi&&(this.#$i+=t.value,this.#$i>=this.#Qi&&(this.#Zi(),this.#$i-=this.#Qi,this.#Qi=void 0))}#he(){const t=et({size:this.#u.canvas.size,position:this.options.position});return C.create(t.x,t.y)}#Zi(){(this.#Yi>0||this.#Ni||!this.options.life.count)&&(this.#Gi||this.#$i>=(this.#Qi??0))&&(this.#Yi>0||this.#Ni)&&this.#Ji()}#Ji(){const t=void 0!==this.options.life.duration?q(this.options.life.duration):void 0;(this.#Yi>0||this.#Ni)&&void 0!==t&&t>0&&(this.#si=t*r)}#Ki(e,i,s){if(e.destroyed)return;const n=this.#u,a=n.canvas.size;if(e.needsNewPosition){const t=tt({size:a});e.position.setTo(t),e.velocity.setTo(e.initialVelocity),e.absorberOrbit=void 0,e.needsNewPosition=!1}if(this.options.orbits){if(void 0===e.absorberOrbit&&(e.absorberOrbit=C.origin,e.absorberOrbit.length=X(e.getPosition(),this.position),e.absorberOrbit.angle=A()*tl),e.absorberOrbit.length<=this.size&&!this.options.destroy){const t=Math.min(a.width,a.height),i=1,s=.1,n=.2;e.absorberOrbit.length=t*(i+(A()*n-s))}e.absorberOrbitDirection??=e.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise;const r=e.absorberOrbit.length,l=e.absorberOrbit.angle,c=e.absorberOrbitDirection;e.velocity.setTo(C.origin);const h=e.size.max,d=e.options.move.size?e.getRadius()/h:1,u=i.factor||1,p=e.retina.moveSpeed*d*u*o;e.position.x=this.position.x+r*Math.cos(l),e.position.y=this.position.y+r*(c===t.RotateDirection.clockwise?1:-1)*Math.sin(l),e.absorberOrbit.length=Math.max(0,e.absorberOrbit.length-s.length),e.absorberOrbit.angle+=p*el*n.retina.reduceFactor}else e.velocity.addTo(s)}}});function sl(t,e,i,s){(t.paint??=new ke).fill={color:re.create(void 0,{value:e}),enable:s,opacity:i}}function nl(t,e,i,s){(t.paint??=new ke).stroke={color:re.create(void 0,{value:e}),opacity:i,width:s}}var al=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#ji;#ts;#$i;#si;#es;#Gi;#Ni;#Xi;#Yi;#At;#is;#di;#p;#ss;#Qt;#ns;#as;#Qi;#os;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#ss=s,this.#ji=0,this.#ts=0,this.#$i=0,this.#Xi=o,n instanceof ss?this.options=n:(this.options=new ss,this.options.load(n)),this.#Qi=i.retina.reduceFactor?q(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#Xi??this.#he(),this.name=this.options.name,this.fill=this.options.fill,this.#Gi=!this.options.life.wait,this.#os=!1;const l=gt({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ue(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ue(this.#p,this.options.spawn.stroke.color)),this.#di=!this.options.autoPlay,this.#is=l,this.#as=this.#rs(),this.size=this.#as.mode===t.PixelMode.percent?{width:this.#as.width/a*this.#u.canvas.size.width,height:this.#as.height/a*this.#u.canvas.size.height}:{width:this.#as.width,height:this.#as.height},this.#Yi=this.options.life.count??-1,this.#Ni=this.#Yi<=0,this.options.domId){const t=ot().getElementById(this.options.domId);t&&(this.#At=new MutationObserver(()=>{this.resize()}),this.#Qt=new ResizeObserver(()=>{this.resize()}),this.#At.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#Qt.observe(t))}const c=this.options.shape,h=this.#p.emitterShapeManager?.getShapeGenerator(c.type);h&&(this.#ns=h.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#di=!0,this.pause()}externalPlay(){this.#di=!1,this.play()}async init(){await(this.#ns?.init())}pause(){this.#di||(this.#es=void 0)}play(){if(this.#di)return;if(!(this.#Yi>0||this.#Ni)&&this.options.life.count||!(this.#Gi||this.#$i>=(this.#Qi??0)))return;const t=this.#u;if(void 0===this.#es){const e=q(this.options.rate.delay);this.#es=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Yi>0||this.#Ni)&&this.#Ji()}resize(){const e=this.#Xi,i=this.#u;this.position=e&&dt(e,i.canvas.size,C.origin)?e:this.#he(),this.#as=this.#rs(),this.size=this.#as.mode===t.PixelMode.percent?{width:this.#as.width/a*i.canvas.size.width,height:this.#as.height/a*i.canvas.size.height}:{width:this.#as.width,height:this.#as.height},this.#ns?.resize(this.position,this.size)}update(t){if(this.#di)return;const e=this.#u;this.#Gi&&(this.#Gi=!1,this.#$i=this.#Qi??0,this.#ts=this.#es??0),this.#os||(this.#os=!0,this.#ls(this.options.startCount)),void 0!==this.#si&&(this.#ji+=t.value,this.#ji>=this.#si&&(this.pause(),void 0!==this.#Qi&&(this.#Qi=void 0),this.#Ni||this.#Yi--,this.#Yi>0||this.#Ni?(this.position=this.#he(),this.#ns?.resize(this.position,this.size),this.#Qi=e.retina.reduceFactor?q(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#cs(),this.#ji-=this.#si,this.#si=void 0)),void 0!==this.#Qi&&(this.#$i+=t.value,this.#$i>=this.#Qi&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#$i-=this.#Qi,this.#Qi=void 0)),void 0!==this.#es&&(this.#ts+=t.value,this.#ts>=this.#es&&(this.#hs(),this.#ts-=this.#es))}#he(){const t=this.#u;if(this.options.domId){const e=ot().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return et({size:t.canvas.size,position:this.options.position})}#rs(){const e=this.#u;if(this.options.domId){const i=ot().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new es;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#cs(){this.#At?.disconnect(),this.#At=void 0,this.#Qt?.disconnect(),this.#Qt=void 0,this.#ss(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#hs(){if(this.#di)return;const t=q(this.options.rate.quantity);this.#ls(t)}#ls(t){const e=vt(this.#is)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:q(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:q(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:q(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#ns,u=c||h,p=u||d,g=u?{h:m,s:v,l:b}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?gt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#ds(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#ds(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#ds(i.l,this.spawnFillColor.l,g.l)),sl(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#ds(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#ds(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#ds(a.l,this.spawnStrokeColor.l,g.l)),nl(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#ns){const e=this.#ns.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&sl(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ji(){if(this.#di)return;const t=void 0!==this.options.life.duration?q(this.options.life.duration):void 0;(this.#Yi>0||this.#Ni)&&void 0!==t&&t>0&&(this.#si=t*r)}#ds(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=H(t.offset),o=q(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+q(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=re,t.AnimationOptions=ie,t.AnimationValueWithRandom=me,t.Background=le,t.BaseRange=Gt,t.Circle=Nt,t.ColorAnimation=ne,t.Fill=ue,t.FullScreen=ce,t.HslAnimation=ae,t.Move=Pe,t.MoveAngle=pe,t.MoveCenter=ge,t.MoveGravity=fe,t.MovePath=be,t.OptionLoader=Yt,t.Options=_e,t.OptionsColor=oe,t.OutModes=we,t.Paint=ke,t.ParticlesBounce=De,t.ParticlesBounceFactor=Ce,t.ParticlesDensity=Oe,t.ParticlesNumber=Se,t.ParticlesNumberLimit=ze,t.ParticlesOptions=Ee,t.RangedAnimationOptions=se,t.RangedAnimationValueWithRandom=ve,t.Rectangle=Xt,t.ResizeEvent=he,t.Shape=Ie,t.Spin=xe,t.Stroke=Me,t.ValueWithRandom=ye,t.Vector=C,t.Vector3d=k,t.ZIndex=Te,t.alterHsl=si,t.animate=F,t.areBoundsInside=ut,t.calcExactPositionOrRandomFromSize=it,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=et,t.calculateBounds=pt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=Y,t.circleBounce=yt,t.circleBounceDataFromParticle=ft,t.clamp=V,t.cloneStyle=wt,t.collisionVelocity=J,t.colorMix=Ye,t.colorToRgb=Ve,t.countOffset=1,t.decayOffset=1,t.deepExtend=gt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Q,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=mt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=X,t.getDistanceSq=N,t.getDistances=G,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=Je,t.getHslFromAnimation=Ze,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=Ct,t.getLinkColor=Qe,t.getLinkRandomColor=Ke,t.getLogger=Et,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=K,t.getPosition=bt,t.getRandom=A,t.getRandomFn=function(){return R},t.getRandomInRange=L,t.getRandomRgbColor=Ge,t.getRangeMax=j,t.getRangeMin=W,t.getRangeValue=q,t.getStyleFromHsl=Xe,t.getStyleFromRgb=Ne,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=je,t.hslaToRgba=$e,t.identity=1,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=D,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ct,t.isNull=T,t.isNumber=z,t.isObject=S,t.isPointInside=dt,t.isString=O,t.itemFromArray=ht,t.itemFromSingleOrMultiple=vt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=gt(t[e]??{},i))},t.loadFull=wr,t.loadLazyProperty=te,t.loadMinIndex=0,t.loadNestedProperty=Jt,t.loadOptionProperty=ee,t.loadOptions=Qt,t.loadParticlesOptions=Re,t.loadProperty=Kt,t.loadRandomFactor=1e4,t.loadRangeProperty=Zt,t.manageListener=kt,t.maxNits=400,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=st,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=H,t.rangeColorToHsl=Ue,t.rangeColorToRgb=Be,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=He,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ot,t.safeMatchMedia=rt,t.safeMutationObserver=lt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Tt.debug=It(t.debug)),t.error&&(Tt.error=It(t.error)),t.info&&(Tt.info=It(t.info)),t.log&&(Tt.log=It(t.log)),t.trace&&(Tt.trace=It(t.trace)),t.verbose&&(Tt.verbose=It(t.verbose)),t.warning&&(Tt.warning=It(t.warning))},t.setRandom=function(t=Math.random){R=t},t.setRangeValue=$,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Fe(t,e)?.a},t.stringToRgb=qe,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ni,t.updateColor=ii,t.updateColorValue=ei,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadExtendProperty,loadFull:(globalThis.__tsParticlesInternals.bundles.full||{}).loadFull,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.full||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.full||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.full||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.full||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.full||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.full||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.full=t.__tsParticlesInternals.bundles.full||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class C{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return C.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??l.y,i??l.z):new C(t.x,t.y,k(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.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 C.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class O extends C{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return O.create(l.x,l.y)}static clone(t){return O.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new O(t,e??l.y):new O(t.x,t.y)}}function D(t){return"boolean"==typeof t}function z(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function E(t){return null==t}const R=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return H(L(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function V(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function U(t){const e=$(t);let i=j(t);return e===i&&(i=0),F(i,e)}function W(t){return S(t)?t:U(t)}function j(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=j(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Y(t,e){return Math.sqrt(X(t,e))}function K(t,e,i){return X(t,e)<=i*i}function Q(t){return t*R}function Z(e,i,s){if(S(e))return Q(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function J(t){const e=O.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return O.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function it(t){const e={x:void 0!==t.position?.x?W(t.position.x):void 0,y:void 0!==t.position?.y?W(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var at,ot;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(ot=t.PixelMode||(t.PixelMode={})).precise="precise",ot.percent="percent";function rt(){return globalThis.document}function lt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function ct(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||T(e)&&e.includes(t)}function ht(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function ut(t,e,i,s,n){return pt(gt(t,s??0),e,i,n)}function pt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function gt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function ft(t,...e){for(const i of e){if(E(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>ft(void 0,t)):ft(e[s],n)}}return t}function yt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:O.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function mt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),g=tt(u,h,c,d),f=p.rotate(-l),y=g.rotate(-l);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 vt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function bt(t,e,i){return T(t)?ht(t,e,i):t}function wt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function xt(t){const e=rt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let Mt,Pt;function kt(t){if(Mt!==t||!Pt){Mt=t;const e=rt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}Pt=e}return Pt}function Ct(t,e,i,s,n){if(s){let s={passive:!0};D(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function Ot(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function Dt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class zt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var St;t.EventType=void 0,(St=t.EventType||(t.EventType={})).configAdded="configAdded",St.containerInit="containerInit",St.particlesSetup="particlesSetup",St.containerStarted="containerStarted",St.containerStopped="containerStopped",St.containerDestroyed="containerDestroyed",St.containerPaused="containerPaused",St.containerPlay="containerPlay",St.containerBuilt="containerBuilt",St.particleAdded="particleAdded",St.particleDestroyed="particleDestroyed",St.particleRemoved="particleRemoved";class It{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ot(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Tt=t=>(...e)=>{t(...e)},Et={debug:Tt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Tt(console.info),log:Tt(console.log),trace:Tt(console.trace),verbose:Tt(console.log),warning:Tt(console.warn)};function Rt(){return Et}const Lt="100%";class _t{pluginManager=new It(this);#d=[];#h=new zt;#o=!1;get items(){return this.#d}get version(){return"4.3.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Lr}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=bt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Rt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=bt(r,a),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=rt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Lt,s.style.height||=Lt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Lt,s.style.height||=Lt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=rt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var At,Ft,Vt,Bt,Ht,qt,Ut,Wt,jt,$t,Gt,Nt;!function(t){t.circle="circle",t.rectangle="rectangle"}(At||(At={}));class Xt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Yt extends Xt{radius;constructor(t,e,i){super(t,e,At.circle),this.radius=i}contains(t){return K(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Yt||t.type===At.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Kt||t.type===At.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Kt extends Xt{size;constructor(t,e,i,s){super(t,e,At.rectangle),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){if(t instanceof Yt)return t.intersects(this);if(!(t instanceof Kt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.AnimationMode=void 0,(Vt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Vt.increase="increase",Vt.decrease="decrease",Vt.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Ht=t.OutMode||(t.OutMode={})).bounce="bounce",Ht.none="none",Ht.out="out",Ht.destroy="destroy",Ht.split="split",t.AlterType=void 0,(qt=t.AlterType||(t.AlterType={})).darken="darken",qt.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(Wt=t.GradientType||(t.GradientType={})).linear="linear",Wt.radial="radial",Wt.random="random",t.ParticleOutType=void 0,(jt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",jt.inside="inside",jt.outside="outside",t.StartValueType=void 0,($t=t.StartValueType||(t.StartValueType={})).max="max",$t.min="min",$t.random="random",t.AnimationStatus=void 0,(Gt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Gt.decreasing="decreasing",t.DrawLayer=void 0,(Nt=t.DrawLayer||(t.DrawLayer={}))[Nt.BackgroundElement=0]="BackgroundElement",Nt[Nt.BackgroundDraw=1]="BackgroundDraw",Nt[Nt.BackgroundMask=2]="BackgroundMask",Nt[Nt.CanvasSetup=3]="CanvasSetup",Nt[Nt.PluginContent=4]="PluginContent",Nt[Nt.Particles=5]="Particles",Nt[Nt.CanvasCleanup=6]="CanvasCleanup",Nt[Nt.Foreground=7]="Foreground";class Qt{load(t){E(t)||this.doLoad(t)}}function Zt(t,...e){for(const i of e)t.load(i)}function Jt(t,e,i){void 0!==i&&(t[e]=i)}function te(t,e,i){void 0!==i&&(t[e]=G(i))}function ee(t,e,i){void 0!==i&&t[e].load(i)}function ie(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function se(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class ne extends Qt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){te(this,"count",t.count),Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),te(this,"delay",t.delay),Jt(this,"sync",t.sync)}}class ae extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Jt(this,"mode",t.mode),Jt(this,"startValue",t.startValue)}}class oe extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Jt(this,"max",t.max),Jt(this,"min",t.min),te(this,"offset",t.offset)}}class re extends Qt{h=new oe(0,m);l=new oe(0,b);s=new oe(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class le extends Qt{value="";static create(t,e){const i=new le;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){E(t.value)||(this.value=t.value)}}class ce extends le{animation=new re;static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class de extends Qt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new le,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"element",t.element),Jt(this,"draw",t.draw),Jt(this,"image",t.image),Jt(this,"position",t.position),Jt(this,"repeat",t.repeat),Jt(this,"size",t.size),Jt(this,"opacity",t.opacity)}}class he extends Qt{enable=!0;zIndex=0;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"zIndex",t.zIndex)}}class ue extends Qt{delay=.5;enable=!0;doLoad(t){Jt(this,"delay",t.delay),Jt(this,"enable",t.enable)}}class pe extends Qt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ft(this.options[t]??{},i))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class ge extends Qt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"enable",t.enable),te(this,"opacity",t.opacity)}}class fe extends Qt{offset=0;value=90;doLoad(t){te(this,"offset",t.offset),te(this,"value",t.value)}}class ye extends Qt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Jt(this,"x",t.x),Jt(this,"y",t.y),Jt(this,"mode",t.mode),Jt(this,"radius",t.radius)}}class me extends Qt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),Jt(this,"inverse",t.inverse),te(this,"maxSpeed",t.maxSpeed)}}class ve extends Qt{value=0;doLoad(t){E(t.value)||(this.value=G(t.value))}}class be extends ve{animation=new ne;doLoad(t){super.doLoad(t),ee(this,"animation",t.animation)}}class we extends be{animation=new ae}class xe extends Qt{clamp=!0;delay=new ve;enable=!1;generator;options={};doLoad(t){Jt(this,"clamp",t.clamp),this.delay.load(t.delay),Jt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=ft(this.options,t.options))}}class Me extends Qt{bottom;default=t.OutMode.out;left;right;top;doLoad(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 Pe extends Qt{acceleration=0;enable=!1;position;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),t.position&&(this.position=ft({},t.position))}}class ke extends Qt{angle=new fe;center=new ye;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new me;outModes=new Me;path=new xe;random=!1;size=!1;speed=2;spin=new Pe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),te(this,"decay",t.decay),Jt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),te(this,"drift",t.drift),Jt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Jt(this,"random",t.random),Jt(this,"size",t.size),te(this,"speed",t.speed),this.spin.load(t.spin),Jt(this,"straight",t.straight),Jt(this,"vibrate",t.vibrate),Jt(this,"warp",t.warp)}}class Ce extends Qt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"width",t.width),te(this,"opacity",t.opacity)}}class Oe extends Qt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ie(this,"fill",t.fill,()=>new ge),ie(this,"stroke",t.stroke,()=>new Ce)}}class De extends ve{value=1}class ze extends Qt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Se extends Qt{enable=!1;height=1080;width=1920;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"width",t.width),Jt(this,"height",t.height)}}class Ie extends Qt{mode=t.LimitMode.delete;value=0;doLoad(t){Jt(this,"mode",t.mode),Jt(this,"value",t.value)}}class Te extends Qt{density=new Se;limit=new Ie;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Jt(this,"value",t.value)}}class Ee extends Qt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ft(this.options[t]??{},i))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class Re extends ve{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Jt(this,"opacityRate",t.opacityRate),Jt(this,"sizeRate",t.sizeRate),Jt(this,"velocityRate",t.velocityRate)}}class Le extends Qt{bounce=new ze;effect=new pe;groups={};move=new ke;number=new Te;paint;palette;reduceDuplicates=!1;shape=new Ee;zIndex=new Re;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Oe,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new ge,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=ft(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=vt(e,t=>{const e=new Oe;return e.load(t),e}):T(this.paint)?(this.paint=new Oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function _e(t,e,...i){const s=new Le(t,e);return Zt(s,...i),s}class Ae extends Qt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new de,this.fullScreen=new he,this.particles=_e(this.#p,this.#u),this.resize=new ue}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,vt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Jt(this,"autoPlay",t.autoPlay),Jt(this,"clear",t.clear),Jt(this,"key",t.key),Jt(this,"name",t.name),te(this,"delay",t.delay),Jt(this,"detectRetina",t.detectRetina),te(this,"duration",t.duration),Jt(this,"fpsLimit",t.fpsLimit),Jt(this,"hdr",t.hdr),Jt(this,"pauseOnBlur",t.pauseOnBlur),Jt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Jt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;D(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=ft(this.style,t.style),Jt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Fe=new Map;function Ve(t,e){let i=Fe.get(t);return i||(i=e(),Fe.size>2e3&&Fe.clear(),Fe.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function He(t,e,i,s=!0){if(!e)return;const n=z(e)?{value:e}:e;if(z(n.value))return qe(t,n.value,i,s);if(T(n.value)){const e=ht(n.value,i,s);if(!e)return;return He(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function qe(t,e,i,s=!0){if(!e)return;const n=z(e)?{value:e}:e;if(z(n.value))return n.value===d?Ye():je(t,n.value);if(T(n.value)){const e=ht(n.value,i,s);if(!e)return;return qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ue(t,e,i,s=!0){const n=He(t,e,i,s);return n?We(n):void 0}function We(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function je(t,e){return Be(t,e)}function $e(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ge(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,a=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3,h=Math.min(y,y*$e(c,l,n+d)),u=Math.min(y,y*$e(c,l,n)),p=Math.min(y,y*$e(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Ne(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,a=i/v,r=s/b;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3;return{r:Math.min(y,y*$e(c,l,n+d)),g:Math.min(y,y*$e(c,l,n)),b:Math.min(y,y*$e(c,l,n-d))}}function Xe(t){const e=Ge(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ye(t,e){const i=t??0;if(e)return{r:F(i,y),g:F(i,y),b:F(i,y)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function Ke(t,e,i){const s=e?4:2,n=i??1;return Ve(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Qe(t,e,i){const s=e?4:2,n=i??1;return Ve(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ke(Ne(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Ze(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ge(t)),"r"in a||(a=Ge(e)),{b:q(n.b,a.b,i,s),g:q(n.g,a.g,i,s),r:q(n.r,a.r,i,s)}}function Je(t,e,i){if(i===d)return Ye();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ze(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ge(t)}}}function ti(t,e,i,s){const n=z(e)?e:e.value;return n===d?s?He(t,{value:n}):i?d:h:n===h?h:He(t,{value:n})}function ei(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ii(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(si(s.h,e.h,i),si(s.s,e.s,i),si(s.l,e.l,i)),s}function si(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=W(i.speed)/a*s,e.decay=1-W(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=W(i.count),e.time=0,e.delayTime=W(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function ni(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?U(e.offset):0,o=((e.velocity??0)*s.factor+3.6*a)*(n?.5075:1),r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,c,l)}function ai(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;ni(s,!1,e,i),ni(n,!0,e,i),ni(a,!0,e,i)}function oi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ri=new _t;class li{enable=!1;mode=[];load(t){E(t)||(Jt(this,"enable",t.enable),Jt(this,"mode",t.mode))}}var ci,di,hi;!function(t){t.circle="circle",t.rectangle="rectangle"}(ci||(ci={}));class ui{enable=!1;mode=[];selectors=[];type=ci.circle;load(t){E(t)||(Jt(this,"selectors",t.selectors),Jt(this,"enable",t.enable),Jt(this,"mode",t.mode),Jt(this,"type",t.type))}}class pi{enable=!1;mode=[];load(t){E(t)||(Jt(this,"enable",t.enable),Jt(this,"mode",t.mode))}}class gi{onClick=new li;onDiv=new ui;onHover=new pi;load(t){if(E(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=vt(e,t=>{const e=new ui;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(di||(di={}));class fi{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(E(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class yi{detectsOn=di.window;events=new gi;modes;constructor(t,e){this.modes=new fi(t,e)}load(t){if(E(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class mi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Fr});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new yi(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=ft({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(hi||(hi={}));class vi{type=hi.external;container;constructor(t){this.container=t}}class bi{type=hi.particles;container;constructor(t){this.container=t}}const wi="pointerdown",xi="pointerup",Mi="pointerleave",Pi="pointermove",ki="touchstart",Ci="touchend",Oi="touchmove",Di="touchcancel";function zi(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Si(t,e){return!!zi(e,e=>e.enable&&dt(t,e.mode))}function Ii(t,e,i){vt(e,e=>{const s=e.mode;e.enable&&dt(t,s)&&function(t,e){const i=t.selectors;vt(i,i=>{e(i,t)})}(e,i)})}function Ti(t,e){if(e&&t)return zi(t,t=>function(t,e){const i=vt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function Ei(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Ri{count;delay;duration;wait=!1;load(t){E(t)||(Jt(this,"count",t.count),te(this,"delay",t.delay),te(this,"duration",t.duration),Jt(this,"wait",t.wait))}}class Li{mass=0;radius=0;load(t){E(t)||(Jt(this,"mass",t.mass),Jt(this,"radius",t.radius))}}class _i extends ve{density=5;limit=new Li;value=50;load(t){E(t)||(super.load(t),Jt(this,"density",t.density),S(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Ai{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new le,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ri,this.size=new _i}load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,Jt(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.size&&this.size.load(t.size),Jt(this,"destroy",t.destroy),Jt(this,"orbits",t.orbits))}}const Fi="absorbers";class Vi extends vi{handleClickMode;maxDistance;#y=!1;#m;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==Fi)return;const{clickPosition:a}=i.mouse;if(a){if(e.getArray(this.container).some(t=>Y(t.position,a)<t.size))return}const o=ht(n)??new Ai;this.#v.addAbsorber(s,o,a)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){Y(s.position,e.downPosition)<=s.size&&(this.#y=!0,this.#m=s)}else this.#y=!1,this.#m=void 0;this.#y&&this.#m==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&dt(Fi,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(T(i.absorbers))for(const e of i.absorbers){const i=new Ai;i.load(e),t.absorbers.push(i)}else{const e=new Ai;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Bi=new WeakMap;function Hi(t){const e=t.pluginManager;let i=Bi.get(e);return i||(i=Promise.resolve().then(function(){return Vr}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Bi.delete(e),t}),Bi.set(e,i)),i}class qi{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return Br});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=vt(i.absorbers,t=>{const e=new Ai;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return T(e)?!!e.length:!!e}}async function Ui(t){await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Hi(t);e.addPlugin(new qi(i))})}(t),await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Hi(t);Ei(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new Vi(t,i)))})}(t)}class Wi{bottom;left;right;top;load(t){E(t)||(te(this,"bottom",t.bottom),te(this,"left",t.left),te(this,"right",t.right),te(this,"top",t.top))}}var ji;!function(t){t.explode="explode",t.none="none",t.split="split"}(ji||(ji={}));class $i{maxSizeFactor=3;speed=2;load(t){E(t)||(Jt(this,"maxSizeFactor",t.maxSizeFactor),Jt(this,"speed",t.speed))}}class Gi extends ve{value=3}class Ni extends ve{value={min:4,max:9}}class Xi{count=1;factor=new Gi;fillColor;fillColorOffset;particles;rate=new Ni;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=le.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=le.create(this.strokeColor,t.strokeColor)),Jt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=vt(t.particles,t=>ft({},t)),Jt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let Yi=class{bounds=new Wi;explode=new $i;mode=ji.none;split=new Xi;load(t){E(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function Ki(t,e,i,s){return t&&s?function(t,e){const i=W(e.h??0),s=W(e.s??0),n=W(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return ce.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?ce.create(void 0,e):i?ce.create(void 0,i):s?function(t){return ce.create(void 0,{value:{hsl:t}})}(s):void 0}function Qi(e,i,s,n){const a=s.options.destroy;if(!a)return;const o=a.split,r=_e(e,i,s.options),l=bt(o.fillColor),c=bt(o.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/W(o.factor.value),p=r.size;p&&(S(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=bt(r.paint),f=g?.fill,y=g?.stroke,m=Ki(o.fillColorOffset,l,f?.color,d),v=Ki(o.strokeColorOffset,c,y?.color,h);m&&f&&(f.color=m),v&&y&&(y.color=v);const b=o.sizeOffset?G(-s.size.value,s.size.value):0,w={x:s.position.x+U(b),y:s.position.y+U(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=U(G(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Zi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:r,top:l}=s,{destroyBounds:c}=t,d=e.canvas.size;n&&(c.bottom=W(n)*d.height/a),o&&(c.left=W(o)*d.width/a),r&&(c.right=W(r)*d.width/a),l&&(c.top=W(l)*d.height/a)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){se(t,"destroy",Yi,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case ji.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=W(n.rate.value),o=bt(n.particles);for(let s=0;s<a;s++)Qi(t,e,i,o)}(this.#p,this.#u,t);break;case ji.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Ji(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Zi(t.pluginManager,e)))})}class ts{count;delay;duration;wait=!1;load(t){E(t)||(Jt(this,"count",t.count),te(this,"delay",t.delay),te(this,"duration",t.duration),Jt(this,"wait",t.wait))}}class es{delay=.1;quantity=1;load(t){E(t)||(te(this,"quantity",t.quantity),te(this,"delay",t.delay))}}class is{color=!1;opacity=!1;load(t){E(t)||(Jt(this,"color",t.color),Jt(this,"opacity",t.opacity))}}class ss{options={};replace=new is;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=ft({},t.options??{})),this.replace.load(t.replace),Jt(this,"type",t.type))}}class ns{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(Jt(this,"mode",t.mode),Jt(this,"height",t.height),Jt(this,"width",t.width))}}class as{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new ge,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Ce,this.stroke.load(t.stroke)))}}class os{autoPlay=!0;direction;domId;fill=!0;life=new ts;name;particles;position;rate=new es;shape=new ss;size;spawn=new as;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(Jt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new ns,this.size.load(t.size)),Jt(this,"direction",t.direction),Jt(this,"domId",t.domId),Jt(this,"fill",t.fill),this.life.load(t.life),Jt(this,"name",t.name),this.particles=vt(t.particles,t=>ft({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ce,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ce,this.spawnStrokeColor.load(t.spawnStrokeColor)),Jt(this,"startCount",t.startCount))}}const rs={count:1,enable:!0},ls="emitters";class cs extends vi{handleClickMode;maxDistance;#v;constructor(t,e){super(e),this.#v=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==ls)return;let s;if(T(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const a=Math.floor(A()*i.value.length);if(t.has(a)&&t.size<e){n--;continue}t.add(a);const o=ht(i.value,a);o&&s.push(o)}}else s=i.value}else s=i.value;const n=s,a=e.mouse.clickPosition;vt(n,async t=>{await this.#v.addEmitter(this.container,t,a)})}}clear(){}init(){}interact(t,e){for(const t of this.#v.getArray(this.container))t.update(e)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&dt(ls,n.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:rs,value:[]};for(const i of e)if(i?.emitters)if(T(i.emitters))for(const e of i.emitters){const i=new os;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,T(e.value))for(const i of e.value){const e=new os;e.load(i),t.emitters.value.push(e)}else{const i=new os;i.load(e.value),t.emitters.value.push(i)}}else{const e=new os;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#v.getArray(this.container).indexOf(t);e>=0&&this.#v.getArray(this.container).splice(e,1)}reset(){}}async function ds(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return qr}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const hs=new WeakMap;function us(t){const e=t.pluginManager;let i=hs.get(e);return i||(i=Promise.resolve().then(function(){return Ur}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw hs.delete(e),t}),hs.set(e,i)),i}class ps{fill;options;position;size;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}}var gs;!function(t){t.emitter="emitter"}(gs||(gs={}));class fs{id="emitters";#v;constructor(t){this.#v=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Wr});return new e(this.#v,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=vt(i.emitters,t=>{const e=new os;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}function ys(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}async function ms(t){await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=await us(t);await ds(t),t.pluginManager.addPlugin(new fs(e))})}(t),await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=await us(t);Ei(t),await ds(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new cs(e,t)))})}(t)}class vs extends ps{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*o,t.height*o],a=((t,e)=>{const i=A()*w,s=Math.atan(e/t*Math.tan(u*i)),n=A();return n<w?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),r=(h=a,(c=s)*(d=n)/Math.sqrt((d*Math.cos(h))**2+(c*Math.sin(h))**2)),l=e?r*Math.sqrt(A()):r;var c,d,h;return{position:{x:i.x+l*Math.cos(a),y:i.y+l*Math.sin(a)}}}}class bs{generate(t,e,i,s,n){return new vs(e,i,s,n)}}async function ws(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{ys(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new bs)})}var xs;function Ms(t,e){return t+e*(A()-o)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(xs||(xs={}));class Ps extends ps{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Ms(e.x,i.width),y:Ms(e.y,i.height)}};{const t=i.width*o,s=i.height*o,n=function(t){return Math.floor(A()*t)}(4),a=2*(A()-o);switch(n){case xs.TopLeft:return{position:{x:e.x+a*t,y:e.y-s}};case xs.TopRight:return{position:{x:e.x-t,y:e.y+a*s}};case xs.BottomRight:return{position:{x:e.x+a*t,y:e.y+s}};case xs.BottomLeft:default:return{position:{x:e.x+t,y:e.y+a*s}}}}}}class ks{generate(t,e,i,s,n){return new Ps(e,i,s,n)}}async function Cs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{ys(t),t.pluginManager.addEmitterShapeGenerator?.("square",new ks)})}class Os{momentumFactor=.03;preserveMomentum=false;load(t){E(t)||(Jt(this,"momentumFactor",t.momentumFactor),Jt(this,"preserveMomentum",t.preserveMomentum))}}const Ds=16.666666666666668;class zs extends vi{maxDistance=0;#b;#w;#x;#M;#P;#k=[];#C=!1;#O;constructor(t){super(t)}clear(t,e){}init(){}interact(t,e){const i=t.mouse,s=i.position;if(s&&(this.#P=s),this.#x){const t=performance.now();i.clicking?this.#w=void 0:this.#w??=t;const e=void 0===this.#b&&void 0!==this.#w&&t-this.#w>=50;if(!i.inside||this.#D(i)||e)return this.#z(),void(this.#C=!1);const n=s??this.#P;if(!n)return;this.#k.push({x:n.x,y:n.y,t:t}),this.#k.length>5&&this.#k.shift();const a=n.x+(this.#M?.x??0),o=n.y+(this.#M?.y??0);return this.#x.position.x=a-this.#x.offset.x,this.#x.position.y=o-this.#x.offset.y,this.#x.velocity.x=0,this.#x.velocity.y=0,this.#x.initialPosition.x=this.#x.position.x,this.#x.initialPosition.y=this.#x.position.y,void(this.#x.misplaced=!1)}if(!i.clicking)return this.#z(),void(this.#C=!1);if(this.#C)return;this.#C=!0;const n=i.downPosition??s??this.#P,a=this.#S(t,n);if(!a||!s)return void(a||(this.#C=!1));const o=a.getPosition();this.#x=a,this.#b=i.clickTime,this.#M={x:o.x-s.x,y:o.y-s.y},this.#O={x:a.velocity.x,y:a.velocity.y},this.#w=void 0,this.#k=[{x:s.x,y:s.y,t:performance.now()}],a.velocity.x=0,a.velocity.y=0,a.position.x=o.x-a.offset.x,a.position.y=o.y-a.offset.y,a.initialPosition.x=a.position.x,a.initialPosition.y=a.position.y,a.misplaced=!1}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!this.#x&&!this.#C)||!!n?.onClick.enable&&s.clicking&&!!s.position&&dt("drag",n.onClick.mode)}loadModeOptions(t,...e){se(t,"drag",Os,...e)}reset(t,e){}#S(t,e){if(!e)return;const i=this.container.particles.filter(e=>this.isEnabled(t,e));let s,n=1/0;for(const t of i){const i=Y(t.getPosition(),e),a=t.getRadius();!Number.isFinite(i)||!Number.isFinite(a)||i>a||i>=n||(s=t,n=i)}return s}#D(t){return void 0!==this.#b&&void 0!==t.clickTime&&t.clickTime!==this.#b}#z(){if(this.#x){const t=this.container.actualOptions.interactivity?.modes.drag;if((t?.preserveMomentum??!1)&&this.#k.length>=2){const e=this.#k[0],i=this.#k[this.#k.length-1];if(e&&i){const s=i.t-e.t;if(s>0){const n=t?.momentumFactor??.03;this.#x.velocity.x=(i.x-e.x)/s*Ds*n,this.#x.velocity.y=(i.y-e.y)/s*Ds*n}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}else this.#O&&(this.#x.velocity.x=this.#O.x,this.#x.velocity.y=this.#O.y)}this.#x=void 0,this.#b=void 0,this.#w=void 0,this.#M=void 0,this.#P=void 0,this.#k=[],this.#O=void 0}}async function Ss(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalDrag",t=>Promise.resolve(new zs(t)))})}class Is{x=0;y=0;load(t){t&&(Jt(this,"x",t.x),Jt(this,"y",t.y))}}class Ts{value;weights=new Is;load(t){t&&(t.weights&&(this.weights??=new Is,this.weights.load(t.weights)),E(t.value)||(this.value=G(t.value)))}}class Es{h=new Ts;l=new Ts;s=new Ts;load(t){t&&(t.h&&(this.h??=new Ts,this.h.load(t.h)),t.s&&(this.s??=new Ts,this.s.load(t.s)),t.l&&(this.l??=new Ts,this.l.load(t.l)))}}class Rs{colorCoords=new Es;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){E(t)||(Jt(this,"delay",t.delay),Jt(this,"quantity",t.quantity),Jt(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=ft({},t.particles)),t.colorCoords&&(this.colorCoords??=new Es,this.colorCoords.load(t.colorCoords)))}}const Ls="trail";class _s extends vi{maxDistance=0;#I;#T;#p;constructor(t,e){super(e),this.#p=t,this.#I=0}clear(){}init(){}interact(t,e){const i=this.container;if(!i.retina.reduceFactor)return;const s=i.actualOptions,n=s.interactivity?.modes.trail;if(!n)return;const a=n.delay*r/this.container.retina.reduceFactor;if(this.#I<a&&(this.#I+=e.value),this.#I<a)return;const o=t.mouse.position,l=!(n.pauseOnStop&&(o===this.#T||o?.x===this.#T?.x&&o?.y===this.#T?.y));if(this.#T=o?{...o}:void 0,l&&o){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:a}=i.canvas.size,r={x:o.x/s,y:o.y/a},l=t=>!!(t?.weights?.x??t?.weights?.y),c=(t,e,i)=>{if(!l(t))return;const s=t?.weights,n=r.x*(s?.x??0)+r.y*(s?.y??0),a=t?.value??e,o=j(a??0),c=$(a??i),d=o+n*(c-o);return Math.min(c,Math.max(o,d))},d=n.particles?.paint?bt(n.particles.paint):void 0,h=d?.fill,u=h?Ue(this.#p,ce.create(void 0,h.color)):void 0,p=c(e.h,u?.h,m),g=c(e.s,u?.s,v),f=c(e.l,u?.l,b);void 0===p&&void 0===g&&void 0===f||(t=ft({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:g??u?.s,l:f??u?.l}}}}}))}i.particles.push(n.quantity,o,t)}this.#I-=a}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&(s.clicking&&s.inside&&!!s.position&&dt(Ls,n.onClick.mode)||s.inside&&!!s.position&&dt(Ls,n.onHover.mode))}loadModeOptions(t,...e){se(t,"trail",Rs,...e)}reset(){}}async function As(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new _s(t.pluginManager,e)))})}var Fs;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(Fs||(Fs={}));class Vs{enable=!1;value=0;load(t){E(t)||(Jt(this,"enable",t.enable),te(this,"value",t.value))}}class Bs{backColor;darken=new Vs;enable=!1;enlighten=new Vs;mode=Fs.vertical;speed=25;load(t){E(t)||(void 0!==t.backColor&&(this.backColor=le.create(this.backColor,t.backColor)),this.darken.load(t.darken),Jt(this,"enable",t.enable),this.enlighten.load(t.enlighten),Jt(this,"mode",t.mode),te(this,"speed",t.speed))}}class Hs{#p;constructor(t){this.#p=t}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(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===Fs.horizontal||s.mode===Fs.both,vertical:s.mode===Fs.vertical||s.mode===Fs.both,angle:A()*u,speed:W(s.speed)/360},s.backColor)i.backColor=Ue(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=A()>=o?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:W(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:W(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:W(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){se(t,"roll",Bs,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function qs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new Hs(t.pluginManager)))})}class Us{enable=!1;mode="destination-out";load(t){E(t)||(Jt(this,"mode",t.mode),Jt(this,"enable",t.enable))}}class Ws{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return jr});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Us),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Us,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function js(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ws)})}class $s{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:Q(s.min),max:Q(s.max)}:{min:0,max:Q(s)}}}async function Gs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new $s))})}var Ns;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ns||(Ns={}));const Xs=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ys=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ks{accepts(t){return t.startsWith("#")}handleColor(t){return this.#E(t.value)}handleRangeColor(t){return this.#E(t.value)}parseString(t){return this.#E(t)}#E(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Xs,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ys.exec(e);return i?{a:i[Ns.a]?Number.parseInt(i[Ns.a],16)/255:1,b:Number.parseInt(i[Ns.b]??"0",16),g:Number.parseInt(i[Ns.g]??"0",16),r:Number.parseInt(i[Ns.r]??"0",16)}:void 0}}async function Qs(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ks)})}var Zs;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Zs||(Zs={}));const Js=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class tn{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ge({h:W(e.h),l:W(e.l),s:W(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Js.exec(t);return e?Xe({a:e.length>4?nt(e[Zs.a]):1,h:Number.parseInt(e[Zs.h]??"0",10),l:Number.parseInt(e[Zs.l]??"0",10),s:Number.parseInt(e[Zs.s]??"0",10)}):void 0}}async function en(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new tn)})}class sn{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Gr});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function nn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new sn(t.pluginManager))})}function an(e,i){const s=e.value,n=e.animation,a={delayTime:W(n.delay)*r,enable:n.enable,value:W(e.value)*i,max:$(s)*i,min:j(s)*i,loops:0,maxLoops:W(n.count),time:0};if(n.enable){switch(a.decay=1-W(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=U(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function on(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=H(i.value,r,l))}}class rn extends ae{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Jt(this,"destroy",t.destroy)}}class ln extends we{animation=new rn;value=1;load(t){if(E(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class cn{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=an(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=W(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=A()))}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))}loadOptions(t,...e){se(t,"opacity",ln,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&on(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function dn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new cn(t)))})}class hn{modes;#u;#R;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#R=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#R)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),d=gt(r,c),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=W(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=W(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:l,outOfCanvas:u,size:c})}}class un{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=N(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class pn{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;ut(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const gn=O.origin;class fn{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;gn.setTo(l),gn.length=e.moveCenter.radius,gn.angle=e.velocity.angle+Math.PI,gn.addTo(e.moveCenter);const{dx:s,dy:n}=N(e.position,gn);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(U({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(U({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=N(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(U({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=N(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=gt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=A()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=A()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class yn{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#L(e,t.OutMode.bounce,t=>new hn(t)),this.#L(e,t.OutMode.out,t=>new fn(t)),this.#L(e,t.OutMode.destroy,t=>new un(t)),this.#L(e,t.OutMode.none,t=>new pn(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#_(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#_(e,i,s.left??s.default,t.OutModeDirection.left),this.#_(e,i,s.right??s.default,t.OutModeDirection.right),this.#_(e,i,s.top??s.default,t.OutModeDirection.top)}#L(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#_(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function mn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new yn(t)))})}class vn{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=bt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=W(o.opacity),t.fillAnimation=i.animation;const s=Ue(this.#p,i);s&&(t.fillColor=ii(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ce.create(void 0===a?void 0:ce.create(void 0,a),r.color);t.strokeWidth=W(r.width)*e.retina.pixelRatio,t.strokeOpacity=W(r.opacity??1),t.strokeAnimation=i.animation;const s=Ue(this.#p,i)??t.getFillColor();s&&(t.strokeColor=ii(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!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),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ai(t.fillColor,e,this.#u.hdr),ai(t.strokeColor,e,this.#u.hdr))}}async function bn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new vn(t.pluginManager,e)))})}var wn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(wn||(wn={}));const xn=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Mn{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:W(e.r),g:W(e.g),b:W(e.b)}}parseString(t){if(!this.accepts(t))return;const e=xn.exec(t);return e?{a:e.length>4?nt(e[wn.a]):1,b:parseInt(e[wn.b]??"0",10),g:parseInt(e[wn.g]??"0",10),r:parseInt(e[wn.r]??"0",10)}:void 0}}async function Pn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Mn)})}class kn extends ae{destroy=t.DestroyType.none;load(t){super.load(t),E(t)||Jt(this,"destroy",t.destroy)}}class Cn extends we{animation=new kn;value=3;load(t){if(super.load(t),E(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class On{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=A()))}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))}loadOptions(t,...e){se(t,"size",Cn,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=an(i,e),t.retina.sizeAnimationSpeed=W(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&on(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Dn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new On(t)))})}async function zn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{await Promise.all([js(t),Qs(t),en(t),Pn(t),nn(t),Gs(t),bn(t),dn(t),mn(t),Dn(t)])})}const Sn=new Map;async function In(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{for(const[e,i]of Sn)t.pluginManager.addEasing(e,i)})}Sn.set("ease-in-quad",t=>t**2),Sn.set("ease-out-quad",t=>1-(1-t)**2),Sn.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const Tn=["emoji"];function En(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function Rn(t,e){try{await rt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Ln='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class _n{#A=new Map;destroy(){for(const[t,e]of this.#A)e instanceof ImageBitmap&&e.close(),this.#A.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#A.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Tn.some(t=>dt(t,e.type)))return;const i=[Rn(Ln)];vt(Tn.map(t=>e.options[t])[0],t=>{t.font&&i.push(Rn(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=bt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??Ln,padding:i.padding??0,value:s}:{font:Ln,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#A.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=$(e.size.value),d=c+l,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#A.set(r,g),e.emojiDataKey=r}}async function An(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Tn,()=>Promise.resolve(new _n))})}const Fn=O.origin;function Vn(t,e,i,s,n,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const l=e.particles.grid.query(n,a);for(const e of l){const{dx:n,dy:a,distance:l}=N(e.position,i),c=r.speed*r.factor,d=H(t.getEasing(r.easing)(1-l/s)*c,1,r.maxSpeed);Fn.x=l?n/l*d:c,Fn.y=l?a/l*d:c,o?.(e),e.position.subFrom(Fn)}}let Bn=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){E(t)||(Jt(this,"distance",t.distance),Jt(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),Jt(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),Jt(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const Hn="attract";let qn=class extends vi{handleClickMode;#F;#V;#p;#B;constructor(t,e){super(e),this.#p=t,this.#V=0,this.#F=new Set,this.#B=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.attract;if(n&&t===Hn){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},n.duration*r)}}}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#V=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===Pi,s=e.interactivity?.events;if(!s)return;const{enable:n,mode:a}=s.onHover,{enable:o,mode:r}=s.onClick;i&&n&&dt(Hn,a)?function(t,e,i,s,n){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||Vn(t,e,a,o,new Yt(a.x,a.y,o),t=>s(t),n)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#H(t)}):o&&dt(Hn,r)&&function(t,e,i,s,n){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;Vn(t,e,a,o,new Yt(a.x,a.y,o),t=>s(t),n)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#H(t)}),this.#q()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!(s.position&&n?.onHover.enable||s.clickPosition&&n?.onClick.enable))return!1;const a=n.onHover.mode,o=n.onClick.mode;return dt(Hn,a)||dt(Hn,o)}loadModeOptions(t,...e){se(t,"attract",Bn,...e)}reset(){}#q(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#B.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#B){if(this.#F.has(n))continue;if(n.destroyed){this.#B.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-n.position.x,l=o.y-n.position.y,c=o.z-n.position.z;if(t.follow&&n.options.move.enable){const{x:t,y:e,z:i}=n.velocity,s=t*t+e*e+i*i;if(s>0){const n=(r*t+l*e+c*i)/s;r-=t*n,l-=e*n,c-=i*n}}n.position.x+=r*s,n.position.y+=l*s,n.position.z+=c*s,Math.abs(r)<=.5&&Math.abs(l)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#B.delete(n))}}#H(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#B.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#B.set(t,s)),s.lastInteractionTime=i}};async function Un(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new qn(t.pluginManager,e)))})}const Wn=Math.PI*o;function jn(t,e,i,s,n){const a=t.particles.grid.query(s,n);for(const t of a)s instanceof Yt?mt(yt(t),{position:e,mass:i**2*Wn,velocity:O.origin,factor:O.origin}):s instanceof Kt&&Nn(t,gt(e,i))}function $n(t,e,i,s){Ii(i,e,(e,i)=>{!function(t,e,i,s){const n=rt().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,a=t.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth*o)*a,y:(n.offsetTop+n.offsetHeight*o)*a},l=n.offsetWidth*o*a,c=10*a,d=i.type===ci.circle?new Yt(r.x,r.y,l+c):new Kt(n.offsetLeft*a-c,n.offsetTop*a-c,n.offsetWidth*a+2*c,n.offsetHeight*a+2*c);s(r,l,d)})}(t,e,i,(e,i,n)=>{jn(t,e,i,n,s)})})}function Gn(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:a,velocity:r,factor:l}=t;return s.min<a.min||s.min>a.max||s.max<a.min||s.max>a.max||(i.max>=n.min&&i.max<=(n.max+n.min)*o&&r>0||i.min<=n.max&&i.min>(n.max+n.min)*o&&r<0)&&(e.velocity=r*-l,e.bounced=!0),e}function Nn(t,e){const i=gt(t.getPosition(),t.getRadius()),s=t.options.bounce,n=Gn({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:W(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const a=Gn({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:W(s.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class Xn{distance=200;load(t){E(t)||Jt(this,"distance",t.distance)}}const Yn="bounce";class Kn extends vi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#V=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Pi;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&dt(Yn,a)?function(t,e,i){const s=10*t.retina.pixelRatio,n=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!n||jn(t,n,a,new Yt(n.x,n.y,a+s),i)}(this.container,t,e=>this.isEnabled(t,e)):$n(this.container,o,Yn,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&dt(Yn,n.onHover.mode)||Si(Yn,a)}loadModeOptions(t,...e){se(t,"bounce",Xn,...e)}reset(){}}async function Qn(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new Kn(t)))})}class Zn{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!E(t)){if(Jt(this,"distance",t.distance),Jt(this,"duration",t.duration),Jt(this,"mix",t.mix),te(this,"opacity",t.opacity),void 0!==t.color){const e=T(this.color)?void 0:this.color;this.color=vt(t.color,t=>le.create(e,t))}Jt(this,"size",t.size)}}}class Jn extends Zn{selectors=[];load(t){super.load(t),E(t)||Jt(this,"selectors",t.selectors)}}class ta extends Zn{divs;load(t){super.load(t),E(t)||(this.divs=vt(t.divs,t=>{const e=new Jn;return e.load(t),e}))}}class ea{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var ia;function sa(t,e,i,s){if(e>=i){return H(t+(e-i)*s,t,e)}if(e<i){return H(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(ia||(ia={}));const na="bubble";class aa extends vi{handleClickMode;#V;#U=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#V=0,e.bubble??={},this.handleClickMode=t=>{t===na&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#V}clear(t,e,i){const s=this.#U.get(t);s?.inRange&&!i||(t.removeModifier(na),this.#U.delete(t))}getOrCreateModifier(t){let e=this.#U.get(t);return e||(e=new ea,this.#U.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#V=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,s=i.interactivity?.events;if(!s)return;const n=s.onHover,a=s.onClick,o=n.enable,r=n.mode,l=a.enable,c=a.mode,d=s.onDiv;o&&dt(na,r)?this.#W(t):l&&dt(na,c)?this.#j(t):Ii(na,d,(i,s)=>{this.#$(t,e,i,s)})}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const{onClick:a,onDiv:o,onHover:r}=n,l=Si(na,o);return!!(l||r.enable&&s.position||a.enable&&s.clickPosition)&&(dt(na,r.mode)||dt(na,a.mode)||l)}loadModeOptions(t,...e){se(t,"bubble",ta,...e)}reset(t,e){const i=this.#U.get(e);i&&(i.enabled=!1,i.inRange=!1)}#j(t){const e=this.container,i=e.actualOptions,s=t.mouse.clickPosition,n=i.interactivity?.modes.bubble;if(!n||!s)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(s,a,e=>this.isEnabled(t,e)),{bubble:l}=e;for(const i of o){if(!l.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!l.durationEnd,o.inRange=!l.durationEnd;const c=Y(i.getPosition(),s),d=(performance.now()-(t.mouse.clickTime??0))/r;d>n.duration&&(l.durationEnd=!0),d>2*n.duration&&(l.clicking=!1,l.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:ia.size};this.#G(i,c,d,h);const u={bubbleObj:{optValue:n.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:ia.opacity};this.#G(i,c,d,u),!l.durationEnd&&c<=a?this.#N(i,c):(o.fillColor=void 0,o.strokeColor=void 0)}}#W(t){const e=this.container,i=t.mouse.position,s=e.retina.bubbleModeDistance;if(!s||s<0||!i)return;const n=e.particles.grid.queryCircle(i,s,e=>this.isEnabled(t,e));for(const e of n){const n=this.getOrCreateModifier(e);n.enabled=!0,n.inRange=!0;const a=Y(e.getPosition(),i),o=1-a/s;a<=s?o>=0&&t.status===Pi&&(this.#X(e,o),this.#Y(e,o),this.#N(e,o)):this.reset(t,e),t.status===Mi&&this.reset(t,e)}}#N(t,e,i){const s=this.container.actualOptions,n=i??s.interactivity?.modes.bubble,a=this.getOrCreateModifier(t);if(n){if(!a.finalColor){const t=n.color;if(!t)return;const e=bt(t);a.finalColor=Ue(this.#p,e)}if(a.finalColor)if(n.mix){a.fillColor=void 0,a.strokeColor=void 0;const i=t.getFillColor();if(i){const t=We(Ze(i,a.finalColor,1-e,e));a.fillColor=t,a.strokeColor=t}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}else a.fillColor=a.finalColor,a.strokeColor=a.finalColor}}#Y(t,e,i){const s=this.container.actualOptions,n=i?.opacity??s.interactivity?.modes.bubble?.opacity;if(!n)return;const a=sa(t.opacity?.value??1,n,t.opacity?.max??1,e);if(void 0!==a){this.getOrCreateModifier(t).opacity=a}}#X(t,e,i){const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const a=sa(t.size.value,n,t.size.max,e);if(void 0!==a){this.getOrCreateModifier(t).radius=a}}#G(t,e,i,s){const n=this.container,a=s.bubbleObj.optValue,o=n.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const l=r.duration,c=n.retina.bubbleModeDistance,d=s.particlesObj.optValue,h=s.bubbleObj.value,u=s.particlesObj.value??0,p=s.type;if(!c||c<0||a===d)return;n.bubble??={};const g=this.getOrCreateModifier(t);if(n.bubble.durationEnd)h&&(p===ia.size&&(g.radius=void 0),p===ia.opacity&&(g.opacity=void 0));else if(e<=c){if((h??u)!==a){const t=u-i*(u-a)/l;p===ia.size&&(g.radius=t),p===ia.opacity&&(g.opacity=t)}}else p===ia.size&&(g.radius=void 0),p===ia.opacity&&(g.opacity=void 0)}#$(t,e,i,s){const n=this.container,a=rt().querySelectorAll(i),r=n.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,l=n.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*l,y:(a.offsetTop+a.offsetHeight*o)*l},d=a.offsetWidth*o*l,h=s.type===ci.circle?new Yt(c.x,c.y,d):new Kt(a.offsetLeft*l,a.offsetTop*l,a.offsetWidth*l,a.offsetHeight*l),u=n.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;const i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const s=Ti(r.divs,a);i.div&&i.div===a||(this.clear(t,e,!0),i.div=a),this.#X(t,1,s),this.#Y(t,1,s),this.#N(t,1,s)}})}}async function oa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new aa(t.pluginManager,e)))})}class ra{opacity=.5;load(t){E(t)||te(this,"opacity",t.opacity)}}class la{distance=80;links=new ra;radius=60;load(t){E(t)||(Jt(this,"distance",t.distance),this.links.load(t.links),Jt(this,"radius",t.radius))}}function ca(t,e,i,s){const n=t.actualOptions,a=n.interactivity?.modes.connect;if(a)return function(t,e,i,s,n){const a=Math.floor(s.getRadius()/i.getRadius()),o=i.getFillColor(),r=s.getFillColor();if(!o||!r)return;const l=i.getPosition(),c=s.getPosition(),d=Ze(o,r,i.getRadius(),s.getRadius()),h=e.createLinearGradient(l.x,l.y,c.x,c.y);return h.addColorStop(0,Qe(o,t.hdr,n)),h.addColorStop(H(a,0,1),Ke(d,t.hdr,n)),h.addColorStop(1,Qe(r,t.hdr,n)),h}(t,e,i,s,a.links.opacity)}function da(t,e,i){t.canvas.render.draw(s=>{const n=ca(t,s,e,i);if(!n)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,s,n){En(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,a,o)})}class ha extends vi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#V=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:s,connectModeRadius:n}=e.retina;if(!s||s<0||!n||n<0||!i)return;const a=Math.abs(n),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const n=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(s),r=Math.abs(n.x-i.x),l=Math.abs(n.y-i.y);r<o&&l<o&&da(e,t,a)}})}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!n?.onHover.enable||!s.position)&&dt("connect",n.onHover.mode)}loadModeOptions(t,...e){se(t,"connect",la,...e)}reset(){}}async function ua(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new ha(t)))})}function pa(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ga(t,e,i){Ii(i,e,(e,i)=>{!function(t,e,i){const s=rt().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,n=t.retina.pixelRatio,a={x:(s.offsetLeft+s.offsetWidth*o)*n,y:(s.offsetTop+s.offsetHeight*o)*n},r=s.offsetWidth*o*n,l=10*n,c=i.type===ci.circle?new Yt(a.x,a.y,r+l):new Kt(s.offsetLeft*n-l,s.offsetTop*n-l,s.offsetWidth*n+2*l,s.offsetHeight*n+2*l);pa(t,c)})}(t,e,i)})}class fa{distance=200;load(t){E(t)||Jt(this,"distance",t.distance)}}const ya="destroy";class ma extends vi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#V=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Pi;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&dt(ya,a)?function(t,e){const i=10*t.retina.pixelRatio,s=e.mouse.position,n=t.retina.destroyModeDistance;!n||n<0||!s||pa(t,new Yt(s.x,s.y,n+i))}(this.container,t):ga(this.container,o,ya)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&dt(ya,n.onHover.mode)||Si(ya,a)}loadModeOptions(t,...e){se(t,"destroy",fa,...e)}reset(){}}async function va(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new ma(t)))})}class ba{blink=!1;color;consent=!1;opacity=1;load(t){E(t)||(Jt(this,"blink",t.blink),void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"consent",t.consent),te(this,"opacity",t.opacity))}}class wa{distance=100;links=new ba;load(t){E(t)||(Jt(this,"distance",t.distance),this.links.load(t.links))}}function xa(t,e,i,s,n){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,s,n,a,o=!1){En(t,i,s),t.strokeStyle=Ke(n,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,n,i,s,t.hdr)})}class Ma extends vi{#V;#p;constructor(t,e){super(e),this.#p=t,this.#V=0}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#V=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==Pi)return;const s=t.mouse.position;if(!s)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const a=e.particles.grid.queryCircle(s,n,e=>this.isEnabled(t,e));for(const t of a){const a=Y(t.getPosition(),s);if(a>n)continue;const o=i.modes.grab.links,r=o.opacity,l=r-a*r/n;if(l<=0)continue;const c=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&c){const t=i.modes.grab.links;e.particles.grabLineColor=ti(this.#p,c,t.blink,t.consent)}const d=Je(t,void 0,e.particles.grabLineColor);d&&xa(e,t,d,l,s)}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&dt("grab",n.onHover.mode)}loadModeOptions(t,...e){se(t,"grab",wa,...e)}reset(){}}async function Pa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new Ma(t.pluginManager,e)))})}class ka{force=2;smooth=10;load(t){E(t)||(Jt(this,"force",t.force),Jt(this,"smooth",t.smooth))}}class Ca extends vi{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#K(t,e)}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&dt("parallax",n.onHover.mode)}loadModeOptions(t,...e){se(t,"parallax",ka,...e)}reset(){}#K(t,e){if(!this.isEnabled(t,e))return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.parallax;if(!n)return;const a=n.force,r=t.mouse.position;if(!r)return;const l=i.canvas.size,c=l.width*o,d=l.height*o,h=n.smooth,u=e.getRadius()/a,p=(r.x-c)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function Oa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new Ca(t)))})}const Da="pause";class za extends vi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==Da)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=(e?.interactivity??i.interactivity)?.events;return!!s&&dt(Da,s.onClick.mode)}reset(){}}async function Sa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new za(t)))})}class Ia{default=!0;groups=[];particles;quantity=4;load(t){E(t)||(Jt(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),te(this,"quantity",t.quantity),this.particles=vt(t.particles,t=>ft({},t)))}}const Ta="push";class Ea extends vi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==Ta)return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.push;if(!n)return;const a=W(n.quantity);if(a<=0)return;const o=ht([void 0,...n.groups]),r=ft(void 0!==o?i.actualOptions.particles.groups[o]:void 0,bt(n.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&dt(Ta,n.onClick.mode)}loadModeOptions(t,...e){se(t,"push",Ia,...e)}reset(){}}async function Ra(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new Ea(t)))})}class La{quantity=2;load(t){E(t)||te(this,"quantity",t.quantity)}}const _a="remove";class Aa extends vi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==_a)return;const s=W(i.interactivity.modes.remove.quantity);for(let t=0;t<s;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&dt(_a,n.onClick.mode)}loadModeOptions(t,...e){se(t,"remove",La,...e)}reset(){}}async function Fa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Aa(t)))})}class Va{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){E(t)||(Jt(this,"distance",t.distance),Jt(this,"duration",t.duration),Jt(this,"easing",t.easing),Jt(this,"factor",t.factor),Jt(this,"speed",t.speed),Jt(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Ba extends Va{selectors=[];load(t){super.load(t),E(t)||Jt(this,"selectors",t.selectors)}}class Ha extends Va{divs;load(t){super.load(t),E(t)||(this.divs=vt(t.divs,t=>{const e=new Ba;return e.load(t),e}))}}const qa="repulse";class Ua extends vi{handleClickMode;#Q;#F;#V;#Z;#p;#B;constructor(t,e){super(e),this.#p=t,this.#V=0,this.#Z=O.origin,this.#F=new Set,this.#Q=O.origin,this.#B=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.repulse;if(!n||t!==qa)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},n.duration*r)}}get maxDistance(){return this.#V}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#V=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#F.clear();const e=this.container.actualOptions,i=t.status===Pi,s=e.interactivity?.events;if(!s)return;const n=s.onHover,a=n.enable,o=n.mode,r=s.onClick,l=r.enable,c=r.mode,d=s.onDiv;i&&a&&dt(qa,o)?this.#J(t):l&&dt(qa,c)?this.#tt(t):Ii(qa,d,(e,i)=>{this.#et(t,e,i)}),this.#q()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv,o=n.onHover,r=n.onClick,l=Si(qa,a);if(!(l||o.enable&&s.position||r.enable&&s.clickPosition))return!1;const c=o.mode,d=r.mode;return dt(qa,c)||dt(qa,d)||l}loadModeOptions(t,...e){se(t,"repulse",Ha,...e)}reset(){}#tt(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const s=e.repulse??{particles:[]};if(s.finish||(s.count??=0,s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const n=e.retina.repulseModeDistance;if(!n||n<0)return;const a=Math.pow(n/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Yt(o.x,o.y,a),l=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of l){const{dx:e,dy:n,distance:r}=N(o,t.position),l=r**2,c=-a*i.speed/l;l<=a&&(this.#H(t),s.particles.push(t),this.#Q.x=e,this.#Q.y=n,this.#Q.length=c,t.velocity.setTo(this.#Q))}}else if(!1===s.clicking){for(const t of s.particles)t.velocity.setTo(t.initialVelocity);s.particles=[]}}#J(t){const e=this.container,i=t.mouse.position,s=e.retina.repulseModeDistance;!s||s<0||!i||this.#it(t,i,s,new Yt(i.x,i.y,s))}#it(t,e,i,s,n){const a=this.container,o=a.particles.grid.query(s,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:l,speed:c,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(l),p=(n?.speed??c)*d;for(const t of o){const{dx:s,dy:n,distance:a}=N(t.position,e),o=H(u(1-a/i)*p,0,h);this.#Z.x=a?s/a*o:p,this.#Z.y=a?n/a*o:p,this.#H(t),t.position.addTo(this.#Z)}}#q(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#B.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#B){if(this.#F.has(n))continue;if(n.destroyed){this.#B.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&n.options.move.enable&&(o.x+=n.velocity.x,o.y+=n.velocity.y,o.z+=n.velocity.z);const r=o.x-n.position.x,l=o.y-n.position.y,c=o.z-n.position.z;n.position.x+=r*s,n.position.y+=l*s,n.position.z+=c*s,Math.abs(r)<=.5&&Math.abs(l)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#B.delete(n))}}#et(t,e,i){const s=this.container,n=s.actualOptions.interactivity?.modes.repulse;if(!n)return;const a=rt().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=s.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},c=a.offsetWidth*o*r,d=i.type===ci.circle?new Yt(l.x,l.y,c):new Kt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=Ti(n.divs,a);this.#it(t,l,c,d,h)})}#H(t){this.#F.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#B.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#B.set(t,s)),s.lastInteractionTime=i,e.follow&&t.options.move.enable&&(s.target.x+=t.velocity.x,s.target.y+=t.velocity.y,s.target.z+=t.velocity.z)}}async function Wa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Ua(e,t)))})}class ja{factor=3;radius=200;load(t){E(t)||(Jt(this,"factor",t.factor),Jt(this,"radius",t.radius))}}class $a{enabled=!1;id="slow";priority=100;speedFactor=1}const Ga="slow";class Na extends vi{#V;#U=new WeakMap;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(t,e,i){const s=this.#U.get(t);s?.enabled&&!i||(t.removeModifier(Ga),this.#U.delete(t))}getOrCreateModifier(t){let e=this.#U.get(t);return e||(e=new $a,this.#U.set(t,e),t.addModifier(e)),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#V=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&dt(Ga,n.onHover.mode)}loadModeOptions(t,...e){se(t,"slow",ja,...e)}reset(t,e){const i=this.#U.get(e);i&&(i.enabled=!1);const s=this.container,n=s.actualOptions,a=t.mouse.position,o=s.retina.slowModeRadius,r=n.interactivity?.modes.slow;if(!r||!o||o<0||!a)return;const l=Y(a,e.getPosition()),c=l/o,d=r.factor;if(l>o)return;const h=this.getOrCreateModifier(e);h.enabled=!0,h.speedFactor=c/d}}async function Xa(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new Na(t)))})}const Ya=["image","images"],Ka=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Qa(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,Rt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Za(t){if("svg"!==t.type)return void await Qa(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Rt().error("Image not found"),t.error=!0),t.loading=!1}function Ja(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=Qe(e,s,i);if(n.includes("fill"))return n.replaceAll(Ka,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await Qa(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}class to{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,o=a?.element;if(a){if(e.globalAlpha=n,o){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(o,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Ya.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#st(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await Ja(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#st=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class eo{height;name;replaceColor;src="";width;load(t){E(t)||(Jt(this,"height",t.height),Jt(this,"name",t.name),Jt(this,"replaceColor",t.replaceColor),Jt(this,"src",t.src),Jt(this,"width",t.width))}}class io{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return Nr});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new eo;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function so(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.replaceColor?Za:Qa,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new io(t)),t.pluginManager.addShape(Ya,e=>Promise.resolve(new to(t,e)))})}class no extends ve{sync=!1;load(t){E(t)||(super.load(t),Jt(this,"sync",t.sync))}}class ao extends ve{sync=!1;load(t){E(t)||(super.load(t),Jt(this,"sync",t.sync))}}class oo{count=0;delay=new no;duration=new ao;load(t){E(t)||(Jt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class ro{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:A(),n=i.duration.sync?1:A();t.life={delay:e.retina.reduceFactor?W(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?W(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){se(t,"life",oo,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=G(0,i.width),o=G(0,i.width);t.position.x=U(a),t.position.y=U(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=W(l.delay.value)*r,s.duration=W(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function lo(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new ro(t)))})}class co{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ho(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new co))})}class uo{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!E(t)&&(te(this,"distance",t.distance),Jt(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 po extends bi{#V;constructor(t){super(t),this.#V=0}get maxDistance(){return this.#V}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(E(t.attractDistance)){const i=W(t.options.attract.distance);i>this.#V&&(this.#V=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,s=t.getPosition(),n=e.particles.grid.queryCircle(s,i);for(const e of n){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:a}=N(s,i),o=t.options.attract.rotate,r=n/(1e3*o.x),l=a/(1e3*o.y),c=e.size.value/t.size.value,d=1/c;t.velocity.x-=r*c,t.velocity.y-=l*c,e.velocity.x+=r*d,e.velocity.y+=l*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){se(t,"attract",uo,...e)}reset(){}}async function go(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new po(t)))})}var fo;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(fo||(fo={}));class yo{speed=2;load(t){E(t)||Jt(this,"speed",t.speed)}}class mo{enable=!0;retries=0;load(t){E(t)||(Jt(this,"enable",t.enable),Jt(this,"retries",t.retries))}}class vo{absorb=new yo;bounce=new ze;enable=!1;maxSpeed=50;mode=fo.bounce;overlap=new mo;load(t){E(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Jt(this,"enable",t.enable),te(this,"maxSpeed",t.maxSpeed),Jt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function bo(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=H(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const wo=t=>{t.options.collisions&&(t.collisionMaxSpeed??=W(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function xo(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;mt(yt(t),yt(e));const r=t.velocity.length,l=e.velocity.length,c=i*r*r+s*l*l;if(c>1e-6*o){const i=Math.sqrt(o/c);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=l*i)}wo(t),wo(e)}function Mo(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case fo.absorb:!function(t,e,i,s){const n=t.getRadius(),a=e.getRadius();!n&&a?t.destroy():n&&!a?e.destroy():n&&a&&(n>=a?bo(t,n,e,a,i,s):bo(e,a,t,n,i,s))}(t,e,i,s);break;case fo.bounce:xo(t,e);break;case fo.destroy:!function(t,e){t.unbreakable||e.unbreakable||xo(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class Po extends bi{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=this.container,n=t.getPosition(),a=t.getRadius(),o=s.particles.grid.queryCircle(n,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(n.z)-Math.round(o.z))>a+r)continue;Y(n,o)>a+r||Mo(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){se(t,"collisions",vo,...e)}reset(){}}class ko{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return Xr});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Co(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{Ei(t),t.pluginManager.addPlugin(new ko),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new Po(t)))})}class Oo extends Yt{#nt;constructor(t,e,i,s){super(t,e,i),this.#nt=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#nt,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#nt,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Yt)n=new Yt(i.x,i.y,t.radius);else{const e=t;n=new Kt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Do{blur=5;color=new le;enable=!1;constructor(){this.color.value="#000"}load(t){E(t)||(Jt(this,"blur",t.blur),this.color=le.create(this.color,t.color),Jt(this,"enable",t.enable))}}class zo{color;enable=!1;frequency=1;opacity;load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"enable",t.enable),Jt(this,"frequency",t.frequency),Jt(this,"opacity",t.opacity))}}class So{blink=!1;color=new le;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new Do;triangles=new zo;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){E(t)||(Jt(this,"id",t.id),Jt(this,"blink",t.blink),this.color=le.create(this.color,t.color),Jt(this,"consent",t.consent),Jt(this,"distance",t.distance),Jt(this,"enable",t.enable),Jt(this,"frequency",t.frequency),Jt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Jt(this,"width",t.width),Jt(this,"warp",t.warp))}}function Io(t,e,i){const{dx:s,dy:n}=N(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class To extends bi{#V;#p;constructor(t,e){super(e),this.#p=t,this.#V=0}get maxDistance(){return this.#V}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#V&&(this.#V=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<l.x||e.y<l.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,r=n.warp,c=r?new Oo(e.x,e.y,o,s):new Yt(e.x,e.y,o),d=i.particles.grid.query(c);for(const i of d){const c=i.options.links;if(t===i||!c?.enable||n.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 d=i.getPosition();if(d.x<l.x||d.y<l.y||d.x>s.width||d.y>s.height)continue;const h=N(e,d).distance,u=r&&c.warp?Io(e,d,s):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#at(t),t.links.push({destination:i,opacity:g,color:this.#ot(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){se(t,"links",So,...e)}reset(){}#ot(t,e){const i=this.container,s=t.options.links;if(!s)return;return Je(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#at(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=ti(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Eo{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return Kr});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ro(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;Ei(t),e.addPlugin(new Eo(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new To(e,t)))})}const Lo=new Map;function _o(t,e){const{context:i,radius:s}=t,n=function(t){const e=Lo.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Lo.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Ao{draw(t){const{particle:e,radius:i}=t;_o(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}}class Fo extends Ao{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Vo extends Ao{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Bo(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Fo))})}async function Ho(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Vo))})}async function qo(t){t.checkVersion("4.3.0"),await Promise.all([Bo(t),Ho(t)])}class Uo{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),Jt(this,"sync",t.sync))}}class Wo extends ve{animation=new Uo;direction=t.RotateDirection.clockwise;path=!1;load(t){E(t)||(super.load(t),Jt(this,"direction",t.direction),this.animation.load(t.animation),Jt(this,"path",t.path))}}class jo{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Q(W(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*A())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-W(n.decay),e.rotate.velocity=W(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=A())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){se(t,"rotate",Wo,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(on(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function $o(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new jo(t)))})}class Go{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function No(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Go))})}const Xo=0,Yo=0;class Ko{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(Xo,Yo-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(Xo,Yo-s*a),e.rotate(Math.PI/n),e.lineTo(Xo,Yo-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(W(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=W(i?.inset??2)}}async function Qo(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Ko))})}async function Zo(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{await Promise.all([zn(t),(async t=>{await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new mi(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,Ot(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([Oa(t),Un(t),Qn(t),oa(t),ua(t),va(t),Pa(t),Sa(t),Ra(t),Fa(t),Wa(t),Xa(t),go(t),Co(t),Ro(t)])})(t),In(t),An(t),so(t),ho(t),qo(t),No(t),Qo(t),lo(t),bn(t),$o(t)])})}const Jo=["text","character","char","multiline-text"];function tr(t,e,i,s,n,a){const r={x:-e.length*i*o,y:i*o+s*i};n&&t.fillText(e,r.x,r.y),a&&t.strokeText(e,r.x,r.y)}class er{draw(t){!function(t){const{context:e,particle:i,fill:s,stroke:n,radius:a,opacity:o}=t,r=i.shapeData;if(!r)return;const l=r.value;if(i.textLines??=bt(l,i.randomIndexData)?.split("\n")??[],i.maxTextLength??=i.textLines.length?Math.max(...i.textLines.map(t=>t.length)):i.textLines[0]?.length??0,!i.textLines.length||!i.maxTextLength)return;const c=i.textLines,d=r.style??"",h=r.weight??"400",u=r.font??"Verdana",p=2*Math.round(a)/(c.length*i.maxTextLength);e.font=`${d} ${h} ${p.toString()}px "${u}"`;const g=e.globalAlpha;e.globalAlpha=o;for(let t=0;t<c.length;t++){const i=c[t];i&&tr(e,i,p,t,s,n)}e.globalAlpha=g}(t)}async init(t){const e=t.actualOptions;if(Jo.find(t=>dt(t,e.particles.shape.type))){const t=Jo.map(t=>e.particles.shape.options[t]).find(t=>!!t),i=[];vt(t,t=>{i.push(Rn(t.font,t.weight))}),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!Jo.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;s&&(e.textLines=bt(s,e.randomIndexData)?.split("\n")??[],e.maxTextLength=e.textLines.length?Math.max(...e.textLines.map(t=>t.length)):e.textLines[0]?.length??0)}}async function ir(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Jo,()=>Promise.resolve(new er))})}var sr;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(sr||(sr={}));class nr{decay=0;enable=!1;speed=0;sync=!1;load(t){E(t)||(Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),Jt(this,"sync",t.sync))}}class ar extends ve{animation=new nr;direction=sr.clockwise;enable=!1;load(t){super.load(t),E(t)||(this.animation.load(t.animation),Jt(this,"direction",t.direction),Jt(this,"enable",t.enable))}}class or{#u;constructor(t){this.#u=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(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:Q(W(i.value)),sinDirection:A()>=o?1:-1,cosDirection:A()>=o?1:-1,min:0,max:u};let s=i.direction;if(s===sr.random){s=Math.floor(2*A())>0?sr.counterClockwise:sr.clockwise}switch(s){case sr.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case sr.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-W(n.decay),e.tilt.velocity=W(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.tilt.velocity*=A()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){se(t,"tilt",ar,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&on(e,e.tilt,!1,t.DestroyType.none,i)}}async function rr(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new or(t)))})}class lr{color;enable=!1;frequency=.05;opacity=1;load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"enable",t.enable),Jt(this,"frequency",t.frequency),te(this,"opacity",t.opacity))}}class cr{enable=!1;fillColor;frequency=.05;opacity=1;strokeColor;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=le.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=le.create(this.strokeColor,t.strokeColor)),Jt(this,"enable",t.enable),Jt(this,"frequency",t.frequency),te(this,"opacity",t.opacity))}}class dr{links=new lr;particles=new cr;load(t){E(t)||(this.links.load(t.links),this.particles.load(t.particles))}}class hr{#u;#p;constructor(t,e){this.#p=t,this.#u=e}getColorStyles(t,e,i,s){const n=t.options,a=this.#u,o=n.twinkle;if(!o)return{};const r=o.particles,l=r.enable&&A()<r.frequency,c=t.options.zIndex,d=(1-t.zIndexFactor)**c.opacityRate,h=l?W(r.opacity)*d:s,u=Ue(this.#p,r.fillColor),p=Ue(this.#p,r.strokeColor),g=(()=>{if(u)return Qe(u,a.hdr,h)})(),f=(()=>{if(p)return Qe(p,a.hdr,h)})(),y={},m=l&&(!!g||!!f);return y.fill=m?g:void 0,y.stroke=m?f:void 0,y}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){se(t,"twinkle",dr,...e)}update(){}}async function ur(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("twinkle",e=>Promise.resolve(new hr(t.pluginManager,e)))})}class pr{angle=50;move=10;load(t){E(t)||(te(this,"angle",t.angle),te(this,"move",t.move))}}class gr{distance=5;enable=!1;speed=new pr;load(t){if(!E(t)&&(te(this,"distance",t.distance),Jt(this,"enable",t.enable),void 0!==t.speed))if(S(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class fr{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:A()*u,angleSpeed:W(e.speed.angle)/360,moveSpeed:W(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=W(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){se(t,"wobble",gr,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function yr(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new fr(t)))})}async function mr(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=async t=>{await ms(t),await Promise.all([ws(t),Cs(t)])};await Promise.all([(async t=>{await Zo(t),await Promise.all([Ss(t),As(t),Ui(t),e(t)])})(t),Ji(t),qs(t),rr(t),ur(t),yr(t),ir(t)])})}const vr=globalThis;vr.loadFull=mr,vr.tsParticles=ri;function br(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class wr{#rt;#lt;#ct;#dt;#ht;#u;#ut;#pt;#gt;#ft;#yt;#mt;#p;#vt;#bt;#wt={};#xt=[void 0,void 0];#Mt={};constructor(t,e,i){this.#p=t,this.#u=e,this.#dt=i,this.#ut=null,this.#rt=null,this.#lt=new Set,this.#bt=[],this.#vt=[],this.#ct=[],this.#ht=[],this.#gt=[],this.#ft=[],this.#yt=[],this.#mt={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#pt}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(l.x,l.y,this.#dt.size.width,this.#dt.size.height)})}clear(){for(const t of this.#ct)if(t.canvasClear?.())return;for(const e of Object.values(t.DrawLayer))if("number"==typeof e)for(const t of this.#Pt(e))if(t.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#rt=null,this.#lt.clear(),this.#bt=[],this.#vt=[],this.#ct=[],this.#ht=[],this.#gt=[],this.#ft=[],this.#yt=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#mt[e]=[])}draw(t){const e=this.#ut;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(),n=t.getStrokeColor();let[a,o]=this.#kt(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#Mt,g=this.#wt,f=a?Qe(a,r.hdr,d*h):void 0,y=o?Qe(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this.#yt)i.drawParticleSetup?.(s,t,e);this.#Ct(s,t,i,h,g,p),this.#Ot({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#Dt(t);for(const i of this.#ft)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#gt)this.#zt(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u;this.clear(),i.update(e),this.draw(n=>{const a=this.#dt.size.width,o=this.#dt.size.height;if(this.#rt)try{n.drawImage(this.#rt,l.x,l.y,a,o)}catch{this.#St("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#St("background-draw-error","Error in background.draw callback")}for(const e of this.#Pt(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#Pt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#Pt(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#Pt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#It(),this.paint()}initPlugins(){this.#ct=[],this.#ht=[],this.#gt=[],this.#yt=[],this.#ft=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#mt[e]=[]);for(const e of this.#u.plugins)(e.particleFillColor??e.particleStrokeColor)&&this.#ht.push(e),e.drawParticle&&this.#gt.push(e),e.drawParticleSetup&&this.#yt.push(e),e.drawParticleCleanup&&this.#ft.push(e),e.canvasClear&&this.#ct.push(e),e.canvasPaint&&this.#Pt(t.DrawLayer.BackgroundMask).push(e),e.drawSettingsSetup&&this.#Pt(t.DrawLayer.CanvasSetup).push(e),e.draw&&this.#Pt(t.DrawLayer.PluginContent).push(e),(e.clearDraw??e.drawSettingsCleanup)&&this.#Pt(t.DrawLayer.CanvasCleanup).push(e)}initUpdaters(){this.#bt=[],this.#vt=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#vt.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#bt.push(t)}paint(){let e=!1;for(const i of this.#Pt(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(l.x,l.y,this.#dt.size.width,this.#dt.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,l.x,l.y,this.#dt.size.width,this.#dt.size.height),i.globalAlpha=s})}setContext(t){this.#ut=t,this.#ut&&(this.#ut.globalCompositeOperation=i)}setContextSettings(t){this.#pt=t}stop(){this.draw(t=>{t.clearRect(l.x,l.y,this.#dt.size.width,this.#dt.size.height)})}#Dt(t){for(const e of this.#vt)e.afterDraw?.(t)}#Ct(t,e,i,s,n,a){for(const o of this.#bt){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)br(a,t,e)}o.beforeDraw?.(e)}}#Tt(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#Et(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#Ot(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const y={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#Et(m,y),this.#Rt(v,y),this.#Lt(v,y),this.#_t(v,y),this.#Tt(m,y),i.resetTransform()}#zt(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Lt(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#_t(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#Rt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#Pt(t){return this.#mt[t]}#kt(t){let e,i;for(const s of this.#ht)if(!e&&s.particleFillColor&&(e=Ue(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ue(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#xt[0]=e,this.#xt[1]=i,this.#xt}#It(){const t=this.#u.actualOptions.background;if(this.#rt=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#rt=e:e?this.#St("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#St("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#rt=t.element)}#St(t,e){this.#lt.has(t)||(this.#lt.add(t),Rt().warning(e))}}const xr=new WeakMap;function Mr(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Pr{domElement;render;renderCanvas;size;zoom=1;#u;#At;#Ft;#Vt;#p;#Bt;#Ht;#qt;#Ut;constructor(t,e){this.#p=t,this.#u=e,this.render=new wr(t,e,this),this.#qt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#qt;this.size={height:s.height*i,width:s.width*i},this.#At=!1,this.#Ht=[],this.#Bt="none"}get#Wt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#At){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#jt();this.render.destroy(),this.#Ht=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Ut?this.#Ut:{x:e*o/t,y:i*o/t}}init(){this.#$t(t=>{t.disconnect()}),this.#Ft=ct(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Gt()}),this.resize(),this.#Nt(),this.initBackground(),this.#$t(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Xt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=He(this.#p,e.color);s.backgroundColor=n?Ke(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#Ht=[];for(const t of this.#u.plugins)t.resize&&this.#Ht.push(t)}loadCanvas(t){this.#At&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#At=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=xr.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return xr.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Vt=xt(s.style));const n=this.#qt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#qt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Bt=t,this.#Gt())}setZoom(t,e){this.zoom=t,this.#Ut=e}stop(){this.#$t(t=>{t.disconnect()}),this.#Ft=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Yt(),e&&await t.refresh()}#Yt(){for(const t of this.#Ht)t.resize?.()}#Xt(){const t=this.#u.actualOptions.hdr&<("(color-gamut: p3)")?.matches&<("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#Nt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Wt?this.#Kt():this.#jt();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#Gt(){const t=this.domElement;if(!t)return;this.#$t(t=>{t.disconnect()}),this.#Nt(),this.initBackground();const e=this.#Bt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#$t(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#jt(){const t=this.domElement,e=this.#Vt;t&&e&&Mr(t,e,!0)}#$t(t){this.#Ft&&t(this.#Ft)}#Kt(){const t=this.domElement;t&&Mr(t,kt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class kr{#u;#Qt;#Zt;#Jt;constructor(t){this.#u=t,this.#Qt={visibilityChange:()=>{this.#te()},resize:()=>{this.#ee()}}}addListeners(){this.#ie(!0)}removeListeners(){this.#ie(!1)}#te(){const t=this.#u;t.actualOptions.pauseOnBlur&&(rt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ee(){this.#Jt&&(clearTimeout(this.#Jt),this.#Jt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#Jt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#ie(t){const e=this.#Qt;this.#se(t),Ct(document,n,e.visibilityChange,t,!1)}#se(t){const e=this.#Qt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ct(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#Zt&&!t?(n&&this.#Zt.unobserve(n),this.#Zt.disconnect(),this.#Zt=void 0):!this.#Zt&&t&&n&&(this.#Zt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#ee()}),this.#Zt.observe(n))}}function Cr(t){if(!dt(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)}function Or(t,e){const i=t%e;return i<0?i+e:i}function Dr(t,e,i,s){const n=_e(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=bt(n.effect.type,t.id,a),t.shape=bt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=bt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=bt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return ft({close:e.close},bt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return ft({close:e.close},bt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class zr{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#ne={fillOpacity:1,opacity:1,strokeOpacity:1};#ae=C.origin;#oe={sin:0,cos:0};#re={a:1,b:0,c:0,d:1};#u;#U=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#U.push(t),this.#U.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#U.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#le(this.#ce(ei(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getModifier(t){return this.#U.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=W(this.opacity?.value??1),s=this.#ce(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#ne.fillOpacity=s*n*e,this.#ne.opacity=s*e,this.#ne.strokeOpacity=s*a*e,this.#ne}getPosition(){return this.#ae.x=this.position.x+this.offset.x,this.#ae.y=this.position.y+this.offset.y,this.#ae.z=this.position.z,this.#ae}getRadius(){return this.#ce(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#oe.sin=Math.sin(t),this.#oe.cos=Math.cos(t),this.#oe}getStrokeColor(){return this.#le(this.#ce(ei(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#re.a=e.cos*(t.a??c.a),this.#re.b=i?e.sin*(t.b??1):t.b??c.b,this.#re.c=i?-e.sin*(t.c??1):t.c??c.c,this.#re.d=e.cos*(t.d??c.d),this.#re}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Dr(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#de(i),this.initialVelocity=this.#he(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#ue({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ue({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Or(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Or(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Or(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#U.findIndex(e=>e.id===t);e>=0&&this.#U.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#ce(t,e){let i=t;for(const t of this.#U)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#pe(t,e){let i=0,s=t?C.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return C.create(i.x,i.y,e)}const t=st({size:l,position:s}),c=C.create(t.x,t.y,e);this.#ge(c,r,o.left??o.default),this.#ge(c,r,o.right??o.default),this.#fe(c,r,o.top??o.default),this.#fe(c,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#he(){const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Q(W(e.angle.value)),n=Q(W(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=U(G(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i}#ge(e,i,s){Cr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#fe(e,i,s){Cr({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#ye(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#me(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#ue(t){const e=this.#ye(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#me(t.direction,t.outMode),l=a?this.#ve(a(r),"shape"):void 0,c=o?this.#ve(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#le(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?oi(t,this.roll.alter.type,this.roll.alter.value):t:t}#de(e){const i=this.#u,s=Math.floor(W(this.options.zIndex.value)),n=this.#pe(e,H(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...wt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=O.origin}#ve(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Sr{#be;#we=new Map;#xe=[];#Me;#Pe;#ke=[];#Ce;constructor(t){this.#be=t,this.#Me=0,this.#Ce=0}clear(){this.#we.clear();const t=this.#Pe;t&&(this.#be=t),this.#Pe=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Oe(e,i);this.#we.has(s)||this.#we.set(s,[]),this.#we.get(s)?.push(t)}query(t,e,i=[]){const s=this.#De(t);if(!s)return i;const n=Math.floor(s.minX/this.#be),a=Math.floor(s.maxX/this.#be),o=Math.floor(s.minY/this.#be),r=Math.floor(s.maxY/this.#be);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#we.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#ze(t.x,t.y,e),a=this.query(n,i,s);return this.#Se(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ie(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Se(),a}setCellSize(t){this.#Pe=t}#ze(t,e,i){return(this.#xe[this.#Me++]??=new Yt(t,e,i)).reset(t,e,i)}#Ie(t,e,i,s){return(this.#ke[this.#Ce++]??=new Kt(t,e,i,s)).reset(t,e,i,s)}#Oe(t,e){return`${Math.floor(t/this.#be)}_${Math.floor(e/this.#be)}`}#De(t){if(t instanceof Yt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Kt){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#Se(){this.#Me=0,this.#Ce=0}}class Ir{checkParticlePositionPlugins;grid;#Te;#u;#Ee;#Re;#Le;#_e;#Ae;#Fe;#p;#Ve;#Be;#He;#qe;#Ue;#We;constructor(t,e){this.#p=t,this.#u=e,this.#Le=0,this.#Te=[],this.#Ve=[],this.#Re=0,this.#Ee=new Map,this.#_e=new Map,this.#We=this.#je(this.#u.zLayers),this.grid=new Sr(100),this.checkParticlePositionPlugins=[],this.#Ae=[],this.#Fe=[],this.#He=[],this.#Be=[],this.#Ue=[]}get count(){return this.#Te.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#Re:this.#Ee.get(s)??this.#Re,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#Ve.pop()??new zr(this.#p,this.#u);a.init(this.#Le,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#Te.push(a),this.#$e(a),this.#Le++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ve.push(a)}catch(t){Rt().warning(`error adding particle: ${t}`)}}clear(){this.#Te=[],this.#_e.clear(),this.#Ge(this.#u.zLayers)}destroy(){this.#Te=[],this.#Ve.length=0,this.#_e.clear(),this.#We=[],this.checkParticlePositionPlugins=[],this.#Ae=[],this.#Fe=[],this.#He=[],this.#Be=[],this.#Ue=[]}drawParticles(t){for(let e=this.#We.length-1;e>=0;e--){const i=this.#We[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Te.filter(t)}find(t){return this.#Te.find(t)}get(t){return this.#Te[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Ue=[],this.#Fe=[],this.#He=[],this.#Ae=[],this.#Be=[],this.#_e.clear(),this.#Ge(t.zLayers),this.grid=new Sr(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ue.push(e),e.particleUpdate&&this.#Fe.push(e),e.postUpdate&&this.#He.push(e),e.particleReset&&this.#Ae.push(e),e.postParticleUpdate&&this.#Be.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)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 n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Te.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#Ne(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=_e(this.#p,this.#u,s);this.#Xe(n,i,t)}this.#Xe(t.particles,i)}setResizeFactor(t){this.#qe=t}update(t){this.grid.clear();for(const e of this.#Ue)e.update?.(t);const e=this.#Ye(t);for(const e of this.#He)e.postUpdate?.(t);if(this.#Ke(t,e),e.size)for(const t of e)this.remove(t);this.#qe=void 0}#Qe(...t){this.#Ve.push(...t)}#Xe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Re=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Ee.set(i,s?.number.limit.value??n.limit.value));const a=this.#Ze(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Re=n.limit.value*a:this.#Ee.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#je(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Je(t){const e=this.#We.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Ze(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#$e(t){const e=this.#Je(t.position.z),i=this.#We[e];i&&(i.push(t),this.#_e.set(t.id,e))}#Ne(e,i,s){const n=this.#Te[e];return!!n&&(n.group===i&&(this.#Te.splice(e,1),this.#ti(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#Qe(n),!0))}#ti(t){const e=this.#_e.get(t.id)??this.#Je(t.position.z),i=this.#We[e];if(!i)return void this.#_e.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#_e.delete(t.id)}#Ge(t){const e=Math.max(Math.floor(t),1);if(this.#We.length===e)for(const t of this.#We)t.length=0;else this.#We=this.#je(e)}#ei(t){const e=this.#Je(t.position.z),i=this.#_e.get(t.id);if(void 0===i)return void this.#$e(t);if(i===e)return;const s=this.#We[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#We[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#_e.set(t.id,e)}else this.#_e.set(t.id,e)}#Ye(t){const e=new Set,i=this.#qe;for(const s of this.#Te){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#Ae)t.particleReset?.(s);for(const e of this.#Fe){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#Ke(t,e){for(const i of this.#Te)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Be)e.postParticleUpdate?.(i,t);this.#ei(i)}}}class Tr{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=W(s.gravity.maxSpeed)*i,a.moveDrift=W(s.drift)*i,a.moveSpeed=W(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Er(t){return!t.destroyed}function Rr(t,e,...i){const s=new Ae(t,e);return Zt(s,...i),s}var Lr=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#I;#ii;#si={value:0,factor:0};#ni;#ai;#oi;#ri;#li;#ci;#di;#hi;#ui;#pi;#gi;#p;#fi;#yi;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ni=i,this.#ui=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#fi=!1,this.#I=0,this.#oi=0,this.#hi=0,this.#li=!0,this.started=!1,this.destroyed=!1,this.#gi=!0,this.#di=0,this.zLayers=100,this.pageHidden=!1,this.#yi=o,this.#ci=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Tr(this),this.canvas=new Pr(this.#p,this),this.particles=new Ir(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#pi=Rr(this.#p,this),this.actualOptions=Rr(this.#p,this),this.#ri=new kr(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#gi&&!this.pageHidden&&Er(this)}get options(){return this.#pi}get sourceOptions(){return this.#yi}addLifeTime(t){this.#hi+=t}alive(){return!this.#oi||this.#hi<=this.#oi}destroy(e=!0){if(Er(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#ui(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ni(t,{container:this,data:e})}draw(t){if(!Er(this))return;let e=t;this.#ai=V(t=>{e&&(this.#di=void 0,e=!1),this.#mi(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}Rt().error(`Export plugin with type ${t} not found`)}async init(){if(!Er(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#pi=Rr(this.#p,this,this.#ci,this.sourceOptions),this.actualOptions=Rr(this.#p,this,this.#pi),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this.#oi=W(s)*r,this.#I=W(i)*r,this.#hi=0,this.fpsLimit=n>0?n:120,this.#fi=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(Er(this)&&(void 0!==this.#ai&&(B(this.#ai),this.#ai=void 0),!this.#gi)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#gi=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Er(this))return;const i=this.#gi||e;if(!this.#li||this.actualOptions.autoPlay){if(this.#gi&&(this.#gi=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#li=!1}async refresh(){if(Er(this))return this.stop(),this.start()}async reset(t){if(Er(this))return this.#ci=t,this.#yi=t,this.#pi=Rr(this.#p,this,this.#ci,this.sourceOptions),this.actualOptions=Rr(this.#p,this,this.#pi),this.refresh()}async start(){Er(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#ri.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ii=setTimeout(()=>{i()},this.#I)}))}stop(){if(Er(this)&&this.started){this.#ii&&(clearTimeout(this.#ii),this.#ii=void 0),this.#li=!0,this.started=!1,this.#ri.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#yi=this.#pi,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#mi(t){try{if(!this.#fi&&void 0!==this.#di&&t<this.#di+r/this.fpsLimit)return void this.draw(!1);if(this.#di??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#si,t-this.#di,this.fpsLimit,this.#fi),this.addLifeTime(this.#si.value),this.#di=t,this.#si.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#si),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Rt().error("error in animation loop",t)}}}});class _r{#vi=!0;#bi;#u;#Qt;#wi;#xi;constructor(t,e){this.#u=t,this.#bi=[],this.#wi=e,this.#xi=new Map,this.#Qt={mouseDown:()=>{this.#Mi()},mouseLeave:()=>{this.#Pi()},mouseMove:t=>{this.#ki(t)},mouseUp:t=>{this.#Ci(t)},touchStart:t=>{this.#Oi(t)},touchMove:t=>{this.#ki(t)},touchEnd:t=>{this.#Di(t)},touchCancel:t=>{this.#Di(t)},touchEndClick:t=>{this.#zi(t)},visibilityChange:()=>{this.#te()}}}addListeners(){this.#ie(!0)}init(){this.#bi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#bi.push(t)}removeListeners(){this.#ie(!1)}#Si(t){const e=this.#u,i=this.#wi,s=e.actualOptions;if(this.#vi){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;vt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#Pi()},500)}#te(){this.#Pi()}#Ii(t){const e=this.#Qt,i=this.#u,s=this.#wi,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(Ct(a,Pi,e.mouseMove,t),Ct(a,ki,e.touchStart,t),Ct(a,Oi,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(Ct(a,Ci,e.touchEndClick,t),Ct(a,xi,e.mouseUp,t),Ct(a,wi,e.mouseDown,t)):Ct(a,Ci,e.touchEnd,t):(Ct(a,Ci,e.touchEndClick,t),Ct(a,xi,e.mouseUp,t),Ct(a,wi,e.mouseDown,t),Ct(a,Ci,e.touchEnd,t)),Ct(a,Mi,e.mouseLeave,t),Ct(a,Di,e.touchCancel,t))}#ie(t){const e=this.#Qt,i=this.#u,s=this.#wi,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===di.window?s.interactivityData.element=rt():o===di.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#Ii(t),Ct(document,n,e.visibilityChange,t,!1)}#Mi(){const{interactivityData:t}=this.#wi,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Ci(t){const e=this.#u,i=this.#wi,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this.#bi)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Si(t),n.clicking=!1}}#Pi(){const{interactivityData:t}=this.#wi,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Mi,e.inside=!1,e.clicking=!1}#ki(t){const e=this.#u,i=this.#wi,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#vi=!0;const e=t;if(n.element===rt()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===di.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#vi="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=Pi}#Di(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#xi.delete(t.identifier);this.#Pi()}#zi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#xi.delete(t.identifier);this.#Ci(t)}#Oi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#xi.set(t.identifier,performance.now());this.#ki(t)}}class Ar{interactivityData;#Ti;#u;#ri;#Ei;#Ri;#Li;#_i;#p;constructor(t,e){this.#u=e,this.#p=t,this.#Ri=[],this.#Ei=[],this.#_i=[],this.#Ti=new Map,this.#ri=new _r(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Li=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Ai(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#Ti.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Ti.set(ki,()=>{e.destroyed||(a=!0,o=!1)}),this.#Ti.set(Oi,()=>{e.destroyed||(o=!0)}),this.#Ti.set(Ci,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#Ti.set(Di,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Ti)s.addEventListener(t,e)}addListeners(){this.#ri.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Ti)e.element?.removeEventListener(t,i);this.#Ti.clear()}}externalInteract(t){for(const e of this.#Ei){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#Ei)i.handleClickMode?.(t,e)}init(){this.#ri.init();for(const t of this.#Ri){switch(t.type){case hi.external:this.#Ei.push(t);break;case hi.particles:this.#_i.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#Ri=t,this.#Ei=[],this.#_i=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Ei)i.clear(t,e);for(const s of this.#_i)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#ri.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Ei)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#_i)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Li&&this.#Li.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Li&&this.#Li.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#Ri)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Ai(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var Fr=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new Ar(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new yi(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var Vr=Object.freeze({__proto__:null,AbsorbersInstancesManager:class{#Fi;#p;constructor(t){this.#p=t,this.#Fi=new Map}async addAbsorber(t,e,i){const{AbsorberInstance:s}=await Promise.resolve().then(function(){return Jr}),n=new s(this.#p,t,e,i);return this.getArray(t).push(n),n}clear(t){this.initContainer(t),this.#Fi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Fi.get(t);return e||(e=[],this.#Fi.set(t,e)),e}initContainer(t){this.#Fi.has(t)||(this.#Fi.set(t,[]),t.getAbsorber??=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addAbsorber??=(e,i)=>this.addAbsorber(t,e,i))}removeAbsorber(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Br=Object.freeze({__proto__:null,AbsorbersPluginInstance:class{#u;#v;constructor(t,e){this.#u=t,this.#v=e,this.#v.initContainer(t)}draw(t){for(const e of this.#v.getArray(this.#u))e.draw(t)}async init(){const t=vt(this.#u.actualOptions.absorbers,async t=>{await this.#v.addAbsorber(this.#u,t)});T(t)?await Promise.all(t):await t}particleUpdate(t,e){for(const i of this.#v.getArray(this.#u))if(i.attract(t,e),t.destroyed)break}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}}});const Hr=new Map;var qr=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Hr.set(t,e)}getShapeGenerator(t){return Hr.get(t)}getSupportedShapeGenerators(){return Hr.keys()}}});var Ur=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Fi;#p;constructor(t){this.#Fi=new Map,this.#p=t}async addEmitter(t,e,i){const s=new os;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return il}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Fi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Fi.get(t);return e||(e=[],this.#Fi.set(t,e)),e}initContainer(t){this.#Fi.has(t)||(this.#Fi.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Wr=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#v;constructor(t,e){this.#v=t,this.#u=e,this.#v.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(T(t))for(const e of t)await this.#v.addEmitter(this.#u,e);else await this.#v.addEmitter(this.#u,t)}pause(){for(const t of this.#v.getArray(this.#u))t.pause()}play(){for(const t of this.#v.getArray(this.#u))t.play()}resize(){for(const t of this.#v.getArray(this.#u))t.resize()}stop(){this.#v.clear(this.#u)}update(t){this.#v.getArray(this.#u).forEach(e=>{e.update(t)})}}});var jr=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Vi;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Vi&&(t.globalCompositeOperation=this.#Vi)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Vi=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function $r(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=H(t.velocity.x,-1,1),t.velocity.y=H(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var Gr=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-W(i.decay),e.pathDelay=W(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:W(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Y(i.getPosition(),a),r=W(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:A()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,d=e.size.max,h=l*(s.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/l)}(n,e,h,r):$r(e,s,h,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=N(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-A()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-A())}}(e)}preInit(){return this.#Bi()}redrawInit(){return this.#Bi()}update(){for(const t of this.pathGenerators.values())t.update()}async#Bi(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Nr=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var Xr=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#Hi(t,e,i)}#Hi(t,e,i){const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const a=n.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>Y(e,i.position)<t.getRadius()+i.getRadius())}}});function Yr(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=A(),e.set(i,n)),n}var Kr=Object.freeze({__proto__:null,LinkInstance:class{#qi=new Map;#u;#Ui;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Ui={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,a=e.retina.linksWidth??0,r=e.getPosition(),c=e.options.twinkle?.links,d=n.triangles.enable,h=d?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,y=!1;const m=()=>{y&&(t.stroke(),y=!1)};for(const u of i){if(n.frequency<1&&this.#Wi(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(m(),this.#ji(s,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,b=u.color;const w=c?.enable&&A()<c.frequency?He(this.#p,c.color):void 0;if(c&&w&&(b=w,v=W(c.opacity)),!b){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;b=Je(e,u.destination,t)}if(!b)continue;const x=this.#$i(b);if(x===p&&a===g&&v===f||(m(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),y=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=l.x,c=l.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(c=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+c),t.moveTo(r.x-a,r.y-c),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}m(),t.globalAlpha=u}init(){return this.#Ui.links.clear(),this.#Ui.triangles.clear(),this.#qi.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#ji(t,e,i,s,n,a,r){const l=i.destination,c=t.links?.triangles;if(!c?.enable||!l.options.links?.triangles.enable)return;const d=l.links;if(d?.length)for(const h of d){if(h.isWarped||this.#Wi(l,h.destination)>l.options.links.frequency||!s.has(h.destination.id))continue;const d=h.destination;if(this.#Gi(e,l,d)>(t.links?.triangles.frequency??0))continue;const u=c.opacity??(i.opacity+h.opacity)*o,p=He(this.#p,c.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#$i(p),r.globalAlpha=u,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#$i(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#qi.get(e);return i||(i=Ke(t,this.#u.hdr),this.#qi.set(e,i)),i}#Wi(t,e){return Yr([t,e],this.#Ui.links)}#Gi(t,e,i){return Yr([t,e,i],this.#Ui.triangles)}}});const Qr=u,Zr=1/360;var Jr=Object.freeze({__proto__:null,AbsorberInstance:class{color;limit;mass;name;opacity;options;position;size;#u;#Ni;#Xi;#oi;#Yi;#Ki;#Qi;#Zi;#p;#Ji;constructor(t,e,i,s){this.#u=e,this.#p=t,this.#Ni=0,this.#Xi=0,this.#Qi=s?O.create(s.x,s.y):void 0,i instanceof Ai?this.options=i:(this.options=new Ai,this.options.load(i)),this.name=this.options.name,this.opacity=this.options.opacity,this.size=W(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const n=this.options.size.limit;this.limit={radius:n.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:n.mass},this.color=He(this.#p,this.options.color)??{b:0,g:0,r:0},this.position=this.#Qi?.copy()??this.#pe(),this.#Yi=!this.options.life.wait,this.#Zi=this.options.life.count??-1,this.#Ki=this.#Zi<=0,this.#Ji=e.retina.reduceFactor?W(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0}attract(t,e){const i=this.#u,s=this.options,n=t.getPosition(),{dx:a,dy:o,distance:r}=N(this.position,n),l=O.create(a,o);if(l.length=this.mass/Math.pow(r,2)*i.retina.reduceFactor,r<this.size+t.getRadius()){const n=.033*t.getRadius()*i.retina.pixelRatio*e.factor;this.size>t.getRadius()&&r<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?s.destroy?t.destroy():(t.needsNewPosition=!0,this.#ts(t,e,l)):(s.destroy&&(t.size.value-=n),this.#ts(t,e,l)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=n),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=n*this.options.size.density*i.retina.reduceFactor)}else this.#ts(t,e,l)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(l.x,l.y,this.size,0,Qr,!1),t.closePath(),t.fillStyle=Ke(this.color,this.#u.hdr,this.opacity),t.fill()}resize(){const t=this.#Qi;this.position=t&&ut(t,this.#u.canvas.size,O.origin)?t:this.#pe()}update(t){this.#Yi&&(this.#Yi=!1,this.#Xi=this.#Ji??0),void 0!==this.#oi&&(this.#Ni+=t.value,this.#Ni>=this.#oi&&(this.#Ki||this.#Zi--,(this.#Zi>0||this.#Ki)&&(this.position=this.#pe(),this.#Ji=this.#u.retina.reduceFactor?W(this.options.life.delay??0)*r/this.#u.retina.reduceFactor:1/0),this.#Ni-=this.#oi,this.#oi=void 0)),void 0!==this.#Ji&&(this.#Xi+=t.value,this.#Xi>=this.#Ji&&(this.#es(),this.#Xi-=this.#Ji,this.#Ji=void 0))}#pe(){const t=it({size:this.#u.canvas.size,position:this.options.position});return O.create(t.x,t.y)}#es(){(this.#Zi>0||this.#Ki||!this.options.life.count)&&(this.#Yi||this.#Xi>=(this.#Ji??0))&&(this.#Zi>0||this.#Ki)&&this.#is()}#is(){const t=void 0!==this.options.life.duration?W(this.options.life.duration):void 0;(this.#Zi>0||this.#Ki)&&void 0!==t&&t>0&&(this.#oi=t*r)}#ts(e,i,s){if(e.destroyed)return;const n=this.#u,a=n.canvas.size;if(e.needsNewPosition){const t=et({size:a});e.position.setTo(t),e.velocity.setTo(e.initialVelocity),e.absorberOrbit=void 0,e.needsNewPosition=!1}if(this.options.orbits){if(void 0===e.absorberOrbit&&(e.absorberOrbit=O.origin,e.absorberOrbit.length=Y(e.getPosition(),this.position),e.absorberOrbit.angle=A()*Qr),e.absorberOrbit.length<=this.size&&!this.options.destroy){const t=Math.min(a.width,a.height),i=1,s=.1,n=.2;e.absorberOrbit.length=t*(i+(A()*n-s))}e.absorberOrbitDirection??=e.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise;const r=e.absorberOrbit.length,l=e.absorberOrbit.angle,c=e.absorberOrbitDirection;e.velocity.setTo(O.origin);const d=e.size.max,h=e.options.move.size?e.getRadius()/d:1,u=i.factor||1,p=e.retina.moveSpeed*h*u*o;e.position.x=this.position.x+r*Math.cos(l),e.position.y=this.position.y+r*(c===t.RotateDirection.clockwise?1:-1)*Math.sin(l),e.absorberOrbit.length=Math.max(0,e.absorberOrbit.length-s.length),e.absorberOrbit.angle+=p*Zr*n.retina.reduceFactor}else e.velocity.addTo(s)}}});function tl(t,e,i,s){(t.paint??=new Oe).fill={color:ce.create(void 0,{value:e}),enable:s,opacity:i}}function el(t,e,i,s){(t.paint??=new Oe).stroke={color:ce.create(void 0,{value:e}),opacity:i,width:s}}var il=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ni;#ss;#Xi;#oi;#ns;#Yi;#Ki;#Qi;#Zi;#Ft;#as;#gi;#p;#os;#Zt;#rs;#ls;#Ji;#cs;constructor(e,i,s,n,o){this.#p=e,this.#u=i,this.#os=s,this.#Ni=0,this.#ss=0,this.#Xi=0,this.#Qi=o,n instanceof os?this.options=n:(this.options=new os,this.options.load(n)),this.#Ji=i.retina.reduceFactor?W(this.options.life.delay??0)*r/i.retina.reduceFactor:1/0,this.position=this.#Qi??this.#pe(),this.name=this.options.name,this.fill=this.options.fill,this.#Yi=!this.options.life.wait,this.#cs=!1;const l=ft({},this.options.particles);if(l.move??={},l.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ue(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ue(this.#p,this.options.spawn.stroke.color)),this.#gi=!this.options.autoPlay,this.#as=l,this.#ls=this.#ds(),this.size=this.#ls.mode===t.PixelMode.percent?{width:this.#ls.width/a*this.#u.canvas.size.width,height:this.#ls.height/a*this.#u.canvas.size.height}:{width:this.#ls.width,height:this.#ls.height},this.#Zi=this.options.life.count??-1,this.#Ki=this.#Zi<=0,this.options.domId){const t=rt().getElementById(this.options.domId);t&&(this.#Ft=new MutationObserver(()=>{this.resize()}),this.#Zt=new ResizeObserver(()=>{this.resize()}),this.#Ft.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#Zt.observe(t))}const c=this.options.shape,d=this.#p.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#rs=d.generate(this.#u,this.position,this.size,this.fill,c.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#gi=!0,this.pause()}externalPlay(){this.#gi=!1,this.play()}async init(){await(this.#rs?.init())}pause(){this.#gi||(this.#ns=void 0)}play(){if(this.#gi)return;if(!(this.#Zi>0||this.#Ki)&&this.options.life.count||!(this.#Yi||this.#Xi>=(this.#Ji??0)))return;const t=this.#u;if(void 0===this.#ns){const e=W(this.options.rate.delay);this.#ns=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Zi>0||this.#Ki)&&this.#is()}resize(){const e=this.#Qi,i=this.#u;this.position=e&&ut(e,i.canvas.size,O.origin)?e:this.#pe(),this.#ls=this.#ds(),this.size=this.#ls.mode===t.PixelMode.percent?{width:this.#ls.width/a*i.canvas.size.width,height:this.#ls.height/a*i.canvas.size.height}:{width:this.#ls.width,height:this.#ls.height},this.#rs?.resize(this.position,this.size)}update(t){if(this.#gi)return;const e=this.#u;this.#Yi&&(this.#Yi=!1,this.#Xi=this.#Ji??0,this.#ss=this.#ns??0),this.#cs||(this.#cs=!0,this.#hs(this.options.startCount)),void 0!==this.#oi&&(this.#Ni+=t.value,this.#Ni>=this.#oi&&(this.pause(),void 0!==this.#Ji&&(this.#Ji=void 0),this.#Ki||this.#Zi--,this.#Zi>0||this.#Ki?(this.position=this.#pe(),this.#rs?.resize(this.position,this.size),this.#Ji=e.retina.reduceFactor?W(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#us(),this.#Ni-=this.#oi,this.#oi=void 0)),void 0!==this.#Ji&&(this.#Xi+=t.value,this.#Xi>=this.#Ji&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Xi-=this.#Ji,this.#Ji=void 0)),void 0!==this.#ns&&(this.#ss+=t.value,this.#ss>=this.#ns&&(this.#ps(),this.#ss-=this.#ns))}#pe(){const t=this.#u;if(this.options.domId){const e=rt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*o)*s,y:(i.y+i.height*o)*s}}}return it({size:t.canvas.size,position:this.options.position})}#ds(){const e=this.#u;if(this.options.domId){const i=rt().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new ns;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#us(){this.#Ft?.disconnect(),this.#Ft=void 0,this.#Zt?.disconnect(),this.#Zt=void 0,this.#os(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ps(){if(this.#gi)return;const t=W(this.options.rate.quantity);this.#hs(t)}#hs(t){const e=bt(this.#as)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:W(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:W(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:W(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,d=!!a,h=!!this.#rs,u=c||d,p=u||h,g=u?{h:m,s:v,l:b}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?ft({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#gs(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#gs(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#gs(i.l,this.spawnFillColor.l,g.l)),tl(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&g&&(this.spawnStrokeColor.h=this.#gs(a.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#gs(a.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#gs(a.l,this.spawnStrokeColor.l,g.l)),el(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#rs){const e=this.#rs.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&tl(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#is(){if(this.#gi)return;const t=void 0!==this.options.life.duration?W(this.options.life.duration):void 0;(this.#Zi>0||this.#Ki)&&void 0!==t&&t>0&&(this.#oi=t*r)}#gs(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=U(t.offset),o=W(this.options.rate.delay),l=n.retina.reduceFactor?o*r/n.retina.reduceFactor:1/0;return(e+W(t.speed)*n.fpsLimit/l+a*s)%i}}});t.AnimatableColor=ce,t.AnimationOptions=ne,t.AnimationValueWithRandom=be,t.Background=de,t.BaseRange=Xt,t.Circle=Yt,t.ColorAnimation=oe,t.Fill=ge,t.FullScreen=he,t.HslAnimation=re,t.Move=ke,t.MoveAngle=fe,t.MoveCenter=ye,t.MoveGravity=me,t.MovePath=xe,t.OptionLoader=Qt,t.Options=Ae,t.OptionsColor=le,t.OutModes=Me,t.Paint=Oe,t.ParticlesBounce=ze,t.ParticlesBounceFactor=De,t.ParticlesDensity=Se,t.ParticlesNumber=Te,t.ParticlesNumberLimit=Ie,t.ParticlesOptions=Le,t.RangedAnimationOptions=ae,t.RangedAnimationValueWithRandom=we,t.Rectangle=Kt,t.ResizeEvent=ue,t.Shape=Ee,t.Spin=Pe,t.Stroke=Ce,t.ValueWithRandom=ve,t.Vector=O,t.Vector3d=C,t.ZIndex=Re,t.alterHsl=oi,t.animate=V,t.areBoundsInside=pt,t.calcExactPositionOrRandomFromSize=st,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=et,t.calcPositionOrRandomFromSizeRanged=it,t.calculateBounds=gt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=K,t.circleBounce=mt,t.circleBounceDataFromParticle=yt,t.clamp=H,t.cloneStyle=xt,t.collisionVelocity=tt,t.colorMix=Ze,t.colorToRgb=qe,t.countOffset=1,t.decayOffset=1,t.deepExtend=ft,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Q,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=vt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Y,t.getDistanceSq=X,t.getDistances=N,t.getFullScreenStyle=kt,t.getHslAnimationFromHsl=ii,t.getHslFromAnimation=ei,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=Ot,t.getLinkColor=Je,t.getLinkRandomColor=ti,t.getLogger=Rt,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=wt,t.getRandom=A,t.getRandomFn=function(){return L},t.getRandomInRange=F,t.getRandomRgbColor=Ye,t.getRangeMax=$,t.getRangeMin=j,t.getRangeValue=W,t.getStyleFromHsl=Qe,t.getStyleFromRgb=Ke,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=Ge,t.hslToRgbFloat=Ne,t.hslaToRgba=Xe,t.identity=1,t.inverseFactorNumerator=1,t.isArray=T,t.isBoolean=D,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=E,t.isNumber=S,t.isObject=I,t.isPointInside=ut,t.isString=z,t.itemFromArray=ht,t.itemFromSingleOrMultiple=bt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=ft(t[e]??{},i))},t.loadFull=mr,t.loadLazyProperty=ie,t.loadMinIndex=0,t.loadNestedProperty=ee,t.loadOptionProperty=se,t.loadOptions=Zt,t.loadParticlesOptions=_e,t.loadProperty=Jt,t.loadRandomFactor=1e4,t.loadRangeProperty=te,t.manageListener=Ct,t.maxNits=M,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=q,t.none=0,t.one=1,t.originPoint=l,t.parseAlpha=nt,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=U,t.rangeColorToHsl=Ue,t.rangeColorToRgb=He,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=We,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=rt,t.safeMatchMedia=lt,t.safeMutationObserver=ct,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Et.debug=Tt(t.debug)),t.error&&(Et.error=Tt(t.error)),t.info&&(Et.info=Tt(t.info)),t.log&&(Et.log=Tt(t.log)),t.trace&&(Et.trace=Tt(t.trace)),t.verbose&&(Et.verbose=Tt(t.verbose)),t.warning&&(Et.warning=Tt(t.warning))},t.setRandom=function(t=Math.random){L=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Be(t,e)?.a},t.stringToRgb=je,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ri,t.updateColor=ai,t.updateColorValue=ni,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadExtendProperty,loadFull:(globalThis.__tsParticlesInternals.bundles.full||{}).loadFull,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.full||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.full||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.full||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.full||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.full||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.full||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|