@tsparticles/preset-fireworks 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/preset-fireworks",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "tsParticles fireworks preset",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -106,16 +106,16 @@
106
106
  "./package.json": "./package.json"
107
107
  },
108
108
  "dependencies": {
109
- "@tsparticles/basic": "4.2.0",
110
- "@tsparticles/effect-trail": "4.2.0",
111
- "@tsparticles/engine": "4.2.0",
112
- "@tsparticles/plugin-emitters": "4.2.0",
113
- "@tsparticles/plugin-emitters-shape-square": "4.2.0",
114
- "@tsparticles/plugin-sounds": "4.2.0",
115
- "@tsparticles/shape-line": "4.2.0",
116
- "@tsparticles/updater-destroy": "4.2.0",
117
- "@tsparticles/updater-life": "4.2.0",
118
- "@tsparticles/updater-rotate": "4.2.0"
109
+ "@tsparticles/basic": "4.2.1",
110
+ "@tsparticles/effect-trail": "4.2.1",
111
+ "@tsparticles/engine": "4.2.1",
112
+ "@tsparticles/plugin-emitters": "4.2.1",
113
+ "@tsparticles/plugin-emitters-shape-square": "4.2.1",
114
+ "@tsparticles/plugin-sounds": "4.2.1",
115
+ "@tsparticles/shape-line": "4.2.1",
116
+ "@tsparticles/updater-destroy": "4.2.1",
117
+ "@tsparticles/updater-life": "4.2.1",
118
+ "@tsparticles/updater-rotate": "4.2.1"
119
119
  },
120
120
  "publishConfig": {
121
121
  "access": "public"
@@ -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
- /* Preset v4.2.0 */
2
+ /* Preset v4.2.1 */
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) :
@@ -812,7 +812,7 @@
812
812
  return this.#domArray;
813
813
  }
814
814
  get version() {
815
- return "4.2.0";
815
+ return "4.2.1";
816
816
  }
817
817
  addEventListener(type, listener) {
818
818
  this.#eventDispatcher.addEventListener(type, listener);
@@ -2344,7 +2344,7 @@
2344
2344
  }
2345
2345
 
2346
2346
  async function loadBlendPlugin(engine) {
2347
- engine.checkVersion("4.2.0");
2347
+ engine.checkVersion("4.2.1");
2348
2348
  await engine.pluginManager.register(e => {
2349
2349
  e.pluginManager.addPlugin(new BlendPlugin());
2350
2350
  });
@@ -2381,7 +2381,7 @@
2381
2381
  }
2382
2382
 
