@tsparticles/engine 4.1.1 → 4.1.2

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.
@@ -69,7 +69,7 @@ export class Engine {
69
69
  return this.#domArray;
70
70
  }
71
71
  get version() {
72
- return "4.1.1";
72
+ return "4.1.2";
73
73
  }
74
74
  addEventListener(type, listener) {
75
75
  this.#eventDispatcher.addEventListener(type, listener);
@@ -69,7 +69,7 @@ export class Engine {
69
69
  return this.#domArray;
70
70
  }
71
71
  get version() {
72
- return "4.1.1";
72
+ return "4.1.2";
73
73
  }
74
74
  addEventListener(type, listener) {
75
75
  this.#eventDispatcher.addEventListener(type, listener);
@@ -69,7 +69,7 @@ export class Engine {
69
69
  return this.#domArray;
70
70
  }
71
71
  get version() {
72
- return "4.1.1";
72
+ return "4.1.2";
73
73
  }
74
74
  addEventListener(type, listener) {
75
75
  this.#eventDispatcher.addEventListener(type, listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/engine",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
5
5
  "homepage": "https://particles.js.org",
6
6
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* tsParticles Engine v4.1.1 */
2
+ /* tsParticles Engine v4.1.2 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5
5
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -1118,7 +1118,7 @@
1118
1118
  return this.#domArray;
1119
1119
  }
1120
1120
  get version() {
1121
- return "4.1.1";
1121
+ return "4.1.2";
1122
1122
  }
1123
1123
  addEventListener(type, listener) {
1124
1124
  this.#eventDispatcher.addEventListener(type, listener);
@@ -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.engine=t.__tsParticlesInternals.engine||{}))}(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",u="mid",d=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,P=100,w=.25,b=.75;var x;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class z{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 z.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 z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,M(t))}add(t){return z.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 z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.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 z.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 z.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 S extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return S.create(l.x,l.y)}static clone(t){return S.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new S(t,e??l.y):new S(t.x,t.y)}}function I(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function C(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function k(t){return Array.isArray(t)}function R(t){return null==t}const _=Math.PI/180;let T=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(T(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function F(t){return E.nextFrame(t)}function B(t){E.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function V(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=W(t);let i=H(t);return e===i&&(i=0),L(i,e)}function q(t){return C(t)?t:$(t)}function H(t){return C(t)?t:t.min}function W(t){return C(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&C(t))return t;const i=H(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function Q(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function G(t,e,i){return j(t,e)<=i*i}function X(t){return t*_}function Y(e,i,s){if(C(e))return X(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*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;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()*d}}function Z(t){const e=S.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return S.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function K(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function tt(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var et,it,st,nt,at,ot;t.AnimationMode=void 0,(et=t.AnimationMode||(t.AnimationMode={})).auto="auto",et.increase="increase",et.decrease="decrease",et.random="random",t.AnimationStatus=void 0,(it=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",it.decreasing="decreasing",t.DestroyType=void 0,(st=t.DestroyType||(t.DestroyType={})).none="none",st.max="max",st.min="min",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",t.StartValueType=void 0,(ot=t.StartValueType||(t.StartValueType={})).max="max",ot.min="min",ot.random="random";function rt(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,a=e?.keyFn,o=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>o(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${o(t[i],e)}`).join(",")}}`},r=t=>a?a(t):(t=>o(t))(t);return(...e)=>{const a=r(e),o=Date.now(),l=i.get(a);if(void 0!==l){if(!(n&&o-l.ts>n))return i.delete(a),i.set(a,{value:l.value,ts:l.ts}),l.value;i.delete(a)}const c=t(...e);return i.set(a,{value:c,ts:o}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function lt(){return"undefined"!=typeof matchMedia}function ct(){return globalThis.document}function ht(t){if(lt())return matchMedia(t)}function ut(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||k(e)&&e.includes(t)}function pt(t){return Math.floor(A()*t.length)}function ft(t,e,i=!0){return t[void 0!==e&&i?e%t.length:pt(t)]}function gt(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 mt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function yt(t,...e){for(const i of e){if(R(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(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 D(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=>yt(void 0,t)):yt(e[n],a)}}return t}function vt(t,e){return k(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Pt(t,e,i){return k(t)?ft(t,e,i):t}function wt(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}}function bt(t,e){return wt(t,e)}function xt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||R(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}const Mt=rt(function(t){const e=ct().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function zt(t,e,i,s,n){if(s){let s={passive:!0};I(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 St(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 It(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 Ct;t.EventType=void 0,(Ct=t.EventType||(t.EventType={})).configAdded="configAdded",Ct.containerInit="containerInit",Ct.particlesSetup="particlesSetup",Ct.containerStarted="containerStarted",Ct.containerStopped="containerStopped",Ct.containerDestroyed="containerDestroyed",Ct.containerPaused="containerPaused",Ct.containerPlay="containerPlay",Ct.containerBuilt="containerBuilt",Ct.particleAdded="particleAdded",Ct.particleDestroyed="particleDestroyed",Ct.particleRemoved="particleRemoved";class Dt{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 It(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 It(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return St(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 kt=t=>(...e)=>{t(...e)},Rt={debug:kt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:kt(console.info),log:kt(console.log),trace:kt(console.trace),verbose:kt(console.log),warning:kt(console.warn)};function _t(){return Rt}const Tt="100%";class Et{pluginManager=new Dt(this);#h=[];#u=new Ot;#o=!1;get items(){return this.#h}get version(){return"4.1.1"}addEventListener(t,e){this.#u.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.#u.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 fi}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=Pt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(_t().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=Pt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),u=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(u);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,u)}else c.push(u);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ct();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 u.canvas.loadCanvas(d),await u.start(),u}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#u.removeEventListener(t,e)}}var At,Lt,Ft,Bt,Ut,Vt,$t,qt;!function(t){t.circle="circle",t.rectangle="rectangle"}(At||(At={}));class Ht{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 Wt extends Ht{radius;constructor(t,e,i){super(t,e,At.circle),this.radius=i}contains(t){return G(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 Wt||t.type===At.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Nt||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 Nt extends Ht{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 Wt)return t.intersects(this);if(!(t instanceof Nt))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.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Bt=t.OutMode||(t.OutMode={})).bounce="bounce",Bt.none="none",Bt.out="out",Bt.destroy="destroy",Bt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.GradientType=void 0,(Vt=t.GradientType||(t.GradientType={})).linear="linear",Vt.radial="radial",Vt.random="random",t.ParticleOutType=void 0,($t=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",$t.inside="inside",$t.outside="outside",t.EasingType=void 0,(qt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",qt.easeInBounce="ease-in-bounce",qt.easeInCirc="ease-in-circ",qt.easeInCubic="ease-in-cubic",qt.easeInElastic="ease-in-elastic",qt.easeInExpo="ease-in-expo",qt.easeInGaussian="ease-in-gaussian",qt.easeInLinear="ease-in-linear",qt.easeInQuad="ease-in-quad",qt.easeInQuart="ease-in-quart",qt.easeInQuint="ease-in-quint",qt.easeInSigmoid="ease-in-sigmoid",qt.easeInSine="ease-in-sine",qt.easeInSmoothstep="ease-in-smoothstep",qt.easeOutBack="ease-out-back",qt.easeOutBounce="ease-out-bounce",qt.easeOutCirc="ease-out-circ",qt.easeOutCubic="ease-out-cubic",qt.easeOutElastic="ease-out-elastic",qt.easeOutExpo="ease-out-expo",qt.easeOutGaussian="ease-out-gaussian",qt.easeOutLinear="ease-out-linear",qt.easeOutQuad="ease-out-quad",qt.easeOutQuart="ease-out-quart",qt.easeOutQuint="ease-out-quint",qt.easeOutSigmoid="ease-out-sigmoid",qt.easeOutSine="ease-out-sine",qt.easeOutSmoothstep="ease-out-smoothstep",qt.easeInOutBack="ease-in-out-back",qt.easeInOutBounce="ease-in-out-bounce",qt.easeInOutCirc="ease-in-out-circ",qt.easeInOutCubic="ease-in-out-cubic",qt.easeInOutElastic="ease-in-out-elastic",qt.easeInOutExpo="ease-in-out-expo",qt.easeInOutGaussian="ease-in-out-gaussian",qt.easeInOutLinear="ease-in-out-linear",qt.easeInOutQuad="ease-in-out-quad",qt.easeInOutQuart="ease-in-out-quart",qt.easeInOutQuint="ease-in-out-quint",qt.easeInOutSigmoid="ease-in-out-sigmoid",qt.easeInOutSine="ease-in-out-sine",qt.easeInOutSmoothstep="ease-in-out-smoothstep";class Qt{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){R(t)||(void 0!==t.count&&(this.count=N(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=N(t.speed)),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.delay&&(this.delay=N(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class jt extends Qt{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Gt extends Qt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),R(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=N(t.offset)))}}class Xt{h=new Gt(0,y);l=new Gt(0,P);s=new Gt(0,v);load(t){R(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Yt{value;constructor(){this.value=""}static create(t,e){const i=new Yt;return i.load(t),void 0!==e&&(O(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){R(t)||R(t.value)||(this.value=t.value)}}class Zt extends Yt{animation;constructor(){super(),this.animation=new Xt}static create(t,e){const i=new Zt;return i.load(t),void 0!==e&&(O(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Jt{color;image;opacity;position;repeat;size;constructor(){this.color=new Yt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Yt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Kt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class te{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){R(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ee{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ie{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class se{offset;value;constructor(){this.offset=0,this.value=90}load(t){R(t)||(void 0!==t.offset&&(this.offset=N(t.offset)),void 0!==t.value&&(this.value=N(t.value)))}}class ne{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){R(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ae{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=N(t.maxSpeed)))}}class oe{value;constructor(){this.value=0}load(t){R(t)||R(t.value)||(this.value=N(t.value))}}class re extends oe{animation=new Qt;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class le{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new oe,this.enable=!1,this.options={}}load(t){R(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options)))}}class ce{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){R(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 he{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=yt({},t.position)))}}class ue{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new se,this.center=new ne,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ae,this.path=new le,this.outModes=new ce,this.random=!1,this.size=!1,this.speed=2,this.spin=new he,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(R(t))return;this.angle.load(C(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=C(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=N(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=N(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class de{color;opacity;width;constructor(){this.width=0}load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.width&&(this.width=N(t.width)),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class pe{color;fill;stroke;load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new ie,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new de,this.stroke.load(t.stroke)))}}class fe extends oe{constructor(){super(),this.value=1}}class ge{horizontal;vertical;constructor(){this.horizontal=new fe,this.vertical=new fe}load(t){R(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class me{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(R(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class ye{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ve{density;limit;value;constructor(){this.density=new me,this.limit=new ye,this.value=0}load(t){R(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Pe{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class we extends oe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),R(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class be{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#d;#p;constructor(t,e){this.#p=t,this.#d=e,this.bounce=new ge,this.effect=new ee,this.groups={},this.move=new ue,this.number=new ve,this.paint=new pe,this.paint.color=new Zt,this.paint.color.value="#fff",this.paint.fill=new ie,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Pe,this.zIndex=new we}load(t){if(R(t))return;if(t.palette&&(this.palette=t.palette,this.#f(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]=yt(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&&(k(e)?this.paint=vt(e,t=>{const e=new pe;return e.load(t),e}):k(this.paint)?(this.paint=new pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#d){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#d,this,t);const e=this.#p.updaters.get(this.#d);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f=t=>{const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(k(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 xe(t,...e){for(const i of e)t.load(i)}function Me(t,e,...i){const s=new be(t,e);return xe(s,...i),s}class ze{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#d;#p;constructor(t,e){this.#p=t,this.#d=e,this.autoPlay=!0,this.background=new Jt,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Kt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Me(this.#p,this.#d),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new te,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(R(t))return;void 0!==t.preset&&(this.preset=t.preset,vt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=N(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=N(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;I(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=yt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#d,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function Se(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ie(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Oe(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ce(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,u=s.getPosition(),d=s.getTransformData(l),p={x:u.x,y:u.y};i.setTransform(d.a,d.b,d.c,d.d,u.x,u.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:d,position:{...u},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;ke(y,m),Te(v,m),Re(v,m),_e(v,m),De(y,m),i.resetTransform()}function De(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function ke(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Re(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())}function _e(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function Te(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ee(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Ae=new Map;function Le(t,e){let i=Ae.get(t);if(!i){if(i=e(),Ae.size>=1e3){[...Ae.keys()].slice(0,500).forEach(t=>Ae.delete(t))}Ae.set(t,i)}return 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 Ue(t,n.value,i,s);if(k(n.value)){const e=ft(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 Ue(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?We():qe(t,n.value);if(k(n.value)){const e=ft(n.value,i,s);if(!e)return;return Ue(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ve(t,e,i,s=!0){const n=Be(t,e,i,s);return n?$e(n):void 0}function $e(t){const e=t.r/m,i=t.g/m,s=t.b/m,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*=P,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function qe(t,e){return Fe(t,e)}function He(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/y,a=i/v,r=s/P;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=(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},c=r<o?r*(1+a):r+a-r*a,h=2*r-c,u=1/3,d=Math.min(m,m*l(h,c,n+u)),p=Math.min(m,m*l(h,c,n)),f=Math.min(m,m*l(h,c,n-u));return{r:Math.round(d),g:Math.round(p),b:Math.round(f)}}function We(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?Qe(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){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function je(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?function(t,e){return Qe(He(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Ge(t,e,i,s){let n=t,a=e;return"r"in n||(n=He(t)),"r"in a||(a=He(e)),{b:V(n.b,a.b,i,s),g:V(n.g,a.g,i,s),r:V(n.r,a.r,i,s)}}function Xe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ye(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=N(i.offset)):e.velocity=0}function Ze(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?$(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=U(e.value,l,r)}function Je(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const Ke=new Et,ti=globalThis;ti.__tsParticlesInternals=ti.__tsParticlesInternals??{},ti.tsParticles=Ke;function ei(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ii{#m;#y;#v;#P;#w;#d;#b;#x;#M;#z;#S;#I;#O;#C;#p;#D;#k;#R={};#_=[void 0,void 0];#T={};constructor(t,e,i){this.#p=t,this.#d=e,this.#y=i,this.#b=null,this.#k=[],this.#D=[],this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#z=[],this.#S=[],this.#I=[],this.#C=[],this.#O=[]}get settings(){return this.#x}canvasClear(){this.#d.actualOptions.clear&&this.draw(t=>{Oe(t,this.#y.size)})}clear(){let t=!1;for(const e of this.#m)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#k=[],this.#D=[],this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#z=[],this.#S=[],this.#I=[],this.#C=[],this.#O=[]}draw(t){const e=this.#b;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.#E(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#d,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:u,strokeOpacity:d}=t.getOpacity(),p=this.#T,f=this.#R,g=a?je(a,r.hdr,h*u):void 0,m=o?je(o,r.hdr,d*u):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#S)i.drawParticleSetup?.(s,t,e);this.#A(s,t,i,u,f,p),Ce({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:u,transform:p}),this.#L(t);for(const i of this.#z)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#M)Ee(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#d;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#C)e.drawSettingsSetup?.(i,t);for(const e of this.#I)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#P)e.clearDraw?.(i,t);for(const e of this.#O)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#S=[],this.#z=[],this.#I=[],this.#C=[],this.#O=[];for(const t of this.#d.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#w.push(t),t.canvasClear&&this.#m.push(t),t.canvasPaint&&this.#v.push(t),t.drawParticle&&this.#M.push(t),t.drawParticleSetup&&this.#S.push(t),t.drawParticleCleanup&&this.#z.push(t),t.draw&&this.#I.push(t),t.drawSettingsSetup&&this.#C.push(t),t.drawSettingsCleanup&&this.#O.push(t),t.clearDraw&&this.#P.push(t)}initUpdaters(){this.#k=[],this.#D=[];for(const t of this.#d.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#k.push(t)}paint(){let t=!1;for(const e of this.#v)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Se(e,this.#y.size,t)})}paintImage(t,e){this.draw(i=>{Ie(i,this.#y.size,t,e)})}setContext(t){this.#b=t,this.#b&&(this.#b.globalCompositeOperation=i)}setContextSettings(t){this.#x=t}stop(){this.draw(t=>{Oe(t,this.#y.size)})}#L=t=>{for(const e of this.#D)e.afterDraw?.(t)};#A=(t,e,i,s,n,a)=>{for(const o of this.#k){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)ei(a,t,e)}o.beforeDraw?.(e)}};#E=t=>{let e,i;for(const s of this.#w)if(!e&&s.particleFillColor&&(e=Ve(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ve(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#_[0]=e,this.#_[1]=i,this.#_}}const si=new WeakMap;function ni(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 ai{domElement;render;renderCanvas;size;zoom=1;#d;#F;#B;#U;#p;#V;#$;#q;#H;constructor(t,e){this.#p=t,this.#d=e,this.render=new ii(t,e,this),this.#q={height:0,width:0};const i=e.retina.pixelRatio,s=this.#q;this.size={height:s.height*i,width:s.width*i},this.#F=!1,this.#$=[],this.#V="none"}get#W(){return this.#d.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#F){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#N();this.render.destroy(),this.#$=[]}getZoomCenter(){const t=this.#d.retina.pixelRatio,{width:e,height:i}=this.size;return this.#H?this.#H:{x:e*o/t,y:i*o/t}}init(){this.#Q(t=>{t.disconnect()}),this.#B=ut(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#j()}),this.resize(),this.#G(),this.initBackground(),this.#Q(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#d,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.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#$=[];for(const t of this.#d.plugins)t.resize&&this.#$.push(t)}loadCanvas(t){this.#F&&this.domElement&&this.domElement.remove();const i=this.#d,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#F=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=si.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 si.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#U=xt(n.style));const a=this.#q,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#d.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=ht("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#Q(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#Q(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#d,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#q,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.#d.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#V=t,this.#j())}setZoom(t,e){this.zoom=t,this.#H=e}stop(){this.#Q(t=>{t.disconnect()}),this.#B=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#d,e=t.updateActualOptions();t.particles.setDensity(),this.#X(),e&&await t.refresh()}#X=()=>{for(const t of this.#$)t.resize?.()};#G=()=>{const t=this.domElement,e=this.#d.actualOptions;if(t){this.#W?this.#Y():this.#N();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")}}};#j=()=>{const t=this.domElement;if(!t)return;this.#Q(t=>{t.disconnect()}),this.#G(),this.initBackground();const e=this.#V;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Q(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#N=()=>{const t=this.domElement,e=this.#U;t&&e&&ni(t,e,!0)};#Q=t=>{this.#B&&t(this.#B)};#Y=()=>{const t=this.domElement;t&&ni(t,Mt(this.#d.actualOptions.fullScreen.zIndex),!0)}}class oi{#d;#Z;#J;#K;constructor(t){this.#d=t,this.#Z={visibilityChange:()=>{this.#tt()},resize:()=>{this.#et()}}}addListeners(){this.#it(!0)}removeListeners(){this.#it(!1)}#tt=()=>{const t=this.#d;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#et=()=>{this.#K&&(clearTimeout(this.#K),this.#K=void 0);const t=async()=>{const t=this.#d.canvas;await t.windowResize()};this.#K=setTimeout(()=>{t()},this.#d.actualOptions.resize.delay*r)};#it=t=>{const e=this.#Z;this.#st(t),zt(document,n,e.visibilityChange,t,!1)};#st=t=>{const e=this.#Z,i=this.#d;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#J&&!t?(n&&this.#J.unobserve(n),this.#J.disconnect(),this.#J=void 0):!this.#J&&t&&n&&(this.#J=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#et()}),this.#J.observe(n))}}function ri(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)}class li{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;#nt={fillOpacity:1,opacity:1,strokeOpacity:1};#at=z.origin;#ot={sin:0,cos:0};#rt={a:1,b:0,c:0,d:1};#d;#p;constructor(t,e){this.#p=t,this.#d=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#d,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.#d.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#d.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#lt(this.bubble.color??Xe(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.#nt.fillOpacity=i*s*e,this.#nt.opacity=i*e,this.#nt.strokeOpacity=i*n*e,this.#nt}getPosition(){return this.#at.x=this.position.x+this.offset.x,this.#at.y=this.position.y+this.offset.y,this.#at.z=this.position.z,this.#at}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ot.sin=Math.sin(t),this.#ot.cos=Math.cos(t),this.#ot}getStrokeColor(){return this.#lt(this.bubble.color??Xe(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#rt.a=e.cos*(t.a??c.a),this.#rt.b=i?e.sin*(t.b??1):t.b??c.b,this.#rt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#rt.d=e.cos*(t.d??c.d),this.#rt}init(e,i,s,n){const a=this.#d;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.size={value:1,max:1,min:1,enable:!1},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.actualOptions,r=Me(this.#p,a,o.particles),l=r.reduceDuplicates,c=r.effect.type,u=r.shape.type;this.effect=Pt(c,this.id,l),this.shape=Pt(u,this.id,l);const d=r.effect,p=r.shape;if(s){if(s.effect?.type&&s.effect.type!==this.effect){const t=Pt(s.effect.type,this.id,l);t&&(this.effect=t,d.load(s.effect))}if(s.shape?.type&&s.shape.type!==this.shape){const t=Pt(s.shape.type,this.id,l);t&&(this.shape=t,p.load(s.shape))}}if(this.effect===h){const t=[...this.#d.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this.#d.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},Pt(n,i,s))}(this.effect,d,this.id,l):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},Pt(n,i,s))}(this.shape,p,this.id,l):void 0,r.load(s);const f=this.effectData,g=this.shapeData;f&&r.load(f.particles),g&&r.load(g.particles),this.effectClose=f?.close??r.effect.close,this.shapeClose=g?.close??r.shape.close,this.options=r,a.retina.initParticle(this);for(const t of a.particleUpdaters)t.preInit?.(this);let m,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#ct(i),this.initialVelocity=this.#ht(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(m=a.effectDrawers.get(this.effect)),m?.loadEffect&&m.loadEffect(this),this.shape&&(y=a.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);m?.particleInit?.(a,this),y?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#ut({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ut({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=t%d,i=e<0?e+d:e;return i>=Math.PI*o&&i<3*Math.PI*o}if(this.roll.horizontal){const e=(t+Math.PI*o)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#d.particleUpdaters)t.reset?.(this)}#dt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#d,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=tt({size:l,position:s}),c=z.create(t.x,t.y,e);this.#pt(c,r,o.left??o.default),this.#pt(c,r,o.right??o.default),this.#ft(c,r,o.top??o.default),this.#ft(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}return s};#ht=()=>{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=X(q(e.angle.value)),n=X(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=$(N(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i};#pt=(e,i,s)=>{ri({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#d.canvas.size.width,setCb:t=>e.x+=t,radius:i})};#ft=(e,i,s)=>{ri({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#d.canvas.size.height,setCb:t=>e.y+=t,radius:i})};#gt=(e,i)=>{const s=this.getRadius(),n=this.#d.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"}};#mt=(t,e)=>({canvasSize:this.#d.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#ut=t=>{const e=this.#gt(t.direction,t.outMode),i=this.#d,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.#mt(t.direction,t.outMode),l=a?this.#yt(a(r),"shape"):void 0,c=o?this.#yt(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};#lt=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?Je(t,this.roll.alter.type,this.roll.alter.value):t:t;#ct=e=>{const i=this.#d,s=Math.floor(q(this.options.zIndex.value)),n=this.#dt(e,U(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=Y(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=S.origin};#yt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class ci{#vt;#Pt=new Map;#wt=[];#bt;#xt;#Mt=[];#zt;constructor(t){this.#vt=t,this.#bt=0,this.#zt=0}clear(){this.#Pt.clear();const t=this.#xt;t&&(this.#vt=t),this.#xt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#St(e,i);this.#Pt.has(s)||this.#Pt.set(s,[]),this.#Pt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#It(t);if(!s)return i;const n=Math.floor(s.minX/this.#vt),a=Math.floor(s.maxX/this.#vt),o=Math.floor(s.minY/this.#vt),r=Math.floor(s.maxY/this.#vt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Pt.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.#Ot(t.x,t.y,e),a=this.query(n,i,s);return this.#Ct(),a}queryRectangle(t,e,i,s=[]){const n=this.#Dt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Ct(),a}setCellSize(t){this.#xt=t}#Ot(t,e,i){return(this.#wt[this.#bt++]??=new Wt(t,e,i)).reset(t,e,i)}#Dt(t,e,i,s){return(this.#Mt[this.#zt++]??=new Nt(t,e,i,s)).reset(t,e,i,s)}#St(t,e){return`${Math.floor(t/this.#vt)}_${Math.floor(e/this.#vt)}`}#It(t){if(t instanceof Wt){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 Nt){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}#Ct(){this.#bt=0,this.#zt=0}}class hi{checkParticlePositionPlugins;grid;#kt;#d;#Rt;#_t;#Tt;#Et;#At;#Lt;#p;#Ft;#Bt;#Ut;#Vt;#$t;#qt;constructor(t,e){this.#p=t,this.#d=e,this.#Tt=0,this.#kt=[],this.#Ft=[],this.#_t=0,this.#Rt=new Map,this.#Et=new Map,this.#qt=this.#Ht(this.#d.zLayers),this.grid=new ci(100),this.checkParticlePositionPlugins=[],this.#At=[],this.#Lt=[],this.#Ut=[],this.#Bt=[],this.#$t=[]}get count(){return this.#kt.length}addParticle(e,i,s,n){const a=this.#d.actualOptions.particles.number.limit.mode,o=void 0===s?this.#_t:this.#Rt.get(s)??this.#_t,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.#Ft.pop()??new li(this.#p,this.#d);a.init(this.#Tt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#kt.push(a),this.#Wt(a),this.#Tt++,this.#d.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ft.push(a)}catch(t){_t().warning(`error adding particle: ${t}`)}}clear(){this.#kt=[],this.#Et.clear(),this.#Nt(this.#d.zLayers)}destroy(){this.#kt=[],this.#Ft.length=0,this.#Et.clear(),this.#qt=[],this.checkParticlePositionPlugins=[],this.#At=[],this.#Lt=[],this.#Ut=[],this.#Bt=[],this.#$t=[]}drawParticles(t){for(let e=this.#qt.length-1;e>=0;e--){const i=this.#qt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#kt.filter(t)}find(t){return this.#kt.find(t)}get(t){return this.#kt[t]}async init(){const t=this.#d,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#$t=[],this.#Lt=[],this.#Ut=[],this.#At=[],this.#Bt=[],this.#Et.clear(),this.#Nt(t.zLayers),this.grid=new ci(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#$t.push(e),e.particleUpdate&&this.#Lt.push(e),e.postUpdate&&this.#Ut.push(e),e.particleReset&&this.#At.push(e),e.postParticleUpdate&&this.#Bt.push(e);await this.#d.initDrawersAndUpdaters();for(const e of this.#d.effectDrawers.values())await(e.init?.(t));for(const e of this.#d.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.#d.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#kt.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.#Qt(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#d.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#d.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Me(this.#p,this.#d,s);this.#jt(n,i,t)}this.#jt(t.particles,i)}setResizeFactor(t){this.#Vt=t}update(t){this.grid.clear();for(const e of this.#$t)e.update?.(t);const e=this.#Gt(t);for(const e of this.#Ut)e.postUpdate?.(t);if(this.#Xt(t,e),e.size)for(const t of e)this.remove(t);this.#Vt=void 0}#Yt=(...t)=>{this.#Ft.push(...t)};#jt=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#_t=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Rt.set(i,s?.number.limit.value??n.limit.value));const a=this.#Zt(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.#_t=n.limit.value*a:this.#Rt.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)};#Ht=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#Jt=t=>{const e=this.#qt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#Kt=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#Zt=t=>{const e=this.#d;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};#Wt=t=>{const e=this.#Jt(t.position.z),i=this.#qt[e];i&&(i.splice(this.#Kt(i,t.id),0,t),this.#Et.set(t.id,e))};#Qt=(e,i,s)=>{const n=this.#kt[e];return!!n&&(n.group===i&&(this.#kt.splice(e,1),this.#te(n),n.destroy(s),this.#d.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#Yt(n),!0))};#te=t=>{const e=this.#Et.get(t.id)??this.#Jt(t.position.z),i=this.#qt[e];if(!i)return void this.#Et.delete(t.id);const s=this.#Kt(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#Et.delete(t.id)):this.#Et.delete(t.id)};#Nt=t=>{const e=Math.max(Math.floor(t),1);if(this.#qt.length===e)for(const t of this.#qt)t.length=0;else this.#qt=this.#Ht(e)};#ee=t=>{const e=this.#Jt(t.position.z),i=this.#Et.get(t.id);if(void 0===i)return void this.#Wt(t);if(i===e)return;const s=this.#qt[i];if(s){const e=this.#Kt(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#qt[e];n?(n.splice(this.#Kt(n,t.id),0,t),this.#Et.set(t.id,e)):this.#Et.set(t.id,e)};#Gt=t=>{const e=new Set,i=this.#Vt;for(const s of this.#kt){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.#At)t.particleReset?.(s);for(const e of this.#Lt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#Xt=(t,e)=>{for(const i of this.#kt)if(i.destroyed)e.add(i);else{for(const e of this.#d.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Bt)e.postParticleUpdate?.(i,t);this.#ee(i)}}}class ui{pixelRatio;reduceFactor;#d;constructor(t){this.#d=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#d,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 di(t){return!t.destroyed}function pi(t,e,...i){const s=new ze(t,e);return xe(s,...i),s}var fi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#ie;#se;#ne={value:0,factor:0};#ae;#oe;#re;#le;#ce;#he;#ue;#de;#pe;#fe;#ge;#p;#me;#ye;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ae=i,this.#pe=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#me=!1,this.#ie=0,this.#re=0,this.#de=0,this.#ce=!0,this.started=!1,this.destroyed=!1,this.#ge=!0,this.#ue=0,this.zLayers=100,this.pageHidden=!1,this.#ye=o,this.#he=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ui(this),this.canvas=new ai(this.#p,this),this.particles=new hi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#fe=pi(this.#p,this),this.actualOptions=pi(this.#p,this),this.#le=new oi(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#ge&&!this.pageHidden&&di(this)}get options(){return this.#fe}get sourceOptions(){return this.#ye}addLifeTime(t){this.#de+=t}alive(){return!this.#re||this.#de<=this.#re}destroy(e=!0){if(di(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.#pe(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ae(t,{container:this,data:e})}draw(t){if(!di(this))return;let e=t;this.#oe=F(t=>{e&&(this.#ue=void 0,e=!1),this.#ve(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}_t().error(`Export plugin with type ${t} not found`)}async init(){if(!di(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.#fe=pi(this.#p,this,this.#he,this.sourceOptions),this.actualOptions=pi(this.#p,this,this.#fe),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.#re=q(s)*r,this.#ie=q(i)*r,this.#de=0,this.fpsLimit=n>0?n:120,this.#me=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(di(this)&&(void 0!==this.#oe&&(B(this.#oe),this.#oe=void 0),!this.#ge)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ge=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!di(this))return;const i=this.#ge||e;if(!this.#ce||this.actualOptions.autoPlay){if(this.#ge&&(this.#ge=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ce=!1}async refresh(){if(di(this))return this.stop(),this.start()}async reset(t){if(di(this))return this.#he=t,this.#ye=t,this.#fe=pi(this.#p,this,this.#he,this.sourceOptions),this.actualOptions=pi(this.#p,this,this.#fe),this.refresh()}async start(){di(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#le.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#se=setTimeout(()=>{i()},this.#ie)}))}stop(){if(di(this)&&this.started){this.#se&&(clearTimeout(this.#se),this.#se=void 0),this.#ce=!0,this.started=!1,this.#le.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.#ye=this.#fe,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ve=t=>{try{if(!this.#me&&void 0!==this.#ue&&t<this.#ue+r/this.fpsLimit)return void this.draw(!1);if(this.#ue??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ne,t-this.#ue,this.fpsLimit,this.#me),this.addLifeTime(this.#ne.value),this.#ue=t,this.#ne.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ne),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){_t().error("error in animation loop",t)}}}});t.AnimatableColor=Zt,t.AnimationOptions=Qt,t.AnimationValueWithRandom=re,t.Background=Jt,t.BaseRange=Ht,t.Circle=Wt,t.ColorAnimation=Gt,t.Fill=ie,t.FullScreen=Kt,t.HslAnimation=Xt,t.Move=ue,t.MoveAngle=se,t.MoveCenter=ne,t.MoveGravity=ae,t.MovePath=le,t.Options=ze,t.OptionsColor=Yt,t.OutModes=ce,t.Paint=pe,t.ParticlesBounce=ge,t.ParticlesBounceFactor=fe,t.ParticlesDensity=me,t.ParticlesNumber=ve,t.ParticlesNumberLimit=ye,t.ParticlesOptions=be,t.RangedAnimationOptions=jt,t.RangedAnimationValueWithRandom=class extends re{animation;constructor(){super(),this.animation=new jt}load(t){super.load(t)}},t.Rectangle=Nt,t.ResizeEvent=te,t.Shape=Pe,t.Spin=he,t.Stroke=de,t.ValueWithRandom=oe,t.Vector=S,t.Vector3d=z,t.ZIndex=we,t.alterHsl=Je,t.animate=F,t.areBoundsInside=gt,t.arrayRandomIndex=pt,t.calcExactPositionOrRandomFromSize=tt,t.calcExactPositionOrRandomFromSizeRanged=function(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})},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=K,t.calcPositionOrRandomFromSizeRanged=function(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 K({size:t.size,position:e})},t.calculateBounds=mt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=G,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=Q(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,u=t.velocity.rotate(l),d=e.velocity.rotate(l),p=J(u,d,c,h),f=J(d,u,c,h),g=p.rotate(-l),m=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:S.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.clear=Oe,t.cloneStyle=xt,t.collisionVelocity=J,t.colorMix=Ge,t.colorToHsl=function(t,e,i,s=!0){const n=Ue(t,e,i,s);return n?$e(n):void 0},t.colorToRgb=Ue,t.countOffset=1,t.decayOffset=1,t.deepExtend=yt,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=X,t.deleteCount=1,t.double=2,t.doublePI=d,t.drawAfterEffect=De,t.drawBeforeEffect=ke,t.drawParticle=Ce,t.drawParticlePlugin=Ee,t.drawShape=Re,t.drawShapeAfterDraw=_e,t.drawShapeBeforeDraw=Te,t.empty=0,t.executeOnSingleOrMultiple=vt,t.findItemFromSingleOrMultiple=function(t,e){return k(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=function(t,e){return Math.sqrt(j(t,e))},t.getDistanceSq=j,t.getDistances=Q,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=function(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Ye(s.h,e.h,i),Ye(s.s,e.s,i),Ye(s.l,e.l,i)),s},t.getHslFromAnimation=Xe,t.getItemMapFromInitializer=It,t.getItemsFromInitializer=St,t.getLinkColor=function(t,e,i){if(i===h)return We();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ge(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return He(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Be(t,{value:n}):i?h:u:n===u?u:Be(t,{value:n})},t.getLogger=_t,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=bt,t.getRandom=A,t.getRandomInRange=L,t.getRandomRgbColor=We,t.getRangeMax=W,t.getRangeMin=H,t.getRangeValue=q,t.getSize=function(t,e){return wt(t,e)},t.getStyleFromHsl=je,t.getStyleFromRgb=Ne,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=lt,t.hslToRgb=He,t.hslaToRgba=function(t){const e=He(t);return{a:t.a,b:e.b,g:e.g,r:e.r}},t.identity=1,t.initParticleNumericAnimationValue=function(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:H(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=$(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a},t.inverseFactorNumerator=1,t.isArray=k,t.isBoolean=I,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=R,t.isNumber=C,t.isObject=D,t.isPointInside=function(t,e,i,s,n){return gt(mt(t,s??0),e,i,n)},t.isString=O,t.itemFromArray=ft,t.itemFromSingleOrMultiple=Pt,t.lFactor=1,t.lMax=P,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=xe,t.loadParticlesOptions=Me,t.loadRandomFactor=1e4,t.manageListener=zt,t.memoize=rt,t.midColorValue=u,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=V,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Se,t.paintImage=Ie,t.parseAlpha=function(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1},t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Ve,t.rangeColorToRgb=Be,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=$e,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=ht,t.safeMutationObserver=ut,t.setAnimationFunctions=function(t,e){E.nextFrame=t,E.cancel=e},t.setLogger=function(t){t.debug&&(Rt.debug=kt(t.debug)),t.error&&(Rt.error=kt(t.error)),t.info&&(Rt.info=kt(t.info)),t.log&&(Rt.log=kt(t.log)),t.trace&&(Rt.trace=kt(t.trace)),t.verbose&&(Rt.verbose=kt(t.verbose)),t.warning&&(Rt.warning=kt(t.warning))},t.setRandom=function(t=Math.random){T=t},t.setRangeValue=N,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Fe(t,e)?.a},t.stringToRgb=qe,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=Ke,t.updateAnimation=function(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;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=a.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){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=U(i.value,r,l))}},t.updateColor=function(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ze(i,!1,e),Ze(s,!0,e),Ze(n,!0,e)},t.updateColorValue=Ze,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{tsParticles:(globalThis.__tsParticlesInternals.engine||{}).tsParticles}),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.engine=t.__tsParticlesInternals.engine||{}))}(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",u="mid",d=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,P=100,w=.25,b=.75;var x;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class z{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 z.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 z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,M(t))}add(t){return z.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 z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.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 z.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 z.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 S extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return S.create(l.x,l.y)}static clone(t){return S.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new S(t,e??l.y):new S(t.x,t.y)}}function I(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function C(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function k(t){return Array.isArray(t)}function R(t){return null==t}const _=Math.PI/180;let T=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return U(T(),0,1-Number.EPSILON)}function L(t,e){return A()*(e-t)+t}function F(t){return E.nextFrame(t)}function B(t){E.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function V(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function $(t){const e=W(t);let i=H(t);return e===i&&(i=0),L(i,e)}function q(t){return C(t)?t:$(t)}function H(t){return C(t)?t:t.min}function W(t){return C(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&C(t))return t;const i=H(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function Q(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function G(t,e,i){return j(t,e)<=i*i}function X(t){return t*_}function Y(e,i,s){if(C(e))return X(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*b;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*b;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()*d}}function Z(t){const e=S.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return S.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function K(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function tt(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var et,it,st,nt,at,ot;t.AnimationMode=void 0,(et=t.AnimationMode||(t.AnimationMode={})).auto="auto",et.increase="increase",et.decrease="decrease",et.random="random",t.AnimationStatus=void 0,(it=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",it.decreasing="decreasing",t.DestroyType=void 0,(st=t.DestroyType||(t.DestroyType={})).none="none",st.max="max",st.min="min",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",t.StartValueType=void 0,(ot=t.StartValueType||(t.StartValueType={})).max="max",ot.min="min",ot.random="random";function rt(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,a=e?.keyFn,o=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>o(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${o(t[i],e)}`).join(",")}}`},r=t=>a?a(t):(t=>o(t))(t);return(...e)=>{const a=r(e),o=Date.now(),l=i.get(a);if(void 0!==l){if(!(n&&o-l.ts>n))return i.delete(a),i.set(a,{value:l.value,ts:l.ts}),l.value;i.delete(a)}const c=t(...e);return i.set(a,{value:c,ts:o}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function lt(){return"undefined"!=typeof matchMedia}function ct(){return globalThis.document}function ht(t){if(lt())return matchMedia(t)}function ut(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||k(e)&&e.includes(t)}function pt(t){return Math.floor(A()*t.length)}function ft(t,e,i=!0){return t[void 0!==e&&i?e%t.length:pt(t)]}function gt(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 mt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function yt(t,...e){for(const i of e){if(R(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(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 D(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=>yt(void 0,t)):yt(e[n],a)}}return t}function vt(t,e){return k(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Pt(t,e,i){return k(t)?ft(t,e,i):t}function wt(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}}function bt(t,e){return wt(t,e)}function xt(t){const e=ct().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||R(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}const Mt=rt(function(t){const e=ct().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function zt(t,e,i,s,n){if(s){let s={passive:!0};I(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 St(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 It(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 Ct;t.EventType=void 0,(Ct=t.EventType||(t.EventType={})).configAdded="configAdded",Ct.containerInit="containerInit",Ct.particlesSetup="particlesSetup",Ct.containerStarted="containerStarted",Ct.containerStopped="containerStopped",Ct.containerDestroyed="containerDestroyed",Ct.containerPaused="containerPaused",Ct.containerPlay="containerPlay",Ct.containerBuilt="containerBuilt",Ct.particleAdded="particleAdded",Ct.particleDestroyed="particleDestroyed",Ct.particleRemoved="particleRemoved";class Dt{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 It(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 It(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return St(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 kt=t=>(...e)=>{t(...e)},Rt={debug:kt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:kt(console.info),log:kt(console.log),trace:kt(console.trace),verbose:kt(console.log),warning:kt(console.warn)};function _t(){return Rt}const Tt="100%";class Et{pluginManager=new Dt(this);#h=[];#u=new Ot;#o=!1;get items(){return this.#h}get version(){return"4.1.2"}addEventListener(t,e){this.#u.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.#u.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 fi}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=Pt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(_t().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=Pt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),u=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(u);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,u)}else c.push(u);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ct();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Tt,s.style.height||=Tt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ct();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 u.canvas.loadCanvas(d),await u.start(),u}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#u.removeEventListener(t,e)}}var At,Lt,Ft,Bt,Ut,Vt,$t,qt;!function(t){t.circle="circle",t.rectangle="rectangle"}(At||(At={}));class Ht{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 Wt extends Ht{radius;constructor(t,e,i){super(t,e,At.circle),this.radius=i}contains(t){return G(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 Wt||t.type===At.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Nt||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 Nt extends Ht{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 Wt)return t.intersects(this);if(!(t instanceof Nt))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.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Bt=t.OutMode||(t.OutMode={})).bounce="bounce",Bt.none="none",Bt.out="out",Bt.destroy="destroy",Bt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.GradientType=void 0,(Vt=t.GradientType||(t.GradientType={})).linear="linear",Vt.radial="radial",Vt.random="random",t.ParticleOutType=void 0,($t=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",$t.inside="inside",$t.outside="outside",t.EasingType=void 0,(qt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",qt.easeInBounce="ease-in-bounce",qt.easeInCirc="ease-in-circ",qt.easeInCubic="ease-in-cubic",qt.easeInElastic="ease-in-elastic",qt.easeInExpo="ease-in-expo",qt.easeInGaussian="ease-in-gaussian",qt.easeInLinear="ease-in-linear",qt.easeInQuad="ease-in-quad",qt.easeInQuart="ease-in-quart",qt.easeInQuint="ease-in-quint",qt.easeInSigmoid="ease-in-sigmoid",qt.easeInSine="ease-in-sine",qt.easeInSmoothstep="ease-in-smoothstep",qt.easeOutBack="ease-out-back",qt.easeOutBounce="ease-out-bounce",qt.easeOutCirc="ease-out-circ",qt.easeOutCubic="ease-out-cubic",qt.easeOutElastic="ease-out-elastic",qt.easeOutExpo="ease-out-expo",qt.easeOutGaussian="ease-out-gaussian",qt.easeOutLinear="ease-out-linear",qt.easeOutQuad="ease-out-quad",qt.easeOutQuart="ease-out-quart",qt.easeOutQuint="ease-out-quint",qt.easeOutSigmoid="ease-out-sigmoid",qt.easeOutSine="ease-out-sine",qt.easeOutSmoothstep="ease-out-smoothstep",qt.easeInOutBack="ease-in-out-back",qt.easeInOutBounce="ease-in-out-bounce",qt.easeInOutCirc="ease-in-out-circ",qt.easeInOutCubic="ease-in-out-cubic",qt.easeInOutElastic="ease-in-out-elastic",qt.easeInOutExpo="ease-in-out-expo",qt.easeInOutGaussian="ease-in-out-gaussian",qt.easeInOutLinear="ease-in-out-linear",qt.easeInOutQuad="ease-in-out-quad",qt.easeInOutQuart="ease-in-out-quart",qt.easeInOutQuint="ease-in-out-quint",qt.easeInOutSigmoid="ease-in-out-sigmoid",qt.easeInOutSine="ease-in-out-sine",qt.easeInOutSmoothstep="ease-in-out-smoothstep";class Qt{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){R(t)||(void 0!==t.count&&(this.count=N(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=N(t.speed)),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.delay&&(this.delay=N(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class jt extends Qt{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Gt extends Qt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),R(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=N(t.offset)))}}class Xt{h=new Gt(0,y);l=new Gt(0,P);s=new Gt(0,v);load(t){R(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Yt{value;constructor(){this.value=""}static create(t,e){const i=new Yt;return i.load(t),void 0!==e&&(O(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){R(t)||R(t.value)||(this.value=t.value)}}class Zt extends Yt{animation;constructor(){super(),this.animation=new Xt}static create(t,e){const i=new Zt;return i.load(t),void 0!==e&&(O(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Jt{color;image;opacity;position;repeat;size;constructor(){this.color=new Yt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Yt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Kt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class te{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){R(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ee{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ie{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class se{offset;value;constructor(){this.offset=0,this.value=90}load(t){R(t)||(void 0!==t.offset&&(this.offset=N(t.offset)),void 0!==t.value&&(this.value=N(t.value)))}}class ne{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){R(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ae{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=N(t.maxSpeed)))}}class oe{value;constructor(){this.value=0}load(t){R(t)||R(t.value)||(this.value=N(t.value))}}class re extends oe{animation=new Qt;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class le{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new oe,this.enable=!1,this.options={}}load(t){R(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=yt(this.options,t.options)))}}class ce{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){R(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 he{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=N(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=yt({},t.position)))}}class ue{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new se,this.center=new ne,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ae,this.path=new le,this.outModes=new ce,this.random=!1,this.size=!1,this.speed=2,this.spin=new he,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(R(t))return;this.angle.load(C(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=N(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=C(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=N(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=N(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class de{color;opacity;width;constructor(){this.width=0}load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.width&&(this.width=N(t.width)),void 0!==t.opacity&&(this.opacity=N(t.opacity)))}}class pe{color;fill;stroke;load(t){R(t)||(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new ie,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new de,this.stroke.load(t.stroke)))}}class fe extends oe{constructor(){super(),this.value=1}}class ge{horizontal;vertical;constructor(){this.horizontal=new fe,this.vertical=new fe}load(t){R(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class me{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(R(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class ye{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ve{density;limit;value;constructor(){this.density=new me,this.limit=new ye,this.value=0}load(t){R(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Pe{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=yt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class we extends oe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),R(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class be{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#d;#p;constructor(t,e){this.#p=t,this.#d=e,this.bounce=new ge,this.effect=new ee,this.groups={},this.move=new ue,this.number=new ve,this.paint=new pe,this.paint.color=new Zt,this.paint.color.value="#fff",this.paint.fill=new ie,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Pe,this.zIndex=new we}load(t){if(R(t))return;if(t.palette&&(this.palette=t.palette,this.#f(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]=yt(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&&(k(e)?this.paint=vt(e,t=>{const e=new pe;return e.load(t),e}):k(this.paint)?(this.paint=new pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#d){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#d,this,t);const e=this.#p.updaters.get(this.#d);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f=t=>{const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(k(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 xe(t,...e){for(const i of e)t.load(i)}function Me(t,e,...i){const s=new be(t,e);return xe(s,...i),s}class ze{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#d;#p;constructor(t,e){this.#p=t,this.#d=e,this.autoPlay=!0,this.background=new Jt,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Kt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Me(this.#p,this.#d),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new te,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(R(t))return;void 0!==t.preset&&(this.preset=t.preset,vt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=N(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=N(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;I(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=yt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#d,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function Se(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ie(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Oe(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ce(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,u=s.getPosition(),d=s.getTransformData(l),p={x:u.x,y:u.y};i.setTransform(d.a,d.b,d.c,d.d,u.x,u.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:d,position:{...u},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;ke(y,m),Te(v,m),Re(v,m),_e(v,m),De(y,m),i.resetTransform()}function De(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function ke(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Re(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())}function _e(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function Te(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ee(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Ae=new Map;function Le(t,e){let i=Ae.get(t);if(!i){if(i=e(),Ae.size>=1e3){[...Ae.keys()].slice(0,500).forEach(t=>Ae.delete(t))}Ae.set(t,i)}return 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 Ue(t,n.value,i,s);if(k(n.value)){const e=ft(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 Ue(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?We():qe(t,n.value);if(k(n.value)){const e=ft(n.value,i,s);if(!e)return;return Ue(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ve(t,e,i,s=!0){const n=Be(t,e,i,s);return n?$e(n):void 0}function $e(t){const e=t.r/m,i=t.g/m,s=t.b/m,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*=P,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function qe(t,e){return Fe(t,e)}function He(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/y,a=i/v,r=s/P;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=(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},c=r<o?r*(1+a):r+a-r*a,h=2*r-c,u=1/3,d=Math.min(m,m*l(h,c,n+u)),p=Math.min(m,m*l(h,c,n)),f=Math.min(m,m*l(h,c,n-u));return{r:Math.round(d),g:Math.round(p),b:Math.round(f)}}function We(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?Qe(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){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function je(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?function(t,e){return Qe(He(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Ge(t,e,i,s){let n=t,a=e;return"r"in n||(n=He(t)),"r"in a||(a=He(e)),{b:V(n.b,a.b,i,s),g:V(n.g,a.g,i,s),r:V(n.r,a.r,i,s)}}function Xe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ye(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=N(i.offset)):e.velocity=0}function Ze(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?$(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=U(e.value,l,r)}function Je(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const Ke=new Et,ti=globalThis;ti.__tsParticlesInternals=ti.__tsParticlesInternals??{},ti.tsParticles=Ke;function ei(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class ii{#m;#y;#v;#P;#w;#d;#b;#x;#M;#z;#S;#I;#O;#C;#p;#D;#k;#R={};#_=[void 0,void 0];#T={};constructor(t,e,i){this.#p=t,this.#d=e,this.#y=i,this.#b=null,this.#k=[],this.#D=[],this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#z=[],this.#S=[],this.#I=[],this.#C=[],this.#O=[]}get settings(){return this.#x}canvasClear(){this.#d.actualOptions.clear&&this.draw(t=>{Oe(t,this.#y.size)})}clear(){let t=!1;for(const e of this.#m)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#k=[],this.#D=[],this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#z=[],this.#S=[],this.#I=[],this.#C=[],this.#O=[]}draw(t){const e=this.#b;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.#E(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#d,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:u,strokeOpacity:d}=t.getOpacity(),p=this.#T,f=this.#R,g=a?je(a,r.hdr,h*u):void 0,m=o?je(o,r.hdr,d*u):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#S)i.drawParticleSetup?.(s,t,e);this.#A(s,t,i,u,f,p),Ce({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:u,transform:p}),this.#L(t);for(const i of this.#z)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#M)Ee(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#d;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#C)e.drawSettingsSetup?.(i,t);for(const e of this.#I)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#P)e.clearDraw?.(i,t);for(const e of this.#O)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#w=[],this.#m=[],this.#v=[],this.#P=[],this.#M=[],this.#S=[],this.#z=[],this.#I=[],this.#C=[],this.#O=[];for(const t of this.#d.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#w.push(t),t.canvasClear&&this.#m.push(t),t.canvasPaint&&this.#v.push(t),t.drawParticle&&this.#M.push(t),t.drawParticleSetup&&this.#S.push(t),t.drawParticleCleanup&&this.#z.push(t),t.draw&&this.#I.push(t),t.drawSettingsSetup&&this.#C.push(t),t.drawSettingsCleanup&&this.#O.push(t),t.clearDraw&&this.#P.push(t)}initUpdaters(){this.#k=[],this.#D=[];for(const t of this.#d.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#k.push(t)}paint(){let t=!1;for(const e of this.#v)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Se(e,this.#y.size,t)})}paintImage(t,e){this.draw(i=>{Ie(i,this.#y.size,t,e)})}setContext(t){this.#b=t,this.#b&&(this.#b.globalCompositeOperation=i)}setContextSettings(t){this.#x=t}stop(){this.draw(t=>{Oe(t,this.#y.size)})}#L=t=>{for(const e of this.#D)e.afterDraw?.(t)};#A=(t,e,i,s,n,a)=>{for(const o of this.#k){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)ei(a,t,e)}o.beforeDraw?.(e)}};#E=t=>{let e,i;for(const s of this.#w)if(!e&&s.particleFillColor&&(e=Ve(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ve(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#_[0]=e,this.#_[1]=i,this.#_}}const si=new WeakMap;function ni(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 ai{domElement;render;renderCanvas;size;zoom=1;#d;#F;#B;#U;#p;#V;#$;#q;#H;constructor(t,e){this.#p=t,this.#d=e,this.render=new ii(t,e,this),this.#q={height:0,width:0};const i=e.retina.pixelRatio,s=this.#q;this.size={height:s.height*i,width:s.width*i},this.#F=!1,this.#$=[],this.#V="none"}get#W(){return this.#d.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#F){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#N();this.render.destroy(),this.#$=[]}getZoomCenter(){const t=this.#d.retina.pixelRatio,{width:e,height:i}=this.size;return this.#H?this.#H:{x:e*o/t,y:i*o/t}}init(){this.#Q(t=>{t.disconnect()}),this.#B=ut(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#j()}),this.resize(),this.#G(),this.initBackground(),this.#Q(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#d,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.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#$=[];for(const t of this.#d.plugins)t.resize&&this.#$.push(t)}loadCanvas(t){this.#F&&this.domElement&&this.domElement.remove();const i=this.#d,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#F=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=si.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 si.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#U=xt(n.style));const a=this.#q,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#d.retina.pixelRatio,l=this.size;o.height=l.height=a.height*r,o.width=l.width=a.width*r;const c=ht("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#Q(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#Q(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#d,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#q,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.#d.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#V=t,this.#j())}setZoom(t,e){this.zoom=t,this.#H=e}stop(){this.#Q(t=>{t.disconnect()}),this.#B=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#d,e=t.updateActualOptions();t.particles.setDensity(),this.#X(),e&&await t.refresh()}#X=()=>{for(const t of this.#$)t.resize?.()};#G=()=>{const t=this.domElement,e=this.#d.actualOptions;if(t){this.#W?this.#Y():this.#N();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")}}};#j=()=>{const t=this.domElement;if(!t)return;this.#Q(t=>{t.disconnect()}),this.#G(),this.initBackground();const e=this.#V;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Q(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#N=()=>{const t=this.domElement,e=this.#U;t&&e&&ni(t,e,!0)};#Q=t=>{this.#B&&t(this.#B)};#Y=()=>{const t=this.domElement;t&&ni(t,Mt(this.#d.actualOptions.fullScreen.zIndex),!0)}}class oi{#d;#Z;#J;#K;constructor(t){this.#d=t,this.#Z={visibilityChange:()=>{this.#tt()},resize:()=>{this.#et()}}}addListeners(){this.#it(!0)}removeListeners(){this.#it(!1)}#tt=()=>{const t=this.#d;t.actualOptions.pauseOnBlur&&(ct().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#et=()=>{this.#K&&(clearTimeout(this.#K),this.#K=void 0);const t=async()=>{const t=this.#d.canvas;await t.windowResize()};this.#K=setTimeout(()=>{t()},this.#d.actualOptions.resize.delay*r)};#it=t=>{const e=this.#Z;this.#st(t),zt(document,n,e.visibilityChange,t,!1)};#st=t=>{const e=this.#Z,i=this.#d;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#J&&!t?(n&&this.#J.unobserve(n),this.#J.disconnect(),this.#J=void 0):!this.#J&&t&&n&&(this.#J=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#et()}),this.#J.observe(n))}}function ri(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)}class li{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;#nt={fillOpacity:1,opacity:1,strokeOpacity:1};#at=z.origin;#ot={sin:0,cos:0};#rt={a:1,b:0,c:0,d:1};#d;#p;constructor(t,e){this.#p=t,this.#d=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#d,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.#d.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#d.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#lt(this.bubble.color??Xe(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.#nt.fillOpacity=i*s*e,this.#nt.opacity=i*e,this.#nt.strokeOpacity=i*n*e,this.#nt}getPosition(){return this.#at.x=this.position.x+this.offset.x,this.#at.y=this.position.y+this.offset.y,this.#at.z=this.position.z,this.#at}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ot.sin=Math.sin(t),this.#ot.cos=Math.cos(t),this.#ot}getStrokeColor(){return this.#lt(this.bubble.color??Xe(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#rt.a=e.cos*(t.a??c.a),this.#rt.b=i?e.sin*(t.b??1):t.b??c.b,this.#rt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#rt.d=e.cos*(t.d??c.d),this.#rt}init(e,i,s,n){const a=this.#d;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.size={value:1,max:1,min:1,enable:!1},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.actualOptions,r=Me(this.#p,a,o.particles),l=r.reduceDuplicates,c=r.effect.type,u=r.shape.type;this.effect=Pt(c,this.id,l),this.shape=Pt(u,this.id,l);const d=r.effect,p=r.shape;if(s){if(s.effect?.type&&s.effect.type!==this.effect){const t=Pt(s.effect.type,this.id,l);t&&(this.effect=t,d.load(s.effect))}if(s.shape?.type&&s.shape.type!==this.shape){const t=Pt(s.shape.type,this.id,l);t&&(this.shape=t,p.load(s.shape))}}if(this.effect===h){const t=[...this.#d.effectDrawers.keys()];this.effect=t[Math.floor(A()*t.length)]}if(this.shape===h){const t=[...this.#d.shapeDrawers.keys()];this.shape=t[Math.floor(A()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},Pt(n,i,s))}(this.effect,d,this.id,l):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return yt({close:e.close},Pt(n,i,s))}(this.shape,p,this.id,l):void 0,r.load(s);const f=this.effectData,g=this.shapeData;f&&r.load(f.particles),g&&r.load(g.particles),this.effectClose=f?.close??r.effect.close,this.shapeClose=g?.close??r.shape.close,this.options=r,a.retina.initParticle(this);for(const t of a.particleUpdaters)t.preInit?.(this);let m,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#ct(i),this.initialVelocity=this.#ht(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(m=a.effectDrawers.get(this.effect)),m?.loadEffect&&m.loadEffect(this),this.shape&&(y=a.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);m?.particleInit?.(a,this),y?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#ut({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#ut({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=t%d,i=e<0?e+d:e;return i>=Math.PI*o&&i<3*Math.PI*o}if(this.roll.horizontal){const e=(t+Math.PI*o)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#d.particleUpdaters)t.reset?.(this)}#dt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#d,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=tt({size:l,position:s}),c=z.create(t.x,t.y,e);this.#pt(c,r,o.left??o.default),this.#pt(c,r,o.right??o.default),this.#ft(c,r,o.top??o.default),this.#ft(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}return s};#ht=()=>{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=X(q(e.angle.value)),n=X(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=$(N(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=A()),i};#pt=(e,i,s)=>{ri({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#d.canvas.size.width,setCb:t=>e.x+=t,radius:i})};#ft=(e,i,s)=>{ri({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#d.canvas.size.height,setCb:t=>e.y+=t,radius:i})};#gt=(e,i)=>{const s=this.getRadius(),n=this.#d.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"}};#mt=(t,e)=>({canvasSize:this.#d.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#ut=t=>{const e=this.#gt(t.direction,t.outMode),i=this.#d,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.#mt(t.direction,t.outMode),l=a?this.#yt(a(r),"shape"):void 0,c=o?this.#yt(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};#lt=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?Je(t,this.roll.alter.type,this.roll.alter.value):t:t;#ct=e=>{const i=this.#d,s=Math.floor(q(this.options.zIndex.value)),n=this.#dt(e,U(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=Y(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=S.origin};#yt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class ci{#vt;#Pt=new Map;#wt=[];#bt;#xt;#Mt=[];#zt;constructor(t){this.#vt=t,this.#bt=0,this.#zt=0}clear(){this.#Pt.clear();const t=this.#xt;t&&(this.#vt=t),this.#xt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#St(e,i);this.#Pt.has(s)||this.#Pt.set(s,[]),this.#Pt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#It(t);if(!s)return i;const n=Math.floor(s.minX/this.#vt),a=Math.floor(s.maxX/this.#vt),o=Math.floor(s.minY/this.#vt),r=Math.floor(s.maxY/this.#vt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Pt.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.#Ot(t.x,t.y,e),a=this.query(n,i,s);return this.#Ct(),a}queryRectangle(t,e,i,s=[]){const n=this.#Dt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Ct(),a}setCellSize(t){this.#xt=t}#Ot(t,e,i){return(this.#wt[this.#bt++]??=new Wt(t,e,i)).reset(t,e,i)}#Dt(t,e,i,s){return(this.#Mt[this.#zt++]??=new Nt(t,e,i,s)).reset(t,e,i,s)}#St(t,e){return`${Math.floor(t/this.#vt)}_${Math.floor(e/this.#vt)}`}#It(t){if(t instanceof Wt){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 Nt){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}#Ct(){this.#bt=0,this.#zt=0}}class hi{checkParticlePositionPlugins;grid;#kt;#d;#Rt;#_t;#Tt;#Et;#At;#Lt;#p;#Ft;#Bt;#Ut;#Vt;#$t;#qt;constructor(t,e){this.#p=t,this.#d=e,this.#Tt=0,this.#kt=[],this.#Ft=[],this.#_t=0,this.#Rt=new Map,this.#Et=new Map,this.#qt=this.#Ht(this.#d.zLayers),this.grid=new ci(100),this.checkParticlePositionPlugins=[],this.#At=[],this.#Lt=[],this.#Ut=[],this.#Bt=[],this.#$t=[]}get count(){return this.#kt.length}addParticle(e,i,s,n){const a=this.#d.actualOptions.particles.number.limit.mode,o=void 0===s?this.#_t:this.#Rt.get(s)??this.#_t,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.#Ft.pop()??new li(this.#p,this.#d);a.init(this.#Tt,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#kt.push(a),this.#Wt(a),this.#Tt++,this.#d.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#Ft.push(a)}catch(t){_t().warning(`error adding particle: ${t}`)}}clear(){this.#kt=[],this.#Et.clear(),this.#Nt(this.#d.zLayers)}destroy(){this.#kt=[],this.#Ft.length=0,this.#Et.clear(),this.#qt=[],this.checkParticlePositionPlugins=[],this.#At=[],this.#Lt=[],this.#Ut=[],this.#Bt=[],this.#$t=[]}drawParticles(t){for(let e=this.#qt.length-1;e>=0;e--){const i=this.#qt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#kt.filter(t)}find(t){return this.#kt.find(t)}get(t){return this.#kt[t]}async init(){const t=this.#d,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#$t=[],this.#Lt=[],this.#Ut=[],this.#At=[],this.#Bt=[],this.#Et.clear(),this.#Nt(t.zLayers),this.grid=new ci(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#$t.push(e),e.particleUpdate&&this.#Lt.push(e),e.postUpdate&&this.#Ut.push(e),e.particleReset&&this.#At.push(e),e.postParticleUpdate&&this.#Bt.push(e);await this.#d.initDrawersAndUpdaters();for(const e of this.#d.effectDrawers.values())await(e.init?.(t));for(const e of this.#d.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.#d.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#kt.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.#Qt(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#d.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#d.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Me(this.#p,this.#d,s);this.#jt(n,i,t)}this.#jt(t.particles,i)}setResizeFactor(t){this.#Vt=t}update(t){this.grid.clear();for(const e of this.#$t)e.update?.(t);const e=this.#Gt(t);for(const e of this.#Ut)e.postUpdate?.(t);if(this.#Xt(t,e),e.size)for(const t of e)this.remove(t);this.#Vt=void 0}#Yt=(...t)=>{this.#Ft.push(...t)};#jt=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#_t=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Rt.set(i,s?.number.limit.value??n.limit.value));const a=this.#Zt(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.#_t=n.limit.value*a:this.#Rt.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)};#Ht=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#Jt=t=>{const e=this.#qt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#Kt=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#Zt=t=>{const e=this.#d;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};#Wt=t=>{const e=this.#Jt(t.position.z),i=this.#qt[e];i&&(i.splice(this.#Kt(i,t.id),0,t),this.#Et.set(t.id,e))};#Qt=(e,i,s)=>{const n=this.#kt[e];return!!n&&(n.group===i&&(this.#kt.splice(e,1),this.#te(n),n.destroy(s),this.#d.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#Yt(n),!0))};#te=t=>{const e=this.#Et.get(t.id)??this.#Jt(t.position.z),i=this.#qt[e];if(!i)return void this.#Et.delete(t.id);const s=this.#Kt(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#Et.delete(t.id)):this.#Et.delete(t.id)};#Nt=t=>{const e=Math.max(Math.floor(t),1);if(this.#qt.length===e)for(const t of this.#qt)t.length=0;else this.#qt=this.#Ht(e)};#ee=t=>{const e=this.#Jt(t.position.z),i=this.#Et.get(t.id);if(void 0===i)return void this.#Wt(t);if(i===e)return;const s=this.#qt[i];if(s){const e=this.#Kt(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#qt[e];n?(n.splice(this.#Kt(n,t.id),0,t),this.#Et.set(t.id,e)):this.#Et.set(t.id,e)};#Gt=t=>{const e=new Set,i=this.#Vt;for(const s of this.#kt){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.#At)t.particleReset?.(s);for(const e of this.#Lt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#Xt=(t,e)=>{for(const i of this.#kt)if(i.destroyed)e.add(i);else{for(const e of this.#d.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Bt)e.postParticleUpdate?.(i,t);this.#ee(i)}}}class ui{pixelRatio;reduceFactor;#d;constructor(t){this.#d=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#d,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 di(t){return!t.destroyed}function pi(t,e,...i){const s=new ze(t,e);return xe(s,...i),s}var fi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#ie;#se;#ne={value:0,factor:0};#ae;#oe;#re;#le;#ce;#he;#ue;#de;#pe;#fe;#ge;#p;#me;#ye;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#ae=i,this.#pe=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#me=!1,this.#ie=0,this.#re=0,this.#de=0,this.#ce=!0,this.started=!1,this.destroyed=!1,this.#ge=!0,this.#ue=0,this.zLayers=100,this.pageHidden=!1,this.#ye=o,this.#he=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ui(this),this.canvas=new ai(this.#p,this),this.particles=new hi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#fe=pi(this.#p,this),this.actualOptions=pi(this.#p,this),this.#le=new oi(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#ge&&!this.pageHidden&&di(this)}get options(){return this.#fe}get sourceOptions(){return this.#ye}addLifeTime(t){this.#de+=t}alive(){return!this.#re||this.#de<=this.#re}destroy(e=!0){if(di(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.#pe(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#ae(t,{container:this,data:e})}draw(t){if(!di(this))return;let e=t;this.#oe=F(t=>{e&&(this.#ue=void 0,e=!1),this.#ve(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}_t().error(`Export plugin with type ${t} not found`)}async init(){if(!di(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.#fe=pi(this.#p,this,this.#he,this.sourceOptions),this.actualOptions=pi(this.#p,this,this.#fe),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.#re=q(s)*r,this.#ie=q(i)*r,this.#de=0,this.fpsLimit=n>0?n:120,this.#me=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(di(this)&&(void 0!==this.#oe&&(B(this.#oe),this.#oe=void 0),!this.#ge)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ge=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!di(this))return;const i=this.#ge||e;if(!this.#ce||this.actualOptions.autoPlay){if(this.#ge&&(this.#ge=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ce=!1}async refresh(){if(di(this))return this.stop(),this.start()}async reset(t){if(di(this))return this.#he=t,this.#ye=t,this.#fe=pi(this.#p,this,this.#he,this.sourceOptions),this.actualOptions=pi(this.#p,this,this.#fe),this.refresh()}async start(){di(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#le.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#se=setTimeout(()=>{i()},this.#ie)}))}stop(){if(di(this)&&this.started){this.#se&&(clearTimeout(this.#se),this.#se=void 0),this.#ce=!0,this.started=!1,this.#le.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.#ye=this.#fe,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ve=t=>{try{if(!this.#me&&void 0!==this.#ue&&t<this.#ue+r/this.fpsLimit)return void this.draw(!1);if(this.#ue??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#ne,t-this.#ue,this.fpsLimit,this.#me),this.addLifeTime(this.#ne.value),this.#ue=t,this.#ne.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ne),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){_t().error("error in animation loop",t)}}}});t.AnimatableColor=Zt,t.AnimationOptions=Qt,t.AnimationValueWithRandom=re,t.Background=Jt,t.BaseRange=Ht,t.Circle=Wt,t.ColorAnimation=Gt,t.Fill=ie,t.FullScreen=Kt,t.HslAnimation=Xt,t.Move=ue,t.MoveAngle=se,t.MoveCenter=ne,t.MoveGravity=ae,t.MovePath=le,t.Options=ze,t.OptionsColor=Yt,t.OutModes=ce,t.Paint=pe,t.ParticlesBounce=ge,t.ParticlesBounceFactor=fe,t.ParticlesDensity=me,t.ParticlesNumber=ve,t.ParticlesNumberLimit=ye,t.ParticlesOptions=be,t.RangedAnimationOptions=jt,t.RangedAnimationValueWithRandom=class extends re{animation;constructor(){super(),this.animation=new jt}load(t){super.load(t)}},t.Rectangle=Nt,t.ResizeEvent=te,t.Shape=Pe,t.Spin=he,t.Stroke=de,t.ValueWithRandom=oe,t.Vector=S,t.Vector3d=z,t.ZIndex=we,t.alterHsl=Je,t.animate=F,t.areBoundsInside=gt,t.arrayRandomIndex=pt,t.calcExactPositionOrRandomFromSize=tt,t.calcExactPositionOrRandomFromSizeRanged=function(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})},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=K,t.calcPositionOrRandomFromSizeRanged=function(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 K({size:t.size,position:e})},t.calculateBounds=mt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=G,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=Q(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,u=t.velocity.rotate(l),d=e.velocity.rotate(l),p=J(u,d,c,h),f=J(d,u,c,h),g=p.rotate(-l),m=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:S.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}},t.clamp=U,t.clear=Oe,t.cloneStyle=xt,t.collisionVelocity=J,t.colorMix=Ge,t.colorToHsl=function(t,e,i,s=!0){const n=Ue(t,e,i,s);return n?$e(n):void 0},t.colorToRgb=Ue,t.countOffset=1,t.decayOffset=1,t.deepExtend=yt,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=X,t.deleteCount=1,t.double=2,t.doublePI=d,t.drawAfterEffect=De,t.drawBeforeEffect=ke,t.drawParticle=Ce,t.drawParticlePlugin=Ee,t.drawShape=Re,t.drawShapeAfterDraw=_e,t.drawShapeBeforeDraw=Te,t.empty=0,t.executeOnSingleOrMultiple=vt,t.findItemFromSingleOrMultiple=function(t,e){return k(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=function(t,e){return Math.sqrt(j(t,e))},t.getDistanceSq=j,t.getDistances=Q,t.getFullScreenStyle=Mt,t.getHslAnimationFromHsl=function(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Ye(s.h,e.h,i),Ye(s.s,e.s,i),Ye(s.l,e.l,i)),s},t.getHslFromAnimation=Xe,t.getItemMapFromInitializer=It,t.getItemsFromInitializer=St,t.getLinkColor=function(t,e,i){if(i===h)return We();if(i!==u)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ge(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return He(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Be(t,{value:n}):i?h:u:n===u?u:Be(t,{value:n})},t.getLogger=_t,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=Y,t.getPosition=bt,t.getRandom=A,t.getRandomInRange=L,t.getRandomRgbColor=We,t.getRangeMax=W,t.getRangeMin=H,t.getRangeValue=q,t.getSize=function(t,e){return wt(t,e)},t.getStyleFromHsl=je,t.getStyleFromRgb=Ne,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=lt,t.hslToRgb=He,t.hslaToRgba=function(t){const e=He(t);return{a:t.a,b:e.b,g:e.g,r:e.r}},t.identity=1,t.initParticleNumericAnimationValue=function(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:W(s)*i,min:H(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=$(a),e&&(a.status=A()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a},t.inverseFactorNumerator=1,t.isArray=k,t.isBoolean=I,t.isFunction=function(t){return"function"==typeof t},t.isInArray=dt,t.isNull=R,t.isNumber=C,t.isObject=D,t.isPointInside=function(t,e,i,s,n){return gt(mt(t,s??0),e,i,n)},t.isString=O,t.itemFromArray=ft,t.itemFromSingleOrMultiple=Pt,t.lFactor=1,t.lMax=P,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=xe,t.loadParticlesOptions=Me,t.loadRandomFactor=1e4,t.manageListener=zt,t.memoize=rt,t.midColorValue=u,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=V,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Se,t.paintImage=Ie,t.parseAlpha=function(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1},t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=$,t.rangeColorToHsl=Ve,t.rangeColorToRgb=Be,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=$e,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ct,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=ht,t.safeMutationObserver=ut,t.setAnimationFunctions=function(t,e){E.nextFrame=t,E.cancel=e},t.setLogger=function(t){t.debug&&(Rt.debug=kt(t.debug)),t.error&&(Rt.error=kt(t.error)),t.info&&(Rt.info=kt(t.info)),t.log&&(Rt.log=kt(t.log)),t.trace&&(Rt.trace=kt(t.trace)),t.verbose&&(Rt.verbose=kt(t.verbose)),t.warning&&(Rt.warning=kt(t.warning))},t.setRandom=function(t=Math.random){T=t},t.setRangeValue=N,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Fe(t,e)?.a},t.stringToRgb=qe,t.threeQuarter=b,t.triple=3,t.tryCountIncrement=1,t.tsParticles=Ke,t.updateAnimation=function(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;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=a.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){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=U(i.value,r,l))}},t.updateColor=function(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ze(i,!1,e),Ze(s,!0,e),Ze(n,!0,e)},t.updateColorValue=Ze,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{tsParticles:(globalThis.__tsParticlesInternals.engine||{}).tsParticles}),delete(globalThis.window||globalThis).tsparticlesInternalExports;