2383
2383
  async function loadCircleShape(engine) {
2384
- engine.checkVersion("4.2.0");
2384
+ engine.checkVersion("4.2.1");
2385
2385
  await engine.pluginManager.register(e => {
2386
2386
  e.pluginManager.addShape(["circle"], () => {
2387
2387
  return Promise.resolve(new CircleDrawer());
@@ -2429,7 +2429,7 @@
2429
2429
  }
2430
2430
 
2431
2431
  async function loadHexColorPlugin(engine) {
2432
- engine.checkVersion("4.2.0");
2432
+ engine.checkVersion("4.2.1");
2433
2433
  await engine.pluginManager.register(e => {
2434
2434
  e.pluginManager.addColorManager("hex", new HexColorManager());
2435
2435
  });
@@ -2482,7 +2482,7 @@
2482
2482
  }
2483
2483
 
2484
2484
  async function loadHslColorPlugin(engine) {
2485
- engine.checkVersion("4.2.0");
2485
+ engine.checkVersion("4.2.1");
2486
2486
  await engine.pluginManager.register(e => {
2487
2487
  e.pluginManager.addColorManager("hsl", new HslColorManager());
2488
2488
  });
@@ -2506,7 +2506,7 @@
2506
2506
  }
2507
2507
 
2508
2508
  async function loadMovePlugin(engine) {
2509
- engine.checkVersion("4.2.0");
2509
+ engine.checkVersion("4.2.1");
2510
2510
  await engine.pluginManager.register(e => {
2511
2511
  const moveEngine = e, movePluginManager = moveEngine.pluginManager;
2512
2512
  movePluginManager.initializers.pathGenerators ??= new Map();
@@ -2722,7 +2722,7 @@
2722
2722
  }
2723
2723
 
2724
2724
  async function loadOpacityUpdater(engine) {
2725
- engine.checkVersion("4.2.0");
2725
+ engine.checkVersion("4.2.1");
2726
2726
  await engine.pluginManager.register(e => {
2727
2727
  e.pluginManager.addParticleUpdater("opacity", container => {
2728
2728
  return Promise.resolve(new OpacityUpdater(container));
@@ -3067,7 +3067,7 @@
3067
3067
  }
3068
3068
 
3069
3069
  async function loadOutModesUpdater(engine) {
3070
- engine.checkVersion("4.2.0");
3070
+ engine.checkVersion("4.2.1");
3071
3071
  await engine.pluginManager.register(e => {
3072
3072
  e.pluginManager.addParticleUpdater("outModes", container => {
3073
3073
  return Promise.resolve(new OutOfCanvasUpdater(container));
@@ -3138,7 +3138,7 @@
3138
3138
  }
3139
3139
 
3140
3140
  async function loadPaintUpdater(engine) {
3141
- engine.checkVersion("4.2.0");
3141
+ engine.checkVersion("4.2.1");
3142
3142
  await engine.pluginManager.register(e => {
3143
3143
  e.pluginManager.addParticleUpdater("paint", container => {
3144
3144
  return Promise.resolve(new PaintUpdater(e.pluginManager, container));
@@ -3193,7 +3193,7 @@
3193
3193
  }
3194
3194
 
3195
3195
  async function loadRgbColorPlugin(engine) {
3196
- engine.checkVersion("4.2.0");
3196
+ engine.checkVersion("4.2.1");
3197
3197
  await engine.pluginManager.register(e => {
3198
3198
  e.pluginManager.addColorManager("rgb", new RgbColorManager());
3199
3199
  });
@@ -3278,7 +3278,7 @@
3278
3278
  }
3279
3279
 
3280
3280
  async function loadSizeUpdater(engine) {
3281
- engine.checkVersion("4.2.0");
3281
+ engine.checkVersion("4.2.1");
3282
3282
  await engine.pluginManager.register(e => {
3283
3283
  e.pluginManager.addParticleUpdater("size", container => {
3284
3284
  return Promise.resolve(new SizeUpdater(container));
@@ -3287,7 +3287,7 @@
3287
3287
  }
3288
3288
 
3289
3289
  async function loadBasic(engine) {
3290
- engine.checkVersion("4.2.0");
3290
+ engine.checkVersion("4.2.1");
3291
3291
  await engine.pluginManager.register(async (e) => {
3292
3292
  await Promise.all([
3293
3293
  loadBlendPlugin(e),
@@ -3618,7 +3618,7 @@
3618
3618
  }
3619
3619
 
3620
3620
  async function loadDestroyUpdater(engine) {
3621
- engine.checkVersion("4.2.0");
3621
+ engine.checkVersion("4.2.1");
3622
3622
  await engine.pluginManager.register(e => {
3623
3623
  e.pluginManager.addParticleUpdater("destroy", container => {
3624
3624
  return Promise.resolve(new DestroyUpdater(e.pluginManager, container));
@@ -3849,7 +3849,7 @@
3849
3849
  })(EmitterClickMode || (EmitterClickMode = {}));
3850
3850
 
3851
3851
  async function loadEmittersPluginSimple(engine) {
3852
- engine.checkVersion("4.2.0");
3852
+ engine.checkVersion("4.2.1");
3853
3853
  await engine.pluginManager.register(async (e) => {
3854
3854
  const instancesManager = await getEmittersInstancesManager(e);
3855
3855
  await addEmittersShapesManager(e);
@@ -3937,7 +3937,7 @@
3937
3937
  }
3938
3938
 
3939
3939
  async function loadEmittersShapeSquare(engine) {
3940
- engine.checkVersion("4.2.0");
3940
+ engine.checkVersion("4.2.1");
3941
3941
  await engine.pluginManager.register((e) => {
3942
3942
  ensureEmittersPluginLoaded(e);
3943
3943
  e.pluginManager.addEmitterShapeGenerator?.("square", new EmittersSquareShapeGenerator());
@@ -4081,7 +4081,7 @@
4081
4081
  }
4082
4082
 
4083
4083
  async function loadLifeUpdater(engine) {
4084
- engine.checkVersion("4.2.0");
4084
+ engine.checkVersion("4.2.1");
4085
4085
  await engine.pluginManager.register(e => {
4086
4086
  e.pluginManager.addParticleUpdater("life", container => {
4087
4087
  return Promise.resolve(new LifeUpdater(container));
@@ -4107,7 +4107,7 @@
4107
4107
  }
4108
4108
 
4109
4109
  async function loadLineShape(engine) {
4110
- engine.checkVersion("4.2.0");
4110
+ engine.checkVersion("4.2.1");
4111
4111
  await engine.pluginManager.register(e => {
4112
4112
  e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
4113
4113
  });
@@ -4211,7 +4211,7 @@
4211
4211
  }
4212
4212
 
4213
4213
  async function loadRotateUpdater(engine) {
4214
- engine.checkVersion("4.2.0");
4214
+ engine.checkVersion("4.2.1");
4215
4215
  await engine.pluginManager.register(e => {
4216
4216
  e.pluginManager.addParticleUpdater("rotate", container => {
4217
4217
  return Promise.resolve(new RotateUpdater(container));
@@ -4527,7 +4527,7 @@
4527
4527
  }
4528
4528
 
4529
4529
  async function loadSoundsPlugin(engine) {
4530
- engine.checkVersion("4.2.0");
4530
+ engine.checkVersion("4.2.1");
4531
4531
  await engine.pluginManager.register(e => {
4532
4532
  e.pluginManager.addPlugin(new SoundsPlugin(e));
4533
4533
  });
@@ -4643,7 +4643,7 @@
4643
4643
  }
4644
4644
 
4645
4645
  async function loadTrailEffect(engine) {
4646
- engine.checkVersion("4.2.0");
4646
+ engine.checkVersion("4.2.1");
4647
4647
  await engine.pluginManager.register(e => {
4648
4648
  e.pluginManager.addEffect("trail", container => {
4649
4649
  return Promise.resolve(new TrailDrawer(container));
@@ -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.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.fireworks=t.__tsParticlesInternals.presets.fireworks||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,w=100,P=.25;var x;function b(t){return"z"in t?t.z:o.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(x||(x={}));class M{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(o.x,o.y,o.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 M.create(t.x,t.y,b(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,b(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+b(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=b(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.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 M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=b(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-b(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=b(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function k(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function D(t){return null==t}const _=Math.PI/180;let E=Math.random;const L=t=>requestAnimationFrame(t),R=t=>{cancelAnimationFrame(t)};function F(){return A(E(),0,1-Number.EPSILON)}function T(t,e){return F()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function B(t){const e=W(t);let i=V(t);return e===i&&(i=0),T(i,e)}function U(t){return k(t)?t:B(t)}function V(t){return k(t)?t:t.min}function W(t){return k(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&k(t))return t;const i=V(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function $(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*_}function j(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??F()*s)*t.size.width/s,y:(t.position?.y??F()*s)*t.size.height/s}}({size:t.size,position:e})}function H(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function tt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(et(t,s??0),e,i,n)}function et(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function it(t,...e){for(const i of e){if(D(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(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 O(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=>it(void 0,t)):it(e[n],a)}}return t}function st(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function nt(t,e,i){return I(t)?J(t,e,i):t}function at(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let ot,rt;function lt(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ct(t,e,i,s=!1){let n=e.get(t);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 ht{#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 dt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(dt||(dt={}));class ut{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(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(dt.configAdded,{data:{name:e,config:t}})}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 ct(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 ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(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}(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 pt=t=>(...e)=>{t(...e)},ft={debug:pt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:pt(console.info),log:pt(console.log),trace:pt(console.trace),verbose:pt(console.log),warning:pt(console.warn)};function gt(){return ft}const mt="100%";class yt{pluginManager=new ut(this);#h=[];#d=new ht;#o=!1;get items(){return this.#h}get version(){return"4.2.0"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return $s}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=nt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(gt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=nt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=mt,s.style.height||=mt,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||=mt,s.style.height||=mt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var vt,wt,Pt,xt,bt,Mt,zt,Ct,St,kt,Ot;!function(t){t.circle="circle",t.rectangle="rectangle"}(vt||(vt={}));class It{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 Dt extends It{radius;constructor(t,e,i){super(t,e,vt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,N(e,i)<=s*s;var e,i,s}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 Dt||t.type===vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof _t||t.type===vt.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 _t extends It{size;constructor(t,e,i,s){super(t,e,vt.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 Dt)return t.intersects(this);if(!(t instanceof _t))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}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(wt||(wt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Pt||(Pt={})),function(t){t.delete="delete",t.wait="wait"}(xt||(xt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(bt||(bt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Mt||(Mt={})),function(t){t.none="none",t.max="max",t.min="min"}(zt||(zt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ct||(Ct={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(St||(St={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Ot||(Ot={}));class Et{load(t){D(t)||this.doLoad(t)}}function Lt(t,...e){for(const i of e)t.load(i)}function Rt(t,e,i){void 0!==i&&(t[e]=i)}function Ft(t,e,i){void 0!==i&&(t[e]=G(i))}function Tt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Bt extends Et{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ft(this,"count",t.count),Rt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Ft(this,"delay",t.delay),Rt(this,"sync",t.sync)}}class Ut extends Bt{mode=Pt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Rt(this,"mode",t.mode),Rt(this,"startValue",t.startValue)}}class Vt extends Bt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Rt(this,"max",t.max),Rt(this,"min",t.min),Ft(this,"offset",t.offset)}}class Wt extends Et{h=new Vt(0,y);l=new Vt(0,w);s=new Vt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Gt extends Et{value="";static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){D(t.value)||(this.value=t.value)}}class $t extends Gt{animation=new Wt;static create(t,e){const i=new $t;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Nt extends Et{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Gt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Rt(this,"image",t.image),Rt(this,"position",t.position),Rt(this,"repeat",t.repeat),Rt(this,"size",t.size),Rt(this,"opacity",t.opacity)}}class qt extends Et{enable=!0;zIndex=0;doLoad(t){Rt(this,"enable",t.enable),Rt(this,"zIndex",t.zIndex)}}class jt extends Et{delay=.5;enable=!0;doLoad(t){Rt(this,"delay",t.delay),Rt(this,"enable",t.enable)}}class Ht extends Et{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Rt(this,"close",t.close),Rt(this,"type",t.type)}}class Xt extends Et{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=$t.create(this.color,t.color)),Rt(this,"enable",t.enable),Ft(this,"opacity",t.opacity)}}class Yt extends Et{offset=0;value=90;doLoad(t){Ft(this,"offset",t.offset),Ft(this,"value",t.value)}}class Qt extends Et{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Rt(this,"x",t.x),Rt(this,"y",t.y),Rt(this,"mode",t.mode),Rt(this,"radius",t.radius)}}class Kt extends Et{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ft(this,"acceleration",t.acceleration),Rt(this,"enable",t.enable),Rt(this,"inverse",t.inverse),Ft(this,"maxSpeed",t.maxSpeed)}}class Zt extends Et{value=0;doLoad(t){D(t.value)||(this.value=G(t.value))}}class Jt extends Zt{animation=new Bt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class te extends Jt{animation=new Ut}class ee extends Et{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Rt(this,"clamp",t.clamp),this.delay.load(t.delay),Rt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=it(this.options,t.options))}}class ie extends Et{bottom;default=bt.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class se extends Et{acceleration=0;enable=!1;position;doLoad(t){Ft(this,"acceleration",t.acceleration),Rt(this,"enable",t.enable),t.position&&(this.position=it({},t.position))}}class ne extends Et{angle=new Yt;center=new Qt;decay=0;direction=x.none;distance={};drift=0;enable=!1;gravity=new Kt;outModes=new ie;path=new ee;random=!1;size=!1;speed=2;spin=new se;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ft(this,"decay",t.decay),Rt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ft(this,"drift",t.drift),Rt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Rt(this,"random",t.random),Rt(this,"size",t.size),Ft(this,"speed",t.speed),this.spin.load(t.spin),Rt(this,"straight",t.straight),Rt(this,"vibrate",t.vibrate),Rt(this,"warp",t.warp)}}class ae extends Et{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=$t.create(this.color,t.color)),Ft(this,"width",t.width),Ft(this,"opacity",t.opacity)}}class oe extends Et{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=$t.create(this.color,t.color)),Tt(this,"fill",t.fill,()=>new Xt),Tt(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Et{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Et{enable=!1;height=1080;width=1920;doLoad(t){Rt(this,"enable",t.enable),Rt(this,"width",t.width),Rt(this,"height",t.height)}}class he extends Et{mode=xt.delete;value=0;doLoad(t){Rt(this,"mode",t.mode),Rt(this,"value",t.value)}}class de extends Et{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Rt(this,"value",t.value)}}class ue extends Et{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Rt(this,"close",t.close),Rt(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Rt(this,"opacityRate",t.opacityRate),Rt(this,"sizeRate",t.sizeRate),Rt(this,"velocityRate",t.velocityRate)}}class fe extends Et{bounce=new le;effect=new Ht;groups={};move=new ne;number=new de;paint;palette;reduceDuplicates=!1;shape=new ue;zIndex=new pe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new oe,this.paint.color=new $t,this.paint.color.value="#fff",this.paint.fill=new Xt,this.paint.fill.enable=!0}doLoad(t){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]=it(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=st(e,t=>{const e=new oe;return e.load(t),e}):I(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function ge(t,e,...i){const s=new fe(t,e);return Lt(s,...i),s}class me extends Et{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new Nt,this.fullScreen=new qt,this.particles=ge(this.#p,this.#u),this.resize=new jt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,st(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Rt(this,"autoPlay",t.autoPlay),Rt(this,"clear",t.clear),Rt(this,"key",t.key),Rt(this,"name",t.name),Ft(this,"delay",t.delay),Rt(this,"detectRetina",t.detectRetina),Ft(this,"duration",t.duration),Rt(this,"fpsLimit",t.fpsLimit),Rt(this,"hdr",t.hdr),Rt(this,"pauseOnBlur",t.pauseOnBlur),Rt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Rt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=it(this.style,t.style),Rt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,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))}}const ye=new Map;function ve(t,e){let i=ye.get(t);return i||(i=e(),ye.size>2e3&&ye.clear(),ye.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Pe(t,n.value,i,s);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return we(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Pe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(T(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function xe(t,e,i,s=!0){const n=we(t,e,i,s);return n?be(n):void 0}function be(t){const e=t.r/m,i=t.g/m,s=t.b/m,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};return a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function Me(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ze(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(m,m*Me(c,l,a+h)),u=Math.min(m,m*Me(c,l,a)),p=Math.min(m,m*Me(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Ce(t,e,i){const s=i??1;return ve(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Se(t,e,i){const s=i??1;return ve(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ce(ze(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function ke(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Oe(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:w}};return e&&(Ie(s.h,e.h,i),Ie(s.s,e.s,i),Ie(s.l,e.l,i)),s}function Ie(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=Ot.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function De(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?B(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==Ot.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=Ot.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Ot.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=A(t.value,r,o)}function _e(t,e){if(!t)return;const{h:i,s:s,l:n}=t;De(i,!1,e),De(s,!0,e),De(n,!0,e)}const Ee=new yt;function Le(){const t=(t,e,i)=>{const s=t.max>i?t.max-i:0;let n=G(t);s&&(n=G(t.min-s,i));const a=t.min<e?t.min:0;return a&&(n=G(0,t.max+a)),n},e=["#FF0000","#FF8000","#FFFF00","#00FF00","#00FFFF","#0000FF","#FF00FF"].map(e=>{const i=(t=>{let e=t;const i=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;i.test(e)&&(e=e.replace(i,(t,e,i,s,n)=>e+e+i+i+s+s+(n?n+n:"")));const s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);if(!s)return;s.shift();const n=2,a=1,o=0,r={a:s[3],b:s[n],g:s[a],r:s[o]};return{r:r.r?Number.parseInt(r.r,16):0,g:r.g?Number.parseInt(r.g,16):0,b:r.b?Number.parseInt(r.b,16):0,a:r.a?Number.parseInt(r.a,16):1}})(e);if(!i)return;const s=be(i),n=0,a=100,o=0,r=100,l=t({min:s.s-30,max:s.s+30},n,a),c=t({min:s.l-30,max:s.l+30},o,r);return{paint:{fill:{color:{value:{h:s.h,s:l,l:c}},enable:!0},stroke:{width:0}},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:kt.max,destroy:zt.min}},shape:{type:"circle"},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:kt.min,destroy:zt.none}},life:{count:1,duration:{value:{min:1,max:2}}},move:{decay:{min:.075,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:15},direction:x.none,outModes:bt.destroy}}}).filter(t=>void 0!==t);return{detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:x.top,rate:{delay:.3,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",bounds:{top:{min:15,max:35}},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:{min:75,max:150}},particles:e}},life:{count:1},shape:{type:"circle"},effect:{type:"trail",options:{trail:{length:{min:5,max:15},minWidth:1,maxWidth:1}}},size:{value:1},paint:{stroke:{color:{value:"#ffffff"},width:1},fill:{enable:!1}},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:bt.destroy,top:bt.none}}},sounds:{enable:!0,events:[{event:dt.particleRemoved,filter:t=>t.data.particle.options.move.gravity.inverse,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}}}class Re{enable=!1;mode="destination-out";load(t){D(t)||(Rt(this,"mode",t.mode),Rt(this,"enable",t.enable))}}class Fe{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Ns});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Re),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Re,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Te(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Fe)})}class Ae{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=O(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Be(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Ae))})}var Ue;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ue||(Ue={}));const Ve=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,We=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ge{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ve,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=We.exec(e);return i?{a:i[Ue.a]?Number.parseInt(i[Ue.a],16)/255:1,b:Number.parseInt(i[Ue.b]??"0",16),g:Number.parseInt(i[Ue.g]??"0",16),r:Number.parseInt(i[Ue.r]??"0",16)}:void 0}}async function $e(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ge)})}var Ne;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ne||(Ne={}));const qe=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class je{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=qe.exec(t);return e?function(t){const e=ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[Ne.a]):1,h:Number.parseInt(e[Ne.h]??"0",10),l:Number.parseInt(e[Ne.l]??"0",10),s:Number.parseInt(e[Ne.s]??"0",10)}):void 0}}async function He(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new je)})}class Xe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Hs});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ye(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Xe(t.pluginManager))})}function Qe(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:W(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Pt.increase:o.status=Ot.increasing;break;case Pt.decrease:o.status=Ot.decreasing;break;case Pt.random:o.status=F()>=n?Ot.increasing:Ot.decreasing}const t=s.mode===Pt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=Ot.increasing);break;case kt.max:o.value=o.max,t&&(o.status=Ot.decreasing);break;case kt.random:default:o.value=B(o),t&&(o.status=F()>=n?Ot.increasing:Ot.decreasing)}}return o.initialValue=o.value,o}function Ke(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case Ot.increasing:e.value+=a;break;case Ot.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Ot.increasing:e.value>=r&&(i?e.status=Ot.decreasing:e.value-=r,e.loops??=0,e.loops++);break;case Ot.decreasing:e.value<=o&&(i?e.status=Ot.increasing:e.value+=r,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case zt.max:i>=n&&t.destroy();break;case zt.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class Ze extends Ut{destroy=zt.none;load(t){super.load(t),D(t)||Rt(this,"destroy",t.destroy)}}class Je extends te{animation=new Ze;value=1;load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ti{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Qe(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){At(t,"opacity",Je,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ke(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function ei(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ti(t)))})}class ii{modes;#u;#y;constructor(t){this.#u=t,this.modes=[bt.bounce,bt.split],this.#y=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#y)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=et(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==bt.bounce&&t.outMode!==bt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===bt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==bt.bounce&&t.outMode!==bt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===bt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class si{modes;constructor(t){this.modes=[bt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case St.normal:case St.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case St.inside:{const{dx:e,dy:i}=$(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class ni{modes;#u;constructor(t){this.#u=t,this.modes=[bt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;tt(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const ai=z.origin;class oi{modes;#u;constructor(t){this.#u=t,this.modes=[bt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case St.inside:{const{x:e,y:i}=t.velocity;ai.setTo(o),ai.length=t.moveCenter.radius,ai.angle=t.velocity.angle+Math.PI,ai.addTo(t.moveCenter);const{dx:s,dy:a}=$(t.position,ai);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(B({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(B({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=$(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case St.outside:{t.position.x=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=$(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case St.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=et(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ri{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,bt.bounce,t=>new ii(t)),this.#v(t,bt.out,t=>new oi(t)),this.#v(t,bt.destroy,t=>new si(t)),this.#v(t,bt.none,t=>new ni(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function li(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ri(t)))})}class ci{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=nt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=$t.create(void 0===a?void 0:$t.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=xe(this.#p,i);s&&(t.fillColor=Oe(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=$t.create(void 0===a?void 0:$t.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=xe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Oe(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(_e(t.fillColor,e),_e(t.strokeColor,e))}}async function hi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ci(t.pluginManager,e)))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(di||(di={}));const ui=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class pi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=ui.exec(t);return e?{a:e.length>4?X(e[di.a]):1,b:parseInt(e[di.b]??"0",10),g:parseInt(e[di.g]??"0",10),r:parseInt(e[di.r]??"0",10)}:void 0}}async function fi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new pi)})}class gi extends Ut{destroy=zt.none;load(t){super.load(t),D(t)||Rt(this,"destroy",t.destroy)}}class mi extends te{animation=new gi;value=3;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class yi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){At(t,"size",mi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Qe(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ke(t,t.size,!0,t.options.size.animation.destroy,e)}}async function vi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new yi(t)))})}async function wi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([Te(t),$e(t),He(t),fi(t),Ye(t),Be(t),hi(t),ei(t),li(t),vi(t)])})}class Pi{bottom;left;right;top;load(t){D(t)||(Ft(this,"bottom",t.bottom),Ft(this,"left",t.left),Ft(this,"right",t.right),Ft(this,"top",t.top))}}var xi;!function(t){t.explode="explode",t.none="none",t.split="split"}(xi||(xi={}));class bi{maxSizeFactor=3;speed=2;load(t){D(t)||(Rt(this,"maxSizeFactor",t.maxSizeFactor),Rt(this,"speed",t.speed))}}class Mi extends Zt{value=3}class zi extends Zt{value={min:4,max:9}}class Ci{count=1;factor=new Mi;fillColor;fillColorOffset;particles;rate=new zi;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){D(t)||(void 0!==t.fillColor&&(this.fillColor=Gt.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=Gt.create(this.strokeColor,t.strokeColor)),Rt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=st(t.particles,t=>it({},t)),Rt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class Si{bounds=new Pi;explode=new bi;mode=xi.none;split=new Ci;load(t){D(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function ki(t,e,i,s){return t&&s?function(t,e){const i=U(e.h??0),s=U(e.s??0),n=U(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return $t.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?$t.create(void 0,e):i?$t.create(void 0,i):s?function(t){return $t.create(void 0,{value:{hsl:t}})}(s):void 0}function Oi(t,e,i,s){const n=i.options.destroy;if(!n)return;const a=n.split,o=ge(t,e,i.options),r=nt(a.fillColor),l=nt(a.strokeColor),c=i.getFillColor(),h=i.getStrokeColor();o.move.load({center:{x:i.position.x,y:i.position.y,mode:Q.precise}});const d=1/U(a.factor.value),u=o.size;u&&(k(u.value)?u.value*=d:(u.value.min*=d,u.value.max*=d)),o.load(s);const p=nt(o.paint),f=p?.fill,g=p?.stroke,m=ki(a.fillColorOffset,r,f?.color,c),y=ki(a.strokeColorOffset,l,g?.color,h);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?G(-i.size.value,i.size.value):0,w={x:i.position.x+B(v),y:i.position.y+B(v)};return e.particles.addParticle(w,o,i.group,t=>!(t.size.value<.5)&&(t.velocity.length=B(G(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Ii{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:a,left:o,right:r,top:l}=n,{destroyBounds:c}=t,h=e.canvas.size;a&&(c.bottom=U(a)*h.height/s),o&&(c.left=U(o)*h.width/s),r&&(c.right=U(r)*h.width/s),l&&(c.top=U(l)*h.height/s)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){At(t,"destroy",Si,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case xi.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=U(n.rate.value),o=nt(n.particles);for(let s=0;s<a;s++)Oi(t,e,i,o)}(this.#p,this.#u,t);break;case xi.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Di(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Ii(t.pluginManager,e)))})}class _i{count;delay;duration;wait=!1;load(t){D(t)||(Rt(this,"count",t.count),Ft(this,"delay",t.delay),Ft(this,"duration",t.duration),Rt(this,"wait",t.wait))}}class Ei{delay=.1;quantity=1;load(t){D(t)||(Ft(this,"quantity",t.quantity),Ft(this,"delay",t.delay))}}class Li{color=!1;opacity=!1;load(t){D(t)||(Rt(this,"color",t.color),Rt(this,"opacity",t.opacity))}}class Ri{options={};replace=new Li;type="square";load(t){D(t)||(void 0!==t.options&&(this.options=it({},t.options??{})),this.replace.load(t.replace),Rt(this,"type",t.type))}}class Fi{height=0;mode=Q.percent;width=0;load(t){D(t)||(Rt(this,"mode",t.mode),Rt(this,"height",t.height),Rt(this,"width",t.width))}}class Ti{fill;stroke;load(t){D(t)||(t.fill&&(this.fill??=new Xt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class Ai{autoPlay=!0;direction;domId;fill=!0;life=new _i;name;particles;position;rate=new Ei;shape=new Ri;size;spawn=new Ti;spawnFillColor;spawnStrokeColor;startCount=0;load(t){D(t)||(Rt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Fi,this.size.load(t.size)),Rt(this,"direction",t.direction),Rt(this,"domId",t.domId),Rt(this,"fill",t.fill),this.life.load(t.life),Rt(this,"name",t.name),this.particles=st(t.particles,t=>it({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new $t,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new $t,this.spawnStrokeColor.load(t.spawnStrokeColor)),Rt(this,"startCount",t.startCount))}}class Bi{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Xs});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=st(i.emitters,t=>{const e=new Ai;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const Ui=new WeakMap;class Vi{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var Wi;async function Gi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ui.get(e);return i||(i=Promise.resolve().then(function(){return Js}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ui.delete(e),t}),Ui.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Qs}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Bi(e))})}!function(t){t.emitter="emitter"}(Wi||(Wi={}));var $i;function Ni(t,e){return t+e*(F()-n)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}($i||($i={}));class qi extends Vi{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Ni(e.x,i.width),y:Ni(e.y,i.height)}};{const t=i.width*n,s=i.height*n,a=function(t){return Math.floor(F()*t)}(4),o=2*(F()-n);switch(a){case $i.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case $i.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case $i.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case $i.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class ji{generate(t,e,i,s,n){return new qi(e,i,s,n)}}async function Hi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new ji)})}class Xi extends Zt{sync=!1;load(t){D(t)||(super.load(t),Rt(this,"sync",t.sync))}}class Yi extends Zt{sync=!1;load(t){D(t)||(super.load(t),Rt(this,"sync",t.sync))}}class Qi{count=0;delay=new Xi;duration=new Yi;load(t){D(t)||(Rt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ki{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?U(i.delay.value)*s/e.retina.reduceFactor*a:0,delayTime:0,duration:e.retina.reduceFactor?U(i.duration.value)*n/e.retina.reduceFactor*a:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){At(t,"life",Qi,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=G(0,i.width),r=G(0,i.width);t.position.x=B(o),t.position.y=B(r),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=U(l.delay.value)*a,s.duration=U(l.duration.value)*a)}(t,e,this.#u.canvas.size)}}async function Zi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ki(t)))})}class Ji{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ts(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Ji))})}class es{decay=0;enable=!1;speed=0;sync=!1;load(t){D(t)||(Rt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Rt(this,"sync",t.sync))}}class is extends Zt{animation=new es;direction=wt.clockwise;path=!1;load(t){D(t)||(super.load(t),Rt(this,"direction",t.direction),this.animation.load(t.animation),Rt(this,"path",t.path))}}class ss{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:q(U(e.value)),min:0,max:u},t.pathRotation=e.path;let i=e.direction;if(i===wt.random){i=Math.floor(2*F())>0?wt.counterClockwise:wt.clockwise}switch(i){case wt.counterClockwise:case"counterClockwise":t.rotate.status=Ot.decreasing;break;case wt.clockwise:t.rotate.status=Ot.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-U(s.decay),t.rotate.velocity=U(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=F())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){At(t,"rotate",is,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Ke(t,t.rotate,!1,zt.none,e),t.rotation=t.rotate.value))}}async function ns(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new ss(t)))})}const as="pointerdown",os="touchstart";class rs{loop=!1;source="";load(t){D(t)||(O(t)?(Rt(this,"loop",t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class ls{duration=500;value=[];load(t){D(t)||(Rt(this,"duration",t.duration),Rt(this,"value",t.value))}}class cs{loop=!1;melodies=[];notes=[];load(t){D(t)||(Rt(this,"loop",t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new cs;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new ls;return e.load(t),e})))}}class hs{audio;event=[];filter;melodies;notes=[];load(t){if(!D(t)&&(Rt(this,"event",t.event),void 0!==t.audio&&(I(t.audio)?this.audio=t.audio.map(t=>{const e=new rs;return e.load(t),e}):(this.audio=new rs,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new ls;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new cs;return e.load(t),e})),t.filter))if(S(t.filter)){const e=globalThis[t.filter];"function"==typeof e&&(this.filter=e)}else this.filter=t.filter}}class ds{height=24;path;style="";svg;width=24;load(t){D(t)||(Rt(this,"path",t.path),Rt(this,"svg",t.svg),Rt(this,"width",t.width),Rt(this,"height",t.height))}}class us{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new ds,this.unmute=new ds,this.volumeDown=new ds,this.volumeUp=new ds,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){D(t)||(Rt(this,"enable",t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class ps{max=100;min=0;step=10;value=100;load(t){D(t)||(O(t)?(Rt(this,"max",t.max),Rt(this,"min",t.min),Rt(this,"step",t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class fs{autoPlay=!0;enable=!1;events=[];icons=new us;volume=new ps;load(t){D(t)||(Rt(this,"autoPlay",t.autoPlay),Rt(this,"enable",t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new hs;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const gs=new Map;function ms(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],s=gs.get(i);return s?s[parseInt(e[3]??"0")]:void 0}gs.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),gs.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),gs.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),gs.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),gs.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),gs.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),gs.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),gs.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),gs.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),gs.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),gs.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),gs.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),gs.set("pause",[0]);let ys=!0;const vs=()=>ys,ws=()=>{ys=!1},Ps=()=>{removeEventListener(as,Ps),removeEventListener(os,Ps),ws()};class xs{id="sounds";#n;constructor(t){this.#n=t;const e={capture:!0,once:!0};addEventListener(as,Ps,e),addEventListener(os,Ps,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return sn});return new e(t,this.#n)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.sounds;void 0===s?.load&&(e.sounds=s=new fs),s.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function bs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new xs(t))})}const Ms={a:1,b:0,c:0,d:1};class zs{#u;constructor(t){this.#u=t}drawAfter(t){const{context:e,drawPosition:i,drawRadius:s,drawScale:a,particle:r,transformData:l}=t,c=2*s,h=this.#u.retina.pixelRatio,d=r.trail;if(!d||!r.trailLength)return;const u=i,p=r.trailLength*a+s;if(d.push({break:r.justWarped,color:e.fillStyle||e.strokeStyle,position:{x:u.x,y:u.y},transformData:l}),d.length<3)return;const f=Math.floor(p);d.length>f&&d.splice(0,d.length-f);const g=Math.min(d.length,p);e.save(),e.lineCap="butt",e.lineJoin="round";for(let t=g-2;t>0;t--){const i=d[t+1],s=d[t],l=d[t-1];if(!i||!s||!l)continue;const u=i.position,p=s.position,f=l.position,m=r.trailTransform?s.transformData??Ms:Ms;if(s.break||i.break||l.break)continue;e.setTransform(m.a,m.b,m.c,m.d,p.x,p.y);const y=(u.x+p.x)*n-p.x,v=(u.y+p.y)*n-p.y,w=(p.x+f.x)*n-p.x,P=(p.y+f.y)*n-p.y;e.beginPath(),e.moveTo(y,v),e.quadraticCurveTo(o.x,o.y,w,P);const x=Math.max(t/g*c,h,(r.trailMinWidth??-1)*a),b=e.globalAlpha;e.globalAlpha=r.trailFade?t/g:1,e.lineWidth=r.trailMaxWidth?Math.min(x,r.trailMaxWidth*a):x,e.strokeStyle=s.color,e.stroke(),e.globalAlpha=b}e.restore()}isInsideCanvas(t){const{canvasSize:e,direction:i,outMode:s,particle:n,radius:a}=t,o=n.position,r=n.trail;let l=o.x-a,c=o.x+a,h=o.y-a,d=o.y+a;if(r?.length){const t=Math.max(a,n.trailMaxWidth??0,n.trailMinWidth??0);for(const e of r)l=Math.min(l,e.position.x-t),c=Math.max(c,e.position.x+t),h=Math.min(h,e.position.y-t),d=Math.max(d,e.position.y+t)}const u=s===bt.destroy;return i===Y.bottom?h<=e.height:i===Y.left?c>=0:i===Y.right?l<=e.width:i===Y.top?d>=0:u?c>=0&&d>=0&&l<=e.width&&h<=e.height:o.x+a>=0&&o.y+a>=0&&o.x-a<=e.width&&o.y-a<=e.height}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=U(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?U(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?U(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}async function Cs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("trail",t=>Promise.resolve(new zs(t)))})}async function Ss(t){await t.pluginManager.register(async t=>{await Promise.all([wi(t),(async t=>{await Gi(t),await Hi(t)})(t),Cs(t),bs(t),ts(t),ns(t),Di(t),Zi(t)]),t.pluginManager.addPreset("fireworks",Le(),!1)})}const ks=globalThis;ks.loadFireworksPreset=Ss,ks.tsParticles=Ee;function Os(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Is{#x;#b;#M;#z;#C;#u;#S;#k;#O;#I;#D;#_;#E;#L;#p;#R;#F;#T={};#A=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#b=i,this.#S=null,this.#F=[],this.#R=[],this.#C=[],this.#x=[],this.#M=[],this.#z=[],this.#O=[],this.#I=[],this.#D=[],this.#_=[],this.#L=[],this.#E=[]}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#b.size.width,this.#b.size.height)})}clear(){let t=!1;for(const e of this.#x)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#F=[],this.#R=[],this.#C=[],this.#x=[],this.#M=[],this.#z=[],this.#O=[],this.#I=[],this.#D=[],this.#_=[],this.#L=[],this.#E=[]}draw(t){const e=this.#S;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.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#T,g=a?Se(a,r.hdr,h*d):void 0,m=o?Se(o,r.hdr,u*d):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.#D)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,d,f,p),this.#W({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#$(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#L)e.drawSettingsSetup?.(i,t);for(const e of this.#_)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#z)e.clearDraw?.(i,t);for(const e of this.#E)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#C=[],this.#x=[],this.#M=[],this.#z=[],this.#O=[],this.#D=[],this.#I=[],this.#_=[],this.#L=[],this.#E=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.canvasClear&&this.#x.push(t),t.canvasPaint&&this.#M.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#D.push(t),t.drawParticleCleanup&&this.#I.push(t),t.draw&&this.#_.push(t),t.drawSettingsSetup&&this.#L.push(t),t.drawSettingsCleanup&&this.#E.push(t),t.clearDraw&&this.#z.push(t)}initUpdaters(){this.#F=[],this.#R=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#R.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#F.push(t)}paint(){let t=!1;for(const e of this.#M)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(o.x,o.y,this.#b.size.width,this.#b.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,o.x,o.y,this.#b.size.width,this.#b.size.height),i.globalAlpha=s})}setContext(t){this.#S=t,this.#S&&(this.#S.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#b.size.width,this.#b.size.height)})}#G(t){for(const e of this.#R)e.afterDraw?.(t)}#V(t,e,i,s,n,a){for(const o of this.#F){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)Os(a,t,e)}o.beforeDraw?.(e)}}#N(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#W(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const 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:u,position:{...d},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;this.#q(y,m),this.#j(v,m),this.#H(v,m),this.#X(v,m),this.#N(y,m),i.resetTransform()}#$(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#H(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())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#j(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=xe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=xe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#A[0]=e,this.#A[1]=i,this.#A}}const Ds=new WeakMap;function _s(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 Es{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Q;#K;#p;#Z;#J;#tt;#et;constructor(t,e){this.#p=t,this.#u=e,this.render=new Is(t,e,this),this.#tt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#tt;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#J=[],this.#Z="none"}get#it(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#st();this.render.destroy(),this.#J=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#et?this.#et:{x:e*n/t,y:i*n/t}}init(){this.#nt(t=>{t.disconnect()}),this.#Q=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#at()}),this.resize(),this.#ot(),this.initBackground(),this.#nt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=we(this.#p,e.color);s.backgroundColor=n?Ce(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#J=[];for(const t of this.#u.plugins)t.resize&&this.#J.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Ds.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 Ds.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#K=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(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}(s.style));const n=this.#tt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#tt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Z=t,this.#at())}setZoom(t,e){this.zoom=t,this.#et=e}stop(){this.#nt(t=>{t.disconnect()}),this.#Q=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#lt(),e&&await t.refresh()}#lt(){for(const t of this.#J)t.resize?.()}#rt(){const t=this.#u.actualOptions.hdr&&Z("(color-gamut: p3)")?.matches&&Z("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ot(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#it?this.#ct():this.#st();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")}}}#at(){const t=this.domElement;if(!t)return;this.#nt(t=>{t.disconnect()}),this.#ot(),this.initBackground();const e=this.#Z;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#nt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#st(){const t=this.domElement,e=this.#K;t&&e&&_s(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&_s(t,function(t){if(ot!==t||!rt){ot=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}rt=e}return rt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ls{#u;#ht;#dt;#ut;constructor(t){this.#u=t,this.#ht={visibilityChange:()=>{this.#pt()},resize:()=>{this.#ft()}}}addListeners(){this.#gt(!0)}removeListeners(){this.#gt(!1)}#pt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ft(){this.#ut&&(clearTimeout(this.#ut),this.#ut=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ut=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#gt(t){const e=this.#ht;this.#mt(t),lt(document,"visibilitychange",e.visibilityChange,t,!1)}#mt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void lt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#dt&&!t?(s&&this.#dt.unobserve(s),this.#dt.disconnect(),this.#dt=void 0):!this.#dt&&t&&s&&(this.#dt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#ft()}),this.#dt.observe(s))}}function Rs(t){if(e=t.outMode,i=t.checkModes,!(e===i||I(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function Fs(t,e){const i=t%e;return i<0?i+e:i}function Ts(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=nt(n.effect.type,t.id,a),t.shape=nt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=nt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=nt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class As{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;#yt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=M.origin;#wt={sin:0,cos:0};#Pt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(dt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#xt(this.bubble.color??ke(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#yt.fillOpacity=i*s*e,this.#yt.opacity=i*e,this.#yt.strokeOpacity=i*n*e,this.#yt}getPosition(){return this.#vt.x=this.position.x+this.offset.x,this.#vt.y=this.position.y+this.offset.y,this.#vt.z=this.position.z,this.#vt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#xt(this.bubble.color??ke(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??r),this.#Pt.b=i?e.sin*(t.b??1):t.b??l,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c,this.#Pt.d=e.cos*(t.d??h),this.#Pt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=St.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Ts(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#bt(e),this.initialVelocity=this.#Mt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#zt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#zt({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=Fs(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=Fs(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Fs(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ct(t,e){let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=H({size:l,position:s}),c=M.create(t.x,t.y,e);this.#St(c,r,o.left??o.default),this.#St(c,r,o.right??o.default),this.#kt(c,r,o.top??o.default),this.#kt(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}}#Mt(){const t=this.options.move,e=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===x.inside||t.direction===x.outside)return e;const i=q(U(t.angle.value)),s=q(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=B(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#St(t,e,i){Rs({outMode:i,checkModes:[bt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#kt(t,e,i){Rs({outMode:i,checkModes:[bt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ot(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===bt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#It(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#zt(t){const e=this.#Ot(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#It(t.direction,t.outMode),l=a?this.#Dt(a(r),"shape"):void 0,c=o?this.#Dt(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}#xt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Mt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#bt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ct(t,A(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...at(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(k(t))return q(t);switch(t){case x.top:return-Math.PI*n;case x.topRight:return-Math.PI*P;case x.right:return 0;case x.bottomRight:return Math.PI*P;case x.bottom:return Math.PI*n;case x.bottomLeft:return.75*Math.PI;case x.left:return Math.PI;case x.topLeft:return.75*-Math.PI;case x.inside:return Math.atan2(i.y-e.y,i.x-e.x);case x.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case x.inside:this.outType=St.inside;break;case x.outside:this.outType=St.outside}this.offset=z.origin}#Dt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Bs{#_t;#Et=new Map;#Lt=[];#Rt;#Ft;#Tt=[];#At;constructor(t){this.#_t=t,this.#Rt=0,this.#At=0}clear(){this.#Et.clear();const t=this.#Ft;t&&(this.#_t=t),this.#Ft=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Bt(e,i);this.#Et.has(s)||this.#Et.set(s,[]),this.#Et.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Ut(t);if(!s)return i;const n=Math.floor(s.minX/this.#_t),a=Math.floor(s.maxX/this.#_t),o=Math.floor(s.minY/this.#_t),r=Math.floor(s.maxY/this.#_t);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Et.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.#Vt(t.x,t.y,e),a=this.query(n,i,s);return this.#Wt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Wt(),a}setCellSize(t){this.#Ft=t}#Vt(t,e,i){return(this.#Lt[this.#Rt++]??=new Dt(t,e,i)).reset(t,e,i)}#Gt(t,e,i,s){return(this.#Tt[this.#At++]??=new _t(t,e,i,s)).reset(t,e,i,s)}#Bt(t,e){return`${Math.floor(t/this.#_t)}_${Math.floor(e/this.#_t)}`}#Ut(t){if(t instanceof Dt){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 _t){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}#Wt(){this.#Rt=0,this.#At=0}}class Us{checkParticlePositionPlugins;grid;#$t;#u;#Nt;#qt;#jt;#Ht;#Xt;#Yt;#p;#Qt;#Kt;#Zt;#Jt;#te;#ee;constructor(t,e){this.#p=t,this.#u=e,this.#jt=0,this.#$t=[],this.#Qt=[],this.#qt=0,this.#Nt=new Map,this.#Ht=new Map,this.#ee=this.#ie(this.#u.zLayers),this.grid=new Bs(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}get count(){return this.#$t.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#Nt.get(i)??this.#qt,o=this.count;if(a>0)switch(n){case xt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case xt.wait:if(o>=a)return}try{const n=this.#Qt.pop()??new As(this.#p,this.#u);n.init(this.#jt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#$t.push(n),this.#se(n),this.#jt++,this.#u.dispatchEvent(dt.particleAdded,{particle:n}),n):void this.#Qt.push(n)}catch(t){gt().warning(`error adding particle: ${t}`)}}clear(){this.#$t=[],this.#Ht.clear(),this.#ne(this.#u.zLayers)}destroy(){this.#$t=[],this.#Qt.length=0,this.#Ht.clear(),this.#ee=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}drawParticles(t){for(let e=this.#ee.length-1;e>=0;e--){const i=this.#ee[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#$t.filter(t)}find(t){return this.#$t.find(t)}get(t){return this.#$t[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#te=[],this.#Yt=[],this.#Zt=[],this.#Xt=[],this.#Kt=[],this.#Ht.clear(),this.#ne(t.zLayers),this.grid=new Bs(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#te.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#Zt.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Kt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#$t.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.#ae(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=ge(this.#p,this.#u,s);this.#oe(n,i,t)}this.#oe(t.particles,i)}setResizeFactor(t){this.#Jt=t}update(t){this.grid.clear();for(const e of this.#te)e.update?.(t);const e=this.#re(t);for(const e of this.#Zt)e.postUpdate?.(t);if(this.#le(t,e),e.size)for(const t of e)this.remove(t);this.#Jt=void 0}#ce(...t){this.#Qt.push(...t)}#oe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#qt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Nt.set(i,s?.number.limit.value??n.limit.value));const a=this.#he(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.#qt=n.limit.value*a:this.#Nt.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)}#ie(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#de(t){const e=this.#ee.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#he(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#se(t){const e=this.#de(t.position.z),i=this.#ee[e];i&&(i.push(t),this.#Ht.set(t.id,e))}#ae(t,e,i){const s=this.#$t[t];return!!s&&(s.group===e&&(this.#$t.splice(t,1),this.#ue(s),s.destroy(i),this.#u.dispatchEvent(dt.particleRemoved,{particle:s}),this.#ce(s),!0))}#ue(t){const e=this.#Ht.get(t.id)??this.#de(t.position.z),i=this.#ee[e];if(!i)return void this.#Ht.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Ht.delete(t.id)}#ne(t){const e=Math.max(Math.floor(t),1);if(this.#ee.length===e)for(const t of this.#ee)t.length=0;else this.#ee=this.#ie(e)}#pe(t){const e=this.#de(t.position.z),i=this.#Ht.get(t.id);if(void 0===i)return void this.#se(t);if(i===e)return;const s=this.#ee[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ee[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Ht.set(t.id,e)}else this.#Ht.set(t.id,e)}#re(t){const e=new Set,i=this.#Jt;for(const s of this.#$t){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.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#le(t,e){for(const i of this.#$t)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Kt)e.postParticleUpdate?.(i,t);this.#pe(i)}}}class Vs{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(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 Ws(t){return!t.destroyed}function Gs(t,e,...i){const s=new me(t,e);return Lt(s,...i),s}var $s=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#fe;#ge;#me={value:0,factor:0};#ye;#ve;#we;#Pe;#xe;#be;#Me;#ze;#Ce;#Se;#ke;#p;#Oe;#Ie;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#ye=e,this.#Ce=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Oe=!1,this.#fe=0,this.#we=0,this.#ze=0,this.#xe=!0,this.started=!1,this.destroyed=!1,this.#ke=!0,this.#Me=0,this.zLayers=100,this.pageHidden=!1,this.#Ie=a,this.#be=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Vs(this),this.canvas=new Es(this.#p,this),this.particles=new Us(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Se=Gs(this.#p,this),this.actualOptions=Gs(this.#p,this),this.#Pe=new Ls(this),this.dispatchEvent(dt.containerBuilt)}get animationStatus(){return!this.#ke&&!this.pageHidden&&Ws(this)}get options(){return this.#Se}get sourceOptions(){return this.#Ie}addLifeTime(t){this.#ze+=t}alive(){return!this.#we||this.#ze<=this.#we}destroy(t=!0){if(Ws(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.#Ce(t),this.dispatchEvent(dt.containerDestroyed)}}dispatchEvent(t,e){this.#ye(t,{container:this,data:e})}draw(t){if(!Ws(this))return;let e=t;this.#ve=L(t=>{e&&(this.#Me=void 0,e=!1),this.#De(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}gt().error(`Export plugin with type ${t} not found`)}async init(){if(!Ws(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Se=Gs(this.#p,this,this.#be,this.sourceOptions),this.actualOptions=Gs(this.#p,this,this.#Se),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.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:e,duration:i,fpsLimit:s,hdr:n,smooth:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#we=U(i)*a,this.#fe=U(e)*a,this.#ze=0,this.fpsLimit=s>0?s:120,this.#Oe=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(dt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(dt.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(){var t;if(Ws(this)&&(void 0!==this.#ve&&(t=this.#ve,R(t),this.#ve=void 0),!this.#ke)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ke=!0),this.dispatchEvent(dt.containerPaused)}}play(t){if(!Ws(this))return;const e=this.#ke||t;if(!this.#xe||this.actualOptions.autoPlay){if(this.#ke&&(this.#ke=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(dt.containerPlay),this.draw(e??!1)}else this.#xe=!1}async refresh(){if(Ws(this))return this.stop(),this.start()}async reset(t){if(Ws(this))return this.#be=t,this.#Ie=t,this.#Se=Gs(this.#p,this,this.#be,this.sourceOptions),this.actualOptions=Gs(this.#p,this,this.#Se),this.refresh()}async start(){Ws(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(dt.containerStarted),this.play(),t()};this.#ge=setTimeout(()=>{e()},this.#fe)}))}stop(){if(Ws(this)&&this.started){this.#ge&&(clearTimeout(this.#ge),this.#ge=void 0),this.#xe=!0,this.started=!1,this.#Pe.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.#Ie=this.#Se,this.dispatchEvent(dt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#De(t){try{if(!this.#Oe&&void 0!==this.#Me&&t<this.#Me+a/this.fpsLimit)return void this.draw(!1);if(this.#Me??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#me,t-this.#Me,this.fpsLimit,this.#Oe),this.addLifeTime(this.#me.value),this.#Me=t,this.#me.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#me),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){gt().error("error in animation loop",t)}}}});var Ns=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#_e;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#_e&&(t.globalCompositeOperation=this.#_e)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#_e=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function qs(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function js(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(l=a,c=n,Math.sqrt(N(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?wt.clockwise:wt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Hs=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-U(e.decay),t.pathDelay=U(s.delay.value)*a,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:U(i.acceleration),inverse:i.inverse},js(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===wt.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),l=r*n;e.spin.radius>l?(e.spin.radius=l,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,h,o):qs(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=$(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Ee()}redrawInit(){return this.#Ee()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ee(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Xs=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Ys=new Map;var Qs=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Ys.set(t,e)}getShapeGenerator(t){return Ys.get(t)}getSupportedShapeGenerators(){return Ys.keys()}}});var Ks,Zs,Js=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Le;#p;constructor(t){this.#Le=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Ai;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return on}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Le.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Le.get(t);return e||(e=[],this.#Le.set(t,e)),e}initContainer(t){this.#Le.has(t)||(this.#Le.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(Ks||(Ks={})),function(t){t.Block="block",t.None="none"}(Zs||(Zs={}));function tn(t){const e=K().createElement("img"),{clickCb:i,container:s,display:n,iconOptions:a,margin:o,options:r,pos:l,rightOffsets:c}=t,{width:h,path:d,style:u,svg:p}=a;!function(t,e,i,s,n,a,o,r){t.style.userSelect="none",t.style.position="absolute",t.style.top=`${(e+o).toString()}px`,t.style.left=`${(i-o-a).toString()}px`,t.style.display=s,t.style.zIndex=(n+1).toString(),t.style.cssText+=r}(e,l.top+o,l.right-(o*(c.length+1)+h+c.reduce((t,e)=>t+e,0)),n,r.fullScreen.zIndex+1,h,o,u),e.src=d??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.domElement?.parentNode??K().body).append(e),e.addEventListener("click",()=>{i()}),e}function en(t){t&&t.remove()}var sn=Object.freeze({__proto__:null,SoundsPluginInstance:class{#Re;#Fe;#u;#n;#Te;#Ae;#Be;#Ue;#Ve;#We;constructor(t,e){this.#u=t,this.#n=e,this.#Ue=0,this.#Fe=[],this.#Re=new Map}async init(){const t=this.#u.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&vs()){const t=()=>{removeEventListener(as,t),removeEventListener(os,t),ws(),this.unmute()},e={capture:!0,once:!0};addEventListener(as,t,e),addEventListener(os,t,e)}this.#Ue=t.volume.value;const e=t.events;this.#Re=new Map;for(const t of e){if(!t.audio)continue;const e=st(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this.#Ge(),n=await s.decodeAudioData(i);this.#Re.set(t.source,n)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this.#u.muted||await this.toggleMute()}async start(){const t=this.#u,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.domElement)return;t.muted=!0;const s=t.canvas.domElement,n={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:a,unmute:o,volumeDown:r,volumeUp:l}=i.icons,c=async()=>{await this.toggleMute()},h=i.icons.enable?Zs.Block:Zs.None;this.#Ae=tn({container:t,options:e,pos:n,display:h,iconOptions:a,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Be=tn({container:t,options:e,pos:n,display:Zs.None,iconOptions:o,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Ve=tn({container:t,options:e,pos:n,display:h,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this.#We=tn({container:t,options:e,pos:n,display:h,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!vs()&&i.autoPlay&&await this.unmute()}stop(){this.#u.muted=!0,(async()=>{await this.#$e(),en(this.#Ae),en(this.#Be),en(this.#Ve),en(this.#We)})()}async toggleMute(){const t=this.#u;t.muted=!t.muted,this.#Ne(),await this.#qe()}async unmute(){this.#u.muted&&await this.toggleMute()}async volumeDown(){const t=this.#u,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this.#Ue=0),this.#Ue-=e.volume.step,await this.#je())}async volumeUp(){const t=this.#u.actualOptions.sounds;t?.enable&&(this.#Ue+=t.volume.step,await this.#je())}#He(t){const e=t.createBufferSource();return this.#Fe.push(e),e}#Xe(t){const e=t.createOscillator();return this.#Fe.push(e),e}#Ge(){const t=this.#u;return t.audioContext??=new AudioContext,t.audioContext}#Ye(){const t=this.#u,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.domElement)for(const t of e.events){const e=i=>{i&&(async()=>{const s=t.filter&&!t.filter(i);if(this.#u!==i.container)return;if(this.#u.muted||this.#u.destroyed)return void st(t.event,t=>{this.#n.removeEventListener(t,e)});if(s)return;if(t.audio){const e=nt(t.audio);if(!e)return;this.#Qe(e)}else if(t.melodies){const e=J(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this.#Ke(t.notes,0,e.loop))):await this.#Ke(e.notes,0,e.loop)}else if(t.notes){const e=J(t.notes);if(!e)return;await this.#Ke([e],0,!1)}})()};st(t.event,t=>{this.#n.addEventListener(t,e)})}}async#$e(){const t=this.#u,e=this.#Ge();for(const t of this.#Fe)this.#Ze(t);this.#Te&&this.#Te.disconnect(),await e.close(),t.audioContext=void 0,this.#u.dispatchEvent(Ks.mute)}#Qe(t){const e=this.#Re.get(t.source);if(!e)return;const i=this.#u.audioContext;if(!i)return;const s=this.#He(i);s.loop=t.loop,s.buffer=e,s.connect(this.#Te??i.destination),s.start()}async#Je(t,e){if(!this.#Te||this.#u.muted)return;const i=this.#Ge(),s=this.#Xe(i);return s.connect(this.#Te),s.type="sine",s.frequency.value=t,s.start(),new Promise(t=>{setTimeout(()=>{this.#Ze(s),t()},e)})}#ti(){if(this.#u.muted)return;const t=this.#Ge(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})}async#Ke(t,e,i){if(this.#u.muted)return;const s=t[e];if(!s)return;const n=st(s.value,async(i,s)=>this.#ei(t,e,s));await(I(n)?Promise.allSettled(n):n);let a=e+1;i&&a>=t.length&&(a%=t.length),await this.#Ke(t,a,i)}async#ei(t,e,i){const s=t[e];if(!s)return;const n=nt(s.value,i,!0);if(n)try{const t=ms(n);if(!k(t))return;await this.#Je(t,s.duration)}catch(t){gt().error(t)}}#Ze(t){t.stop(),t.disconnect();this.#Fe.splice(this.#Fe.indexOf(t),1)}#ii(){const t=this.#u.actualOptions.sounds;if(!t)return;const e=this.#Ge(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/s,this.#Te=i,this.#Ye(),this.#u.dispatchEvent(Ks.unmute)}#Ne(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this.#Ae,s=this.#Be;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")}async#qe(){const t=this.#u,e=this.#Ge();t.muted?(await e.suspend(),await this.#$e()):(await e.resume(),this.#ii(),this.#ti())}async#je(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable)return;A(this.#Ue,e.volume.min,e.volume.max);let i=!1;this.#Ue<=0&&!t.muted?(this.#Ue=0,t.muted=!0,i=!0):this.#Ue>0&&t.muted&&(t.muted=!1,i=!0),i&&(this.#Ne(),await this.#qe()),this.#Te?.gain&&(this.#Te.gain.value=this.#Ue/s)}}});function nn(t,e,i,s){(t.paint??=new oe).fill={color:$t.create(void 0,{value:e}),enable:s,opacity:i}}function an(t,e,i,s){(t.paint??=new oe).stroke={color:$t.create(void 0,{value:e}),opacity:i,width:s}}var on=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#si;#ni;#ai;#we;#oi;#ri;#li;#ci;#hi;#Q;#di;#ke;#p;#ui;#dt;#pi;#fi;#gi;#mi;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#ui=i,this.#si=0,this.#ni=0,this.#ai=0,this.#ci=o,n instanceof Ai?this.options=n:(this.options=new Ai,this.options.load(n)),this.#gi=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#ci??this.#Ct(),this.name=this.options.name,this.fill=this.options.fill,this.#ri=!this.options.life.wait,this.#mi=!1;const r=it({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=xe(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=xe(this.#p,this.options.spawn.stroke.color)),this.#ke=!this.options.autoPlay,this.#di=r,this.#fi=this.#yi(),this.size=this.#fi.mode===Q.percent?{width:this.#fi.width/s*this.#u.canvas.size.width,height:this.#fi.height/s*this.#u.canvas.size.height}:{width:this.#fi.width,height:this.#fi.height},this.#hi=this.options.life.count??-1,this.#li=this.#hi<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#Q=new MutationObserver(()=>{this.resize()}),this.#dt=new ResizeObserver(()=>{this.resize()}),this.#Q.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#dt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#pi=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#ke=!0,this.pause()}externalPlay(){this.#ke=!1,this.play()}async init(){await(this.#pi?.init())}pause(){this.#ke||(this.#oi=void 0)}play(){if(this.#ke)return;if(!(this.#hi>0||this.#li)&&this.options.life.count||!(this.#ri||this.#ai>=(this.#gi??0)))return;const t=this.#u;if(void 0===this.#oi){const e=U(this.options.rate.delay);this.#oi=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#hi>0||this.#li)&&this.#vi()}resize(){const t=this.#ci,e=this.#u;this.position=t&&tt(t,e.canvas.size,z.origin)?t:this.#Ct(),this.#fi=this.#yi(),this.size=this.#fi.mode===Q.percent?{width:this.#fi.width/s*e.canvas.size.width,height:this.#fi.height/s*e.canvas.size.height}:{width:this.#fi.width,height:this.#fi.height},this.#pi?.resize(this.position,this.size)}update(t){if(this.#ke)return;const e=this.#u;this.#ri&&(this.#ri=!1,this.#ai=this.#gi??0,this.#ni=this.#oi??0),this.#mi||(this.#mi=!0,this.#wi(this.options.startCount)),void 0!==this.#we&&(this.#si+=t.value,this.#si>=this.#we&&(this.pause(),void 0!==this.#gi&&(this.#gi=void 0),this.#li||this.#hi--,this.#hi>0||this.#li?(this.position=this.#Ct(),this.#pi?.resize(this.position,this.size),this.#gi=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#Pi(),this.#si-=this.#we,this.#we=void 0)),void 0!==this.#gi&&(this.#ai+=t.value,this.#ai>=this.#gi&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#ai-=this.#gi,this.#gi=void 0)),void 0!==this.#oi&&(this.#ni+=t.value,this.#ni>=this.#oi&&(this.#xi(),this.#ni-=this.#oi))}#Ct(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return j({size:t.canvas.size,position:this.options.position})}#yi(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new Fi;return t.load({height:0,mode:Q.percent,width:0}),t})()}#Pi(){this.#Q?.disconnect(),this.#Q=void 0,this.#dt?.disconnect(),this.#dt=void 0,this.#ui(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#xi(){if(this.#ke)return;const t=U(this.options.rate.quantity);this.#wi(t)}#wi(t){const e=nt(this.#di)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#pi,u=c||h,p=u||d,f=u?{h:y,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?it({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#bi(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#bi(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#bi(i.l,this.spawnFillColor.l,f.l)),nn(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#bi(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#bi(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#bi(a.l,this.spawnStrokeColor.l,f.l)),an(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#pi){const e=this.#pi.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&nn(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#vi(){if(this.#ke)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#hi>0||this.#li)&&void 0!==t&&t>0&&(this.#we=t*a)}#bi(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=B(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadFireworksPreset=Ss,t.tsParticles=Ee}),Object.assign(globalThis.window||globalThis,{loadFireworksPreset:(globalThis.__tsParticlesInternals.presets.fireworks||{}).loadFireworksPreset}),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.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.fireworks=t.__tsParticlesInternals.presets.fireworks||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,w=100,P=.25;var x;function b(t){return"z"in t?t.z:o.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(x||(x={}));class M{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(o.x,o.y,o.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 M.create(t.x,t.y,b(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,b(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+b(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=b(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.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 M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=b(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-b(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=b(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function k(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function D(t){return null==t}const _=Math.PI/180;let E=Math.random;const L=t=>requestAnimationFrame(t),R=t=>{cancelAnimationFrame(t)};function F(){return A(E(),0,1-Number.EPSILON)}function T(t,e){return F()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function B(t){const e=W(t);let i=V(t);return e===i&&(i=0),T(i,e)}function U(t){return k(t)?t:B(t)}function V(t){return k(t)?t:t.min}function W(t){return k(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&k(t))return t;const i=V(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function $(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*_}function j(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??F()*s)*t.size.width/s,y:(t.position?.y??F()*s)*t.size.height/s}}({size:t.size,position:e})}function H(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function tt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(et(t,s??0),e,i,n)}function et(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function it(t,...e){for(const i of e){if(D(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(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 O(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=>it(void 0,t)):it(e[n],a)}}return t}function st(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function nt(t,e,i){return I(t)?J(t,e,i):t}function at(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let ot,rt;function lt(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ct(t,e,i,s=!1){let n=e.get(t);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 ht{#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 dt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(dt||(dt={}));class ut{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(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(dt.configAdded,{data:{name:e,config:t}})}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 ct(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 ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(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}(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 pt=t=>(...e)=>{t(...e)},ft={debug:pt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:pt(console.info),log:pt(console.log),trace:pt(console.trace),verbose:pt(console.log),warning:pt(console.warn)};function gt(){return ft}const mt="100%";class yt{pluginManager=new ut(this);#h=[];#d=new ht;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return $s}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=nt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(gt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=nt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=mt,s.style.height||=mt,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||=mt,s.style.height||=mt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var vt,wt,Pt,xt,bt,Mt,zt,Ct,St,kt,Ot;!function(t){t.circle="circle",t.rectangle="rectangle"}(vt||(vt={}));class It{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 Dt extends It{radius;constructor(t,e,i){super(t,e,vt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,N(e,i)<=s*s;var e,i,s}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 Dt||t.type===vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof _t||t.type===vt.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 _t extends It{size;constructor(t,e,i,s){super(t,e,vt.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 Dt)return t.intersects(this);if(!(t instanceof _t))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}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(wt||(wt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Pt||(Pt={})),function(t){t.delete="delete",t.wait="wait"}(xt||(xt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(bt||(bt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Mt||(Mt={})),function(t){t.none="none",t.max="max",t.min="min"}(zt||(zt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ct||(Ct={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(St||(St={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Ot||(Ot={}));class Et{load(t){D(t)||this.doLoad(t)}}function Lt(t,...e){for(const i of e)t.load(i)}function Rt(t,e,i){void 0!==i&&(t[e]=i)}function Ft(t,e,i){void 0!==i&&(t[e]=G(i))}function Tt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Bt extends Et{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ft(this,"count",t.count),Rt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Ft(this,"delay",t.delay),Rt(this,"sync",t.sync)}}class Ut extends Bt{mode=Pt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Rt(this,"mode",t.mode),Rt(this,"startValue",t.startValue)}}class Vt extends Bt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Rt(this,"max",t.max),Rt(this,"min",t.min),Ft(this,"offset",t.offset)}}class Wt extends Et{h=new Vt(0,y);l=new Vt(0,w);s=new Vt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Gt extends Et{value="";static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){D(t.value)||(this.value=t.value)}}class $t extends Gt{animation=new Wt;static create(t,e){const i=new $t;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Nt extends Et{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Gt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Rt(this,"image",t.image),Rt(this,"position",t.position),Rt(this,"repeat",t.repeat),Rt(this,"size",t.size),Rt(this,"opacity",t.opacity)}}class qt extends Et{enable=!0;zIndex=0;doLoad(t){Rt(this,"enable",t.enable),Rt(this,"zIndex",t.zIndex)}}class jt extends Et{delay=.5;enable=!0;doLoad(t){Rt(this,"delay",t.delay),Rt(this,"enable",t.enable)}}class Ht extends Et{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Rt(this,"close",t.close),Rt(this,"type",t.type)}}class Xt extends Et{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=$t.create(this.color,t.color)),Rt(this,"enable",t.enable),Ft(this,"opacity",t.opacity)}}class Yt extends Et{offset=0;value=90;doLoad(t){Ft(this,"offset",t.offset),Ft(this,"value",t.value)}}class Qt extends Et{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Rt(this,"x",t.x),Rt(this,"y",t.y),Rt(this,"mode",t.mode),Rt(this,"radius",t.radius)}}class Kt extends Et{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ft(this,"acceleration",t.acceleration),Rt(this,"enable",t.enable),Rt(this,"inverse",t.inverse),Ft(this,"maxSpeed",t.maxSpeed)}}class Zt extends Et{value=0;doLoad(t){D(t.value)||(this.value=G(t.value))}}class Jt extends Zt{animation=new Bt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class te extends Jt{animation=new Ut}class ee extends Et{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Rt(this,"clamp",t.clamp),this.delay.load(t.delay),Rt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=it(this.options,t.options))}}class ie extends Et{bottom;default=bt.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class se extends Et{acceleration=0;enable=!1;position;doLoad(t){Ft(this,"acceleration",t.acceleration),Rt(this,"enable",t.enable),t.position&&(this.position=it({},t.position))}}class ne extends Et{angle=new Yt;center=new Qt;decay=0;direction=x.none;distance={};drift=0;enable=!1;gravity=new Kt;outModes=new ie;path=new ee;random=!1;size=!1;speed=2;spin=new se;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ft(this,"decay",t.decay),Rt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ft(this,"drift",t.drift),Rt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Rt(this,"random",t.random),Rt(this,"size",t.size),Ft(this,"speed",t.speed),this.spin.load(t.spin),Rt(this,"straight",t.straight),Rt(this,"vibrate",t.vibrate),Rt(this,"warp",t.warp)}}class ae extends Et{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=$t.create(this.color,t.color)),Ft(this,"width",t.width),Ft(this,"opacity",t.opacity)}}class oe extends Et{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=$t.create(this.color,t.color)),Tt(this,"fill",t.fill,()=>new Xt),Tt(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Et{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Et{enable=!1;height=1080;width=1920;doLoad(t){Rt(this,"enable",t.enable),Rt(this,"width",t.width),Rt(this,"height",t.height)}}class he extends Et{mode=xt.delete;value=0;doLoad(t){Rt(this,"mode",t.mode),Rt(this,"value",t.value)}}class de extends Et{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Rt(this,"value",t.value)}}class ue extends Et{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Rt(this,"close",t.close),Rt(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Rt(this,"opacityRate",t.opacityRate),Rt(this,"sizeRate",t.sizeRate),Rt(this,"velocityRate",t.velocityRate)}}class fe extends Et{bounce=new le;effect=new Ht;groups={};move=new ne;number=new de;paint;palette;reduceDuplicates=!1;shape=new ue;zIndex=new pe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new oe,this.paint.color=new $t,this.paint.color.value="#fff",this.paint.fill=new Xt,this.paint.fill.enable=!0}doLoad(t){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]=it(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=st(e,t=>{const e=new oe;return e.load(t),e}):I(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function ge(t,e,...i){const s=new fe(t,e);return Lt(s,...i),s}class me extends Et{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new Nt,this.fullScreen=new qt,this.particles=ge(this.#p,this.#u),this.resize=new jt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,st(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Rt(this,"autoPlay",t.autoPlay),Rt(this,"clear",t.clear),Rt(this,"key",t.key),Rt(this,"name",t.name),Ft(this,"delay",t.delay),Rt(this,"detectRetina",t.detectRetina),Ft(this,"duration",t.duration),Rt(this,"fpsLimit",t.fpsLimit),Rt(this,"hdr",t.hdr),Rt(this,"pauseOnBlur",t.pauseOnBlur),Rt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Rt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=it(this.style,t.style),Rt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,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))}}const ye=new Map;function ve(t,e){let i=ye.get(t);return i||(i=e(),ye.size>2e3&&ye.clear(),ye.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Pe(t,n.value,i,s);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return we(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Pe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(T(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function xe(t,e,i,s=!0){const n=we(t,e,i,s);return n?be(n):void 0}function be(t){const e=t.r/m,i=t.g/m,s=t.b/m,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};return a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o)),r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function Me(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ze(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(m,m*Me(c,l,a+h)),u=Math.min(m,m*Me(c,l,a)),p=Math.min(m,m*Me(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Ce(t,e,i){const s=i??1;return ve(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Se(t,e,i){const s=i??1;return ve(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ce(ze(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function ke(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Oe(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:w}};return e&&(Ie(s.h,e.h,i),Ie(s.s,e.s,i),Ie(s.l,e.l,i)),s}function Ie(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=Ot.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function De(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?B(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==Ot.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=Ot.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Ot.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=A(t.value,r,o)}function _e(t,e){if(!t)return;const{h:i,s:s,l:n}=t;De(i,!1,e),De(s,!0,e),De(n,!0,e)}const Ee=new yt;function Le(){const t=(t,e,i)=>{const s=t.max>i?t.max-i:0;let n=G(t);s&&(n=G(t.min-s,i));const a=t.min<e?t.min:0;return a&&(n=G(0,t.max+a)),n},e=["#FF0000","#FF8000","#FFFF00","#00FF00","#00FFFF","#0000FF","#FF00FF"].map(e=>{const i=(t=>{let e=t;const i=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;i.test(e)&&(e=e.replace(i,(t,e,i,s,n)=>e+e+i+i+s+s+(n?n+n:"")));const s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);if(!s)return;s.shift();const n=2,a=1,o=0,r={a:s[3],b:s[n],g:s[a],r:s[o]};return{r:r.r?Number.parseInt(r.r,16):0,g:r.g?Number.parseInt(r.g,16):0,b:r.b?Number.parseInt(r.b,16):0,a:r.a?Number.parseInt(r.a,16):1}})(e);if(!i)return;const s=be(i),n=0,a=100,o=0,r=100,l=t({min:s.s-30,max:s.s+30},n,a),c=t({min:s.l-30,max:s.l+30},o,r);return{paint:{fill:{color:{value:{h:s.h,s:l,l:c}},enable:!0},stroke:{width:0}},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:.7,sync:!1,startValue:kt.max,destroy:zt.min}},shape:{type:"circle"},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:kt.min,destroy:zt.none}},life:{count:1,duration:{value:{min:1,max:2}}},move:{decay:{min:.075,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:5},speed:{min:5,max:15},direction:x.none,outModes:bt.destroy}}}).filter(t=>void 0!==t);return{detectRetina:!0,background:{color:"#000"},fpsLimit:120,emitters:{direction:x.top,rate:{delay:.3,quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},destroy:{mode:"split",bounds:{top:{min:15,max:35}},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:{min:75,max:150}},particles:e}},life:{count:1},shape:{type:"circle"},effect:{type:"trail",options:{trail:{length:{min:5,max:15},minWidth:1,maxWidth:1}}},size:{value:1},paint:{stroke:{color:{value:"#ffffff"},width:1},fill:{enable:!1}},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:bt.destroy,top:bt.none}}},sounds:{enable:!0,events:[{event:dt.particleRemoved,filter:t=>t.data.particle.options.move.gravity.inverse,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}}}class Re{enable=!1;mode="destination-out";load(t){D(t)||(Rt(this,"mode",t.mode),Rt(this,"enable",t.enable))}}class Fe{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Ns});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Re),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Re,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Te(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Fe)})}class Ae{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=O(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Be(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Ae))})}var Ue;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ue||(Ue={}));const Ve=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,We=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ge{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ve,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=We.exec(e);return i?{a:i[Ue.a]?Number.parseInt(i[Ue.a],16)/255:1,b:Number.parseInt(i[Ue.b]??"0",16),g:Number.parseInt(i[Ue.g]??"0",16),r:Number.parseInt(i[Ue.r]??"0",16)}:void 0}}async function $e(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ge)})}var Ne;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ne||(Ne={}));const qe=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class je{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=qe.exec(t);return e?function(t){const e=ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[Ne.a]):1,h:Number.parseInt(e[Ne.h]??"0",10),l:Number.parseInt(e[Ne.l]??"0",10),s:Number.parseInt(e[Ne.s]??"0",10)}):void 0}}async function He(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new je)})}class Xe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Hs});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ye(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Xe(t.pluginManager))})}function Qe(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:W(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Pt.increase:o.status=Ot.increasing;break;case Pt.decrease:o.status=Ot.decreasing;break;case Pt.random:o.status=F()>=n?Ot.increasing:Ot.decreasing}const t=s.mode===Pt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=Ot.increasing);break;case kt.max:o.value=o.max,t&&(o.status=Ot.decreasing);break;case kt.random:default:o.value=B(o),t&&(o.status=F()>=n?Ot.increasing:Ot.decreasing)}}return o.initialValue=o.value,o}function Ke(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case Ot.increasing:e.value+=a;break;case Ot.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Ot.increasing:e.value>=r&&(i?e.status=Ot.decreasing:e.value-=r,e.loops??=0,e.loops++);break;case Ot.decreasing:e.value<=o&&(i?e.status=Ot.increasing:e.value+=r,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case zt.max:i>=n&&t.destroy();break;case zt.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class Ze extends Ut{destroy=zt.none;load(t){super.load(t),D(t)||Rt(this,"destroy",t.destroy)}}class Je extends te{animation=new Ze;value=1;load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ti{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Qe(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){At(t,"opacity",Je,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ke(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function ei(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ti(t)))})}class ii{modes;#u;#y;constructor(t){this.#u=t,this.modes=[bt.bounce,bt.split],this.#y=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#y)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=et(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==bt.bounce&&t.outMode!==bt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===bt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==bt.bounce&&t.outMode!==bt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===bt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class si{modes;constructor(t){this.modes=[bt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case St.normal:case St.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case St.inside:{const{dx:e,dy:i}=$(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class ni{modes;#u;constructor(t){this.#u=t,this.modes=[bt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;tt(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const ai=z.origin;class oi{modes;#u;constructor(t){this.#u=t,this.modes=[bt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case St.inside:{const{x:e,y:i}=t.velocity;ai.setTo(o),ai.length=t.moveCenter.radius,ai.angle=t.velocity.angle+Math.PI,ai.addTo(t.moveCenter);const{dx:s,dy:a}=$(t.position,ai);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(B({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(B({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=$(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case St.outside:{t.position.x=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=$(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case St.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=et(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ri{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,bt.bounce,t=>new ii(t)),this.#v(t,bt.out,t=>new oi(t)),this.#v(t,bt.destroy,t=>new si(t)),this.#v(t,bt.none,t=>new ni(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ri(t)))})}class ci{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=nt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=$t.create(void 0===a?void 0:$t.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=xe(this.#p,i);s&&(t.fillColor=Oe(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=$t.create(void 0===a?void 0:$t.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=xe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Oe(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(_e(t.fillColor,e),_e(t.strokeColor,e))}}async function hi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ci(t.pluginManager,e)))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(di||(di={}));const ui=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class pi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=ui.exec(t);return e?{a:e.length>4?X(e[di.a]):1,b:parseInt(e[di.b]??"0",10),g:parseInt(e[di.g]??"0",10),r:parseInt(e[di.r]??"0",10)}:void 0}}async function fi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new pi)})}class gi extends Ut{destroy=zt.none;load(t){super.load(t),D(t)||Rt(this,"destroy",t.destroy)}}class mi extends te{animation=new gi;value=3;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class yi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){At(t,"size",mi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Qe(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ke(t,t.size,!0,t.options.size.animation.destroy,e)}}async function vi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new yi(t)))})}async function wi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Te(t),$e(t),He(t),fi(t),Ye(t),Be(t),hi(t),ei(t),li(t),vi(t)])})}class Pi{bottom;left;right;top;load(t){D(t)||(Ft(this,"bottom",t.bottom),Ft(this,"left",t.left),Ft(this,"right",t.right),Ft(this,"top",t.top))}}var xi;!function(t){t.explode="explode",t.none="none",t.split="split"}(xi||(xi={}));class bi{maxSizeFactor=3;speed=2;load(t){D(t)||(Rt(this,"maxSizeFactor",t.maxSizeFactor),Rt(this,"speed",t.speed))}}class Mi extends Zt{value=3}class zi extends Zt{value={min:4,max:9}}class Ci{count=1;factor=new Mi;fillColor;fillColorOffset;particles;rate=new zi;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){D(t)||(void 0!==t.fillColor&&(this.fillColor=Gt.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=Gt.create(this.strokeColor,t.strokeColor)),Rt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=st(t.particles,t=>it({},t)),Rt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class Si{bounds=new Pi;explode=new bi;mode=xi.none;split=new Ci;load(t){D(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function ki(t,e,i,s){return t&&s?function(t,e){const i=U(e.h??0),s=U(e.s??0),n=U(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return $t.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?$t.create(void 0,e):i?$t.create(void 0,i):s?function(t){return $t.create(void 0,{value:{hsl:t}})}(s):void 0}function Oi(t,e,i,s){const n=i.options.destroy;if(!n)return;const a=n.split,o=ge(t,e,i.options),r=nt(a.fillColor),l=nt(a.strokeColor),c=i.getFillColor(),h=i.getStrokeColor();o.move.load({center:{x:i.position.x,y:i.position.y,mode:Q.precise}});const d=1/U(a.factor.value),u=o.size;u&&(k(u.value)?u.value*=d:(u.value.min*=d,u.value.max*=d)),o.load(s);const p=nt(o.paint),f=p?.fill,g=p?.stroke,m=ki(a.fillColorOffset,r,f?.color,c),y=ki(a.strokeColorOffset,l,g?.color,h);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?G(-i.size.value,i.size.value):0,w={x:i.position.x+B(v),y:i.position.y+B(v)};return e.particles.addParticle(w,o,i.group,t=>!(t.size.value<.5)&&(t.velocity.length=B(G(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Ii{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:a,left:o,right:r,top:l}=n,{destroyBounds:c}=t,h=e.canvas.size;a&&(c.bottom=U(a)*h.height/s),o&&(c.left=U(o)*h.width/s),r&&(c.right=U(r)*h.width/s),l&&(c.top=U(l)*h.height/s)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){At(t,"destroy",Si,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case xi.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=U(n.rate.value),o=nt(n.particles);for(let s=0;s<a;s++)Oi(t,e,i,o)}(this.#p,this.#u,t);break;case xi.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Di(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Ii(t.pluginManager,e)))})}class _i{count;delay;duration;wait=!1;load(t){D(t)||(Rt(this,"count",t.count),Ft(this,"delay",t.delay),Ft(this,"duration",t.duration),Rt(this,"wait",t.wait))}}class Ei{delay=.1;quantity=1;load(t){D(t)||(Ft(this,"quantity",t.quantity),Ft(this,"delay",t.delay))}}class Li{color=!1;opacity=!1;load(t){D(t)||(Rt(this,"color",t.color),Rt(this,"opacity",t.opacity))}}class Ri{options={};replace=new Li;type="square";load(t){D(t)||(void 0!==t.options&&(this.options=it({},t.options??{})),this.replace.load(t.replace),Rt(this,"type",t.type))}}class Fi{height=0;mode=Q.percent;width=0;load(t){D(t)||(Rt(this,"mode",t.mode),Rt(this,"height",t.height),Rt(this,"width",t.width))}}class Ti{fill;stroke;load(t){D(t)||(t.fill&&(this.fill??=new Xt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class Ai{autoPlay=!0;direction;domId;fill=!0;life=new _i;name;particles;position;rate=new Ei;shape=new Ri;size;spawn=new Ti;spawnFillColor;spawnStrokeColor;startCount=0;load(t){D(t)||(Rt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Fi,this.size.load(t.size)),Rt(this,"direction",t.direction),Rt(this,"domId",t.domId),Rt(this,"fill",t.fill),this.life.load(t.life),Rt(this,"name",t.name),this.particles=st(t.particles,t=>it({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new $t,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new $t,this.spawnStrokeColor.load(t.spawnStrokeColor)),Rt(this,"startCount",t.startCount))}}class Bi{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Xs});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=st(i.emitters,t=>{const e=new Ai;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const Ui=new WeakMap;class Vi{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var Wi;async function Gi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ui.get(e);return i||(i=Promise.resolve().then(function(){return Js}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ui.delete(e),t}),Ui.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Qs}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Bi(e))})}!function(t){t.emitter="emitter"}(Wi||(Wi={}));var $i;function Ni(t,e){return t+e*(F()-n)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}($i||($i={}));class qi extends Vi{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Ni(e.x,i.width),y:Ni(e.y,i.height)}};{const t=i.width*n,s=i.height*n,a=function(t){return Math.floor(F()*t)}(4),o=2*(F()-n);switch(a){case $i.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case $i.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case $i.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case $i.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class ji{generate(t,e,i,s,n){return new qi(e,i,s,n)}}async function Hi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new ji)})}class Xi extends Zt{sync=!1;load(t){D(t)||(super.load(t),Rt(this,"sync",t.sync))}}class Yi extends Zt{sync=!1;load(t){D(t)||(super.load(t),Rt(this,"sync",t.sync))}}class Qi{count=0;delay=new Xi;duration=new Yi;load(t){D(t)||(Rt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ki{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?U(i.delay.value)*s/e.retina.reduceFactor*a:0,delayTime:0,duration:e.retina.reduceFactor?U(i.duration.value)*n/e.retina.reduceFactor*a:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){At(t,"life",Qi,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=G(0,i.width),r=G(0,i.width);t.position.x=B(o),t.position.y=B(r),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=U(l.delay.value)*a,s.duration=U(l.duration.value)*a)}(t,e,this.#u.canvas.size)}}async function Zi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ki(t)))})}class Ji{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ts(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Ji))})}class es{decay=0;enable=!1;speed=0;sync=!1;load(t){D(t)||(Rt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Rt(this,"sync",t.sync))}}class is extends Zt{animation=new es;direction=wt.clockwise;path=!1;load(t){D(t)||(super.load(t),Rt(this,"direction",t.direction),this.animation.load(t.animation),Rt(this,"path",t.path))}}class ss{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:q(U(e.value)),min:0,max:u},t.pathRotation=e.path;let i=e.direction;if(i===wt.random){i=Math.floor(2*F())>0?wt.counterClockwise:wt.clockwise}switch(i){case wt.counterClockwise:case"counterClockwise":t.rotate.status=Ot.decreasing;break;case wt.clockwise:t.rotate.status=Ot.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-U(s.decay),t.rotate.velocity=U(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=F())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){At(t,"rotate",is,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Ke(t,t.rotate,!1,zt.none,e),t.rotation=t.rotate.value))}}async function ns(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new ss(t)))})}const as="pointerdown",os="touchstart";class rs{loop=!1;source="";load(t){D(t)||(O(t)?(Rt(this,"loop",t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class ls{duration=500;value=[];load(t){D(t)||(Rt(this,"duration",t.duration),Rt(this,"value",t.value))}}class cs{loop=!1;melodies=[];notes=[];load(t){D(t)||(Rt(this,"loop",t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new cs;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new ls;return e.load(t),e})))}}class hs{audio;event=[];filter;melodies;notes=[];load(t){if(!D(t)&&(Rt(this,"event",t.event),void 0!==t.audio&&(I(t.audio)?this.audio=t.audio.map(t=>{const e=new rs;return e.load(t),e}):(this.audio=new rs,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new ls;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new cs;return e.load(t),e})),t.filter))if(S(t.filter)){const e=globalThis[t.filter];"function"==typeof e&&(this.filter=e)}else this.filter=t.filter}}class ds{height=24;path;style="";svg;width=24;load(t){D(t)||(Rt(this,"path",t.path),Rt(this,"svg",t.svg),Rt(this,"width",t.width),Rt(this,"height",t.height))}}class us{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new ds,this.unmute=new ds,this.volumeDown=new ds,this.volumeUp=new ds,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){D(t)||(Rt(this,"enable",t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class ps{max=100;min=0;step=10;value=100;load(t){D(t)||(O(t)?(Rt(this,"max",t.max),Rt(this,"min",t.min),Rt(this,"step",t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class fs{autoPlay=!0;enable=!1;events=[];icons=new us;volume=new ps;load(t){D(t)||(Rt(this,"autoPlay",t.autoPlay),Rt(this,"enable",t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new hs;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const gs=new Map;function ms(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],s=gs.get(i);return s?s[parseInt(e[3]??"0")]:void 0}gs.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),gs.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),gs.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),gs.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),gs.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),gs.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),gs.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),gs.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),gs.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),gs.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),gs.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),gs.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),gs.set("pause",[0]);let ys=!0;const vs=()=>ys,ws=()=>{ys=!1},Ps=()=>{removeEventListener(as,Ps),removeEventListener(os,Ps),ws()};class xs{id="sounds";#n;constructor(t){this.#n=t;const e={capture:!0,once:!0};addEventListener(as,Ps,e),addEventListener(os,Ps,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return sn});return new e(t,this.#n)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.sounds;void 0===s?.load&&(e.sounds=s=new fs),s.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function bs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new xs(t))})}const Ms={a:1,b:0,c:0,d:1};class zs{#u;constructor(t){this.#u=t}drawAfter(t){const{context:e,drawPosition:i,drawRadius:s,drawScale:a,particle:r,transformData:l}=t,c=2*s,h=this.#u.retina.pixelRatio,d=r.trail;if(!d||!r.trailLength)return;const u=i,p=r.trailLength*a+s;if(d.push({break:r.justWarped,color:e.fillStyle||e.strokeStyle,position:{x:u.x,y:u.y},transformData:l}),d.length<3)return;const f=Math.floor(p);d.length>f&&d.splice(0,d.length-f);const g=Math.min(d.length,p);e.save(),e.lineCap="butt",e.lineJoin="round";for(let t=g-2;t>0;t--){const i=d[t+1],s=d[t],l=d[t-1];if(!i||!s||!l)continue;const u=i.position,p=s.position,f=l.position,m=r.trailTransform?s.transformData??Ms:Ms;if(s.break||i.break||l.break)continue;e.setTransform(m.a,m.b,m.c,m.d,p.x,p.y);const y=(u.x+p.x)*n-p.x,v=(u.y+p.y)*n-p.y,w=(p.x+f.x)*n-p.x,P=(p.y+f.y)*n-p.y;e.beginPath(),e.moveTo(y,v),e.quadraticCurveTo(o.x,o.y,w,P);const x=Math.max(t/g*c,h,(r.trailMinWidth??-1)*a),b=e.globalAlpha;e.globalAlpha=r.trailFade?t/g:1,e.lineWidth=r.trailMaxWidth?Math.min(x,r.trailMaxWidth*a):x,e.strokeStyle=s.color,e.stroke(),e.globalAlpha=b}e.restore()}isInsideCanvas(t){const{canvasSize:e,direction:i,outMode:s,particle:n,radius:a}=t,o=n.position,r=n.trail;let l=o.x-a,c=o.x+a,h=o.y-a,d=o.y+a;if(r?.length){const t=Math.max(a,n.trailMaxWidth??0,n.trailMinWidth??0);for(const e of r)l=Math.min(l,e.position.x-t),c=Math.max(c,e.position.x+t),h=Math.min(h,e.position.y-t),d=Math.max(d,e.position.y+t)}const u=s===bt.destroy;return i===Y.bottom?h<=e.height:i===Y.left?c>=0:i===Y.right?l<=e.width:i===Y.top?d>=0:u?c>=0&&d>=0&&l<=e.width&&h<=e.height:o.x+a>=0&&o.y+a>=0&&o.x-a<=e.width&&o.y-a<=e.height}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=U(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?U(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?U(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}async function Cs(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("trail",t=>Promise.resolve(new zs(t)))})}async function Ss(t){await t.pluginManager.register(async t=>{await Promise.all([wi(t),(async t=>{await Gi(t),await Hi(t)})(t),Cs(t),bs(t),ts(t),ns(t),Di(t),Zi(t)]),t.pluginManager.addPreset("fireworks",Le(),!1)})}const ks=globalThis;ks.loadFireworksPreset=Ss,ks.tsParticles=Ee;function Os(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Is{#x;#b;#M;#z;#C;#u;#S;#k;#O;#I;#D;#_;#E;#L;#p;#R;#F;#T={};#A=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#b=i,this.#S=null,this.#F=[],this.#R=[],this.#C=[],this.#x=[],this.#M=[],this.#z=[],this.#O=[],this.#I=[],this.#D=[],this.#_=[],this.#L=[],this.#E=[]}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#b.size.width,this.#b.size.height)})}clear(){let t=!1;for(const e of this.#x)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#F=[],this.#R=[],this.#C=[],this.#x=[],this.#M=[],this.#z=[],this.#O=[],this.#I=[],this.#D=[],this.#_=[],this.#L=[],this.#E=[]}draw(t){const e=this.#S;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.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#T,g=a?Se(a,r.hdr,h*d):void 0,m=o?Se(o,r.hdr,u*d):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.#D)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,d,f,p),this.#W({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#$(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#L)e.drawSettingsSetup?.(i,t);for(const e of this.#_)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#z)e.clearDraw?.(i,t);for(const e of this.#E)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#C=[],this.#x=[],this.#M=[],this.#z=[],this.#O=[],this.#D=[],this.#I=[],this.#_=[],this.#L=[],this.#E=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.canvasClear&&this.#x.push(t),t.canvasPaint&&this.#M.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#D.push(t),t.drawParticleCleanup&&this.#I.push(t),t.draw&&this.#_.push(t),t.drawSettingsSetup&&this.#L.push(t),t.drawSettingsCleanup&&this.#E.push(t),t.clearDraw&&this.#z.push(t)}initUpdaters(){this.#F=[],this.#R=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#R.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#F.push(t)}paint(){let t=!1;for(const e of this.#M)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(o.x,o.y,this.#b.size.width,this.#b.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,o.x,o.y,this.#b.size.width,this.#b.size.height),i.globalAlpha=s})}setContext(t){this.#S=t,this.#S&&(this.#S.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#b.size.width,this.#b.size.height)})}#G(t){for(const e of this.#R)e.afterDraw?.(t)}#V(t,e,i,s,n,a){for(const o of this.#F){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)Os(a,t,e)}o.beforeDraw?.(e)}}#N(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#W(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const 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:u,position:{...d},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;this.#q(y,m),this.#j(v,m),this.#H(v,m),this.#X(v,m),this.#N(y,m),i.resetTransform()}#$(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#H(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())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#j(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=xe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=xe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#A[0]=e,this.#A[1]=i,this.#A}}const Ds=new WeakMap;function _s(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 Es{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Q;#K;#p;#Z;#J;#tt;#et;constructor(t,e){this.#p=t,this.#u=e,this.render=new Is(t,e,this),this.#tt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#tt;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#J=[],this.#Z="none"}get#it(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#st();this.render.destroy(),this.#J=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#et?this.#et:{x:e*n/t,y:i*n/t}}init(){this.#nt(t=>{t.disconnect()}),this.#Q=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#at()}),this.resize(),this.#ot(),this.initBackground(),this.#nt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=we(this.#p,e.color);s.backgroundColor=n?Ce(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#J=[];for(const t of this.#u.plugins)t.resize&&this.#J.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Ds.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 Ds.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#K=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(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}(s.style));const n=this.#tt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#tt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Z=t,this.#at())}setZoom(t,e){this.zoom=t,this.#et=e}stop(){this.#nt(t=>{t.disconnect()}),this.#Q=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#lt(),e&&await t.refresh()}#lt(){for(const t of this.#J)t.resize?.()}#rt(){const t=this.#u.actualOptions.hdr&&Z("(color-gamut: p3)")?.matches&&Z("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ot(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#it?this.#ct():this.#st();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")}}}#at(){const t=this.domElement;if(!t)return;this.#nt(t=>{t.disconnect()}),this.#ot(),this.initBackground();const e=this.#Z;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#nt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#st(){const t=this.domElement,e=this.#K;t&&e&&_s(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&_s(t,function(t){if(ot!==t||!rt){ot=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}rt=e}return rt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ls{#u;#ht;#dt;#ut;constructor(t){this.#u=t,this.#ht={visibilityChange:()=>{this.#pt()},resize:()=>{this.#ft()}}}addListeners(){this.#gt(!0)}removeListeners(){this.#gt(!1)}#pt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ft(){this.#ut&&(clearTimeout(this.#ut),this.#ut=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ut=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#gt(t){const e=this.#ht;this.#mt(t),lt(document,"visibilitychange",e.visibilityChange,t,!1)}#mt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void lt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#dt&&!t?(s&&this.#dt.unobserve(s),this.#dt.disconnect(),this.#dt=void 0):!this.#dt&&t&&s&&(this.#dt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#ft()}),this.#dt.observe(s))}}function Rs(t){if(e=t.outMode,i=t.checkModes,!(e===i||I(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function Fs(t,e){const i=t%e;return i<0?i+e:i}function Ts(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=nt(n.effect.type,t.id,a),t.shape=nt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=nt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=nt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class As{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;#yt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=M.origin;#wt={sin:0,cos:0};#Pt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(dt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#xt(this.bubble.color??ke(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#yt.fillOpacity=i*s*e,this.#yt.opacity=i*e,this.#yt.strokeOpacity=i*n*e,this.#yt}getPosition(){return this.#vt.x=this.position.x+this.offset.x,this.#vt.y=this.position.y+this.offset.y,this.#vt.z=this.position.z,this.#vt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#xt(this.bubble.color??ke(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??r),this.#Pt.b=i?e.sin*(t.b??1):t.b??l,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c,this.#Pt.d=e.cos*(t.d??h),this.#Pt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=St.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Ts(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#bt(e),this.initialVelocity=this.#Mt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#zt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#zt({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=Fs(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=Fs(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Fs(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ct(t,e){let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=H({size:l,position:s}),c=M.create(t.x,t.y,e);this.#St(c,r,o.left??o.default),this.#St(c,r,o.right??o.default),this.#kt(c,r,o.top??o.default),this.#kt(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}}#Mt(){const t=this.options.move,e=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===x.inside||t.direction===x.outside)return e;const i=q(U(t.angle.value)),s=q(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=B(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#St(t,e,i){Rs({outMode:i,checkModes:[bt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#kt(t,e,i){Rs({outMode:i,checkModes:[bt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ot(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===bt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#It(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#zt(t){const e=this.#Ot(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#It(t.direction,t.outMode),l=a?this.#Dt(a(r),"shape"):void 0,c=o?this.#Dt(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}#xt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Mt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#bt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ct(t,A(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...at(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(k(t))return q(t);switch(t){case x.top:return-Math.PI*n;case x.topRight:return-Math.PI*P;case x.right:return 0;case x.bottomRight:return Math.PI*P;case x.bottom:return Math.PI*n;case x.bottomLeft:return.75*Math.PI;case x.left:return Math.PI;case x.topLeft:return.75*-Math.PI;case x.inside:return Math.atan2(i.y-e.y,i.x-e.x);case x.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case x.inside:this.outType=St.inside;break;case x.outside:this.outType=St.outside}this.offset=z.origin}#Dt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Bs{#_t;#Et=new Map;#Lt=[];#Rt;#Ft;#Tt=[];#At;constructor(t){this.#_t=t,this.#Rt=0,this.#At=0}clear(){this.#Et.clear();const t=this.#Ft;t&&(this.#_t=t),this.#Ft=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Bt(e,i);this.#Et.has(s)||this.#Et.set(s,[]),this.#Et.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Ut(t);if(!s)return i;const n=Math.floor(s.minX/this.#_t),a=Math.floor(s.maxX/this.#_t),o=Math.floor(s.minY/this.#_t),r=Math.floor(s.maxY/this.#_t);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Et.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.#Vt(t.x,t.y,e),a=this.query(n,i,s);return this.#Wt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Wt(),a}setCellSize(t){this.#Ft=t}#Vt(t,e,i){return(this.#Lt[this.#Rt++]??=new Dt(t,e,i)).reset(t,e,i)}#Gt(t,e,i,s){return(this.#Tt[this.#At++]??=new _t(t,e,i,s)).reset(t,e,i,s)}#Bt(t,e){return`${Math.floor(t/this.#_t)}_${Math.floor(e/this.#_t)}`}#Ut(t){if(t instanceof Dt){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 _t){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}#Wt(){this.#Rt=0,this.#At=0}}class Us{checkParticlePositionPlugins;grid;#$t;#u;#Nt;#qt;#jt;#Ht;#Xt;#Yt;#p;#Qt;#Kt;#Zt;#Jt;#te;#ee;constructor(t,e){this.#p=t,this.#u=e,this.#jt=0,this.#$t=[],this.#Qt=[],this.#qt=0,this.#Nt=new Map,this.#Ht=new Map,this.#ee=this.#ie(this.#u.zLayers),this.grid=new Bs(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}get count(){return this.#$t.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#Nt.get(i)??this.#qt,o=this.count;if(a>0)switch(n){case xt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case xt.wait:if(o>=a)return}try{const n=this.#Qt.pop()??new As(this.#p,this.#u);n.init(this.#jt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#$t.push(n),this.#se(n),this.#jt++,this.#u.dispatchEvent(dt.particleAdded,{particle:n}),n):void this.#Qt.push(n)}catch(t){gt().warning(`error adding particle: ${t}`)}}clear(){this.#$t=[],this.#Ht.clear(),this.#ne(this.#u.zLayers)}destroy(){this.#$t=[],this.#Qt.length=0,this.#Ht.clear(),this.#ee=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}drawParticles(t){for(let e=this.#ee.length-1;e>=0;e--){const i=this.#ee[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#$t.filter(t)}find(t){return this.#$t.find(t)}get(t){return this.#$t[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#te=[],this.#Yt=[],this.#Zt=[],this.#Xt=[],this.#Kt=[],this.#Ht.clear(),this.#ne(t.zLayers),this.grid=new Bs(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#te.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#Zt.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Kt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#$t.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.#ae(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=ge(this.#p,this.#u,s);this.#oe(n,i,t)}this.#oe(t.particles,i)}setResizeFactor(t){this.#Jt=t}update(t){this.grid.clear();for(const e of this.#te)e.update?.(t);const e=this.#re(t);for(const e of this.#Zt)e.postUpdate?.(t);if(this.#le(t,e),e.size)for(const t of e)this.remove(t);this.#Jt=void 0}#ce(...t){this.#Qt.push(...t)}#oe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#qt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Nt.set(i,s?.number.limit.value??n.limit.value));const a=this.#he(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.#qt=n.limit.value*a:this.#Nt.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)}#ie(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#de(t){const e=this.#ee.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#he(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#se(t){const e=this.#de(t.position.z),i=this.#ee[e];i&&(i.push(t),this.#Ht.set(t.id,e))}#ae(t,e,i){const s=this.#$t[t];return!!s&&(s.group===e&&(this.#$t.splice(t,1),this.#ue(s),s.destroy(i),this.#u.dispatchEvent(dt.particleRemoved,{particle:s}),this.#ce(s),!0))}#ue(t){const e=this.#Ht.get(t.id)??this.#de(t.position.z),i=this.#ee[e];if(!i)return void this.#Ht.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Ht.delete(t.id)}#ne(t){const e=Math.max(Math.floor(t),1);if(this.#ee.length===e)for(const t of this.#ee)t.length=0;else this.#ee=this.#ie(e)}#pe(t){const e=this.#de(t.position.z),i=this.#Ht.get(t.id);if(void 0===i)return void this.#se(t);if(i===e)return;const s=this.#ee[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ee[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Ht.set(t.id,e)}else this.#Ht.set(t.id,e)}#re(t){const e=new Set,i=this.#Jt;for(const s of this.#$t){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.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#le(t,e){for(const i of this.#$t)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Kt)e.postParticleUpdate?.(i,t);this.#pe(i)}}}class Vs{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(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 Ws(t){return!t.destroyed}function Gs(t,e,...i){const s=new me(t,e);return Lt(s,...i),s}var $s=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#fe;#ge;#me={value:0,factor:0};#ye;#ve;#we;#Pe;#xe;#be;#Me;#ze;#Ce;#Se;#ke;#p;#Oe;#Ie;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#ye=e,this.#Ce=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Oe=!1,this.#fe=0,this.#we=0,this.#ze=0,this.#xe=!0,this.started=!1,this.destroyed=!1,this.#ke=!0,this.#Me=0,this.zLayers=100,this.pageHidden=!1,this.#Ie=a,this.#be=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Vs(this),this.canvas=new Es(this.#p,this),this.particles=new Us(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Se=Gs(this.#p,this),this.actualOptions=Gs(this.#p,this),this.#Pe=new Ls(this),this.dispatchEvent(dt.containerBuilt)}get animationStatus(){return!this.#ke&&!this.pageHidden&&Ws(this)}get options(){return this.#Se}get sourceOptions(){return this.#Ie}addLifeTime(t){this.#ze+=t}alive(){return!this.#we||this.#ze<=this.#we}destroy(t=!0){if(Ws(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.#Ce(t),this.dispatchEvent(dt.containerDestroyed)}}dispatchEvent(t,e){this.#ye(t,{container:this,data:e})}draw(t){if(!Ws(this))return;let e=t;this.#ve=L(t=>{e&&(this.#Me=void 0,e=!1),this.#De(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}gt().error(`Export plugin with type ${t} not found`)}async init(){if(!Ws(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Se=Gs(this.#p,this,this.#be,this.sourceOptions),this.actualOptions=Gs(this.#p,this,this.#Se),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.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:e,duration:i,fpsLimit:s,hdr:n,smooth:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#we=U(i)*a,this.#fe=U(e)*a,this.#ze=0,this.fpsLimit=s>0?s:120,this.#Oe=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(dt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(dt.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(){var t;if(Ws(this)&&(void 0!==this.#ve&&(t=this.#ve,R(t),this.#ve=void 0),!this.#ke)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ke=!0),this.dispatchEvent(dt.containerPaused)}}play(t){if(!Ws(this))return;const e=this.#ke||t;if(!this.#xe||this.actualOptions.autoPlay){if(this.#ke&&(this.#ke=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(dt.containerPlay),this.draw(e??!1)}else this.#xe=!1}async refresh(){if(Ws(this))return this.stop(),this.start()}async reset(t){if(Ws(this))return this.#be=t,this.#Ie=t,this.#Se=Gs(this.#p,this,this.#be,this.sourceOptions),this.actualOptions=Gs(this.#p,this,this.#Se),this.refresh()}async start(){Ws(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(dt.containerStarted),this.play(),t()};this.#ge=setTimeout(()=>{e()},this.#fe)}))}stop(){if(Ws(this)&&this.started){this.#ge&&(clearTimeout(this.#ge),this.#ge=void 0),this.#xe=!0,this.started=!1,this.#Pe.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.#Ie=this.#Se,this.dispatchEvent(dt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#De(t){try{if(!this.#Oe&&void 0!==this.#Me&&t<this.#Me+a/this.fpsLimit)return void this.draw(!1);if(this.#Me??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#me,t-this.#Me,this.fpsLimit,this.#Oe),this.addLifeTime(this.#me.value),this.#Me=t,this.#me.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#me),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){gt().error("error in animation loop",t)}}}});var Ns=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#_e;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#_e&&(t.globalCompositeOperation=this.#_e)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#_e=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function qs(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function js(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(l=a,c=n,Math.sqrt(N(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?wt.clockwise:wt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Hs=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-U(e.decay),t.pathDelay=U(s.delay.value)*a,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:U(i.acceleration),inverse:i.inverse},js(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===wt.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),l=r*n;e.spin.radius>l?(e.spin.radius=l,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,h,o):qs(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=$(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Ee()}redrawInit(){return this.#Ee()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ee(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Xs=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Ys=new Map;var Qs=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Ys.set(t,e)}getShapeGenerator(t){return Ys.get(t)}getSupportedShapeGenerators(){return Ys.keys()}}});var Ks,Zs,Js=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Le;#p;constructor(t){this.#Le=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Ai;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return on}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Le.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Le.get(t);return e||(e=[],this.#Le.set(t,e)),e}initContainer(t){this.#Le.has(t)||(this.#Le.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(Ks||(Ks={})),function(t){t.Block="block",t.None="none"}(Zs||(Zs={}));function tn(t){const e=K().createElement("img"),{clickCb:i,container:s,display:n,iconOptions:a,margin:o,options:r,pos:l,rightOffsets:c}=t,{width:h,path:d,style:u,svg:p}=a;!function(t,e,i,s,n,a,o,r){t.style.userSelect="none",t.style.position="absolute",t.style.top=`${(e+o).toString()}px`,t.style.left=`${(i-o-a).toString()}px`,t.style.display=s,t.style.zIndex=(n+1).toString(),t.style.cssText+=r}(e,l.top+o,l.right-(o*(c.length+1)+h+c.reduce((t,e)=>t+e,0)),n,r.fullScreen.zIndex+1,h,o,u),e.src=d??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.domElement?.parentNode??K().body).append(e),e.addEventListener("click",()=>{i()}),e}function en(t){t&&t.remove()}var sn=Object.freeze({__proto__:null,SoundsPluginInstance:class{#Re;#Fe;#u;#n;#Te;#Ae;#Be;#Ue;#Ve;#We;constructor(t,e){this.#u=t,this.#n=e,this.#Ue=0,this.#Fe=[],this.#Re=new Map}async init(){const t=this.#u.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&vs()){const t=()=>{removeEventListener(as,t),removeEventListener(os,t),ws(),this.unmute()},e={capture:!0,once:!0};addEventListener(as,t,e),addEventListener(os,t,e)}this.#Ue=t.volume.value;const e=t.events;this.#Re=new Map;for(const t of e){if(!t.audio)continue;const e=st(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this.#Ge(),n=await s.decodeAudioData(i);this.#Re.set(t.source,n)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this.#u.muted||await this.toggleMute()}async start(){const t=this.#u,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.domElement)return;t.muted=!0;const s=t.canvas.domElement,n={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:a,unmute:o,volumeDown:r,volumeUp:l}=i.icons,c=async()=>{await this.toggleMute()},h=i.icons.enable?Zs.Block:Zs.None;this.#Ae=tn({container:t,options:e,pos:n,display:h,iconOptions:a,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Be=tn({container:t,options:e,pos:n,display:Zs.None,iconOptions:o,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Ve=tn({container:t,options:e,pos:n,display:h,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this.#We=tn({container:t,options:e,pos:n,display:h,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!vs()&&i.autoPlay&&await this.unmute()}stop(){this.#u.muted=!0,(async()=>{await this.#$e(),en(this.#Ae),en(this.#Be),en(this.#Ve),en(this.#We)})()}async toggleMute(){const t=this.#u;t.muted=!t.muted,this.#Ne(),await this.#qe()}async unmute(){this.#u.muted&&await this.toggleMute()}async volumeDown(){const t=this.#u,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this.#Ue=0),this.#Ue-=e.volume.step,await this.#je())}async volumeUp(){const t=this.#u.actualOptions.sounds;t?.enable&&(this.#Ue+=t.volume.step,await this.#je())}#He(t){const e=t.createBufferSource();return this.#Fe.push(e),e}#Xe(t){const e=t.createOscillator();return this.#Fe.push(e),e}#Ge(){const t=this.#u;return t.audioContext??=new AudioContext,t.audioContext}#Ye(){const t=this.#u,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.domElement)for(const t of e.events){const e=i=>{i&&(async()=>{const s=t.filter&&!t.filter(i);if(this.#u!==i.container)return;if(this.#u.muted||this.#u.destroyed)return void st(t.event,t=>{this.#n.removeEventListener(t,e)});if(s)return;if(t.audio){const e=nt(t.audio);if(!e)return;this.#Qe(e)}else if(t.melodies){const e=J(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this.#Ke(t.notes,0,e.loop))):await this.#Ke(e.notes,0,e.loop)}else if(t.notes){const e=J(t.notes);if(!e)return;await this.#Ke([e],0,!1)}})()};st(t.event,t=>{this.#n.addEventListener(t,e)})}}async#$e(){const t=this.#u,e=this.#Ge();for(const t of this.#Fe)this.#Ze(t);this.#Te&&this.#Te.disconnect(),await e.close(),t.audioContext=void 0,this.#u.dispatchEvent(Ks.mute)}#Qe(t){const e=this.#Re.get(t.source);if(!e)return;const i=this.#u.audioContext;if(!i)return;const s=this.#He(i);s.loop=t.loop,s.buffer=e,s.connect(this.#Te??i.destination),s.start()}async#Je(t,e){if(!this.#Te||this.#u.muted)return;const i=this.#Ge(),s=this.#Xe(i);return s.connect(this.#Te),s.type="sine",s.frequency.value=t,s.start(),new Promise(t=>{setTimeout(()=>{this.#Ze(s),t()},e)})}#ti(){if(this.#u.muted)return;const t=this.#Ge(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})}async#Ke(t,e,i){if(this.#u.muted)return;const s=t[e];if(!s)return;const n=st(s.value,async(i,s)=>this.#ei(t,e,s));await(I(n)?Promise.allSettled(n):n);let a=e+1;i&&a>=t.length&&(a%=t.length),await this.#Ke(t,a,i)}async#ei(t,e,i){const s=t[e];if(!s)return;const n=nt(s.value,i,!0);if(n)try{const t=ms(n);if(!k(t))return;await this.#Je(t,s.duration)}catch(t){gt().error(t)}}#Ze(t){t.stop(),t.disconnect();this.#Fe.splice(this.#Fe.indexOf(t),1)}#ii(){const t=this.#u.actualOptions.sounds;if(!t)return;const e=this.#Ge(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/s,this.#Te=i,this.#Ye(),this.#u.dispatchEvent(Ks.unmute)}#Ne(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this.#Ae,s=this.#Be;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")}async#qe(){const t=this.#u,e=this.#Ge();t.muted?(await e.suspend(),await this.#$e()):(await e.resume(),this.#ii(),this.#ti())}async#je(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable)return;A(this.#Ue,e.volume.min,e.volume.max);let i=!1;this.#Ue<=0&&!t.muted?(this.#Ue=0,t.muted=!0,i=!0):this.#Ue>0&&t.muted&&(t.muted=!1,i=!0),i&&(this.#Ne(),await this.#qe()),this.#Te?.gain&&(this.#Te.gain.value=this.#Ue/s)}}});function nn(t,e,i,s){(t.paint??=new oe).fill={color:$t.create(void 0,{value:e}),enable:s,opacity:i}}function an(t,e,i,s){(t.paint??=new oe).stroke={color:$t.create(void 0,{value:e}),opacity:i,width:s}}var on=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#si;#ni;#ai;#we;#oi;#ri;#li;#ci;#hi;#Q;#di;#ke;#p;#ui;#dt;#pi;#fi;#gi;#mi;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#ui=i,this.#si=0,this.#ni=0,this.#ai=0,this.#ci=o,n instanceof Ai?this.options=n:(this.options=new Ai,this.options.load(n)),this.#gi=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#ci??this.#Ct(),this.name=this.options.name,this.fill=this.options.fill,this.#ri=!this.options.life.wait,this.#mi=!1;const r=it({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=xe(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=xe(this.#p,this.options.spawn.stroke.color)),this.#ke=!this.options.autoPlay,this.#di=r,this.#fi=this.#yi(),this.size=this.#fi.mode===Q.percent?{width:this.#fi.width/s*this.#u.canvas.size.width,height:this.#fi.height/s*this.#u.canvas.size.height}:{width:this.#fi.width,height:this.#fi.height},this.#hi=this.options.life.count??-1,this.#li=this.#hi<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#Q=new MutationObserver(()=>{this.resize()}),this.#dt=new ResizeObserver(()=>{this.resize()}),this.#Q.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#dt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#pi=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#ke=!0,this.pause()}externalPlay(){this.#ke=!1,this.play()}async init(){await(this.#pi?.init())}pause(){this.#ke||(this.#oi=void 0)}play(){if(this.#ke)return;if(!(this.#hi>0||this.#li)&&this.options.life.count||!(this.#ri||this.#ai>=(this.#gi??0)))return;const t=this.#u;if(void 0===this.#oi){const e=U(this.options.rate.delay);this.#oi=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#hi>0||this.#li)&&this.#vi()}resize(){const t=this.#ci,e=this.#u;this.position=t&&tt(t,e.canvas.size,z.origin)?t:this.#Ct(),this.#fi=this.#yi(),this.size=this.#fi.mode===Q.percent?{width:this.#fi.width/s*e.canvas.size.width,height:this.#fi.height/s*e.canvas.size.height}:{width:this.#fi.width,height:this.#fi.height},this.#pi?.resize(this.position,this.size)}update(t){if(this.#ke)return;const e=this.#u;this.#ri&&(this.#ri=!1,this.#ai=this.#gi??0,this.#ni=this.#oi??0),this.#mi||(this.#mi=!0,this.#wi(this.options.startCount)),void 0!==this.#we&&(this.#si+=t.value,this.#si>=this.#we&&(this.pause(),void 0!==this.#gi&&(this.#gi=void 0),this.#li||this.#hi--,this.#hi>0||this.#li?(this.position=this.#Ct(),this.#pi?.resize(this.position,this.size),this.#gi=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#Pi(),this.#si-=this.#we,this.#we=void 0)),void 0!==this.#gi&&(this.#ai+=t.value,this.#ai>=this.#gi&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#ai-=this.#gi,this.#gi=void 0)),void 0!==this.#oi&&(this.#ni+=t.value,this.#ni>=this.#oi&&(this.#xi(),this.#ni-=this.#oi))}#Ct(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return j({size:t.canvas.size,position:this.options.position})}#yi(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new Fi;return t.load({height:0,mode:Q.percent,width:0}),t})()}#Pi(){this.#Q?.disconnect(),this.#Q=void 0,this.#dt?.disconnect(),this.#dt=void 0,this.#ui(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#xi(){if(this.#ke)return;const t=U(this.options.rate.quantity);this.#wi(t)}#wi(t){const e=nt(this.#di)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#pi,u=c||h,p=u||d,f=u?{h:y,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?it({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#bi(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#bi(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#bi(i.l,this.spawnFillColor.l,f.l)),nn(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#bi(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#bi(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#bi(a.l,this.spawnStrokeColor.l,f.l)),an(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#pi){const e=this.#pi.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&nn(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#vi(){if(this.#ke)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#hi>0||this.#li)&&void 0!==t&&t>0&&(this.#we=t*a)}#bi(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=B(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadFireworksPreset=Ss,t.tsParticles=Ee}),Object.assign(globalThis.window||globalThis,{loadFireworksPreset:(globalThis.__tsParticlesInternals.presets.fireworks||{}).loadFireworksPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -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
- /* Preset v4.2.0 */
2
+ /* Preset v4.2.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine'), require('@tsparticles/basic'), require('@tsparticles/updater-destroy'), require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/plugin-emitters-shape-square'), require('@tsparticles/updater-life'), require('@tsparticles/shape-line'), require('@tsparticles/updater-rotate'), require('@tsparticles/plugin-sounds'), require('@tsparticles/effect-trail')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine', '@tsparticles/basic', '@tsparticles/updater-destroy', '@tsparticles/plugin-emitters/plugin', '@tsparticles/plugin-emitters-shape-square', '@tsparticles/updater-life', '@tsparticles/shape-line', '@tsparticles/updater-rotate', '@tsparticles/plugin-sounds', '@tsparticles/effect-trail'], factory) :