@tsparticles/preset-big-circles 4.0.0-beta.15 → 4.0.0-beta.16
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-big-circles",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.16",
|
|
4
4
|
"description": "tsParticles big circles preset",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"./package.json": "./package.json"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@tsparticles/basic": "4.0.0-beta.
|
|
109
|
-
"@tsparticles/engine": "4.0.0-beta.
|
|
108
|
+
"@tsparticles/basic": "4.0.0-beta.16",
|
|
109
|
+
"@tsparticles/engine": "4.0.0-beta.16"
|
|
110
110
|
},
|
|
111
111
|
"publishConfig": {
|
|
112
112
|
"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.0.0-beta.
|
|
2
|
+
/* Preset v4.0.0-beta.16 */
|
|
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) :
|
|
@@ -996,7 +996,7 @@
|
|
|
996
996
|
return this._domArray;
|
|
997
997
|
}
|
|
998
998
|
get version() {
|
|
999
|
-
return "4.0.0-beta.
|
|
999
|
+
return "4.0.0-beta.16";
|
|
1000
1000
|
}
|
|
1001
1001
|
addEventListener(type, listener) {
|
|
1002
1002
|
this._eventDispatcher.addEventListener(type, listener);
|
|
@@ -2848,7 +2848,7 @@
|
|
|
2848
2848
|
}
|
|
2849
2849
|
|
|
2850
2850
|
async function loadCircleShape(engine) {
|
|
2851
|
-
engine.checkVersion("4.0.0-beta.
|
|
2851
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
2852
2852
|
await engine.pluginManager.register(e => {
|
|
2853
2853
|
e.pluginManager.addShape(["circle"], () => {
|
|
2854
2854
|
return Promise.resolve(new CircleDrawer());
|
|
@@ -2896,7 +2896,7 @@
|
|
|
2896
2896
|
}
|
|
2897
2897
|
|
|
2898
2898
|
async function loadHexColorPlugin(engine) {
|
|
2899
|
-
engine.checkVersion("4.0.0-beta.
|
|
2899
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
2900
2900
|
await engine.pluginManager.register(e => {
|
|
2901
2901
|
e.pluginManager.addColorManager("hex", new HexColorManager());
|
|
2902
2902
|
});
|
|
@@ -2949,7 +2949,7 @@
|
|
|
2949
2949
|
}
|
|
2950
2950
|
|
|
2951
2951
|
async function loadHslColorPlugin(engine) {
|
|
2952
|
-
engine.checkVersion("4.0.0-beta.
|
|
2952
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
2953
2953
|
await engine.pluginManager.register(e => {
|
|
2954
2954
|
e.pluginManager.addColorManager("hsl", new HslColorManager());
|
|
2955
2955
|
});
|
|
@@ -2973,7 +2973,7 @@
|
|
|
2973
2973
|
}
|
|
2974
2974
|
|
|
2975
2975
|
async function loadMovePlugin(engine) {
|
|
2976
|
-
engine.checkVersion("4.0.0-beta.
|
|
2976
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
2977
2977
|
await engine.pluginManager.register(e => {
|
|
2978
2978
|
const moveEngine = e, movePluginManager = moveEngine.pluginManager;
|
|
2979
2979
|
movePluginManager.initializers.pathGenerators ??= new Map();
|
|
@@ -3034,7 +3034,7 @@
|
|
|
3034
3034
|
}
|
|
3035
3035
|
|
|
3036
3036
|
async function loadOpacityUpdater(engine) {
|
|
3037
|
-
engine.checkVersion("4.0.0-beta.
|
|
3037
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3038
3038
|
await engine.pluginManager.register(e => {
|
|
3039
3039
|
e.pluginManager.addParticleUpdater("opacity", container => {
|
|
3040
3040
|
return Promise.resolve(new OpacityUpdater(container));
|
|
@@ -3386,7 +3386,7 @@
|
|
|
3386
3386
|
}
|
|
3387
3387
|
|
|
3388
3388
|
async function loadOutModesUpdater(engine) {
|
|
3389
|
-
engine.checkVersion("4.0.0-beta.
|
|
3389
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3390
3390
|
await engine.pluginManager.register(e => {
|
|
3391
3391
|
e.pluginManager.addParticleUpdater("outModes", container => {
|
|
3392
3392
|
return Promise.resolve(new OutOfCanvasUpdater(container));
|
|
@@ -3457,7 +3457,7 @@
|
|
|
3457
3457
|
}
|
|
3458
3458
|
|
|
3459
3459
|
async function loadPaintUpdater(engine) {
|
|
3460
|
-
engine.checkVersion("4.0.0-beta.
|
|
3460
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3461
3461
|
await engine.pluginManager.register(e => {
|
|
3462
3462
|
e.pluginManager.addParticleUpdater("paint", container => {
|
|
3463
3463
|
return Promise.resolve(new PaintUpdater(e.pluginManager, container));
|
|
@@ -3512,7 +3512,7 @@
|
|
|
3512
3512
|
}
|
|
3513
3513
|
|
|
3514
3514
|
async function loadRgbColorPlugin(engine) {
|
|
3515
|
-
engine.checkVersion("4.0.0-beta.
|
|
3515
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3516
3516
|
await engine.pluginManager.register(e => {
|
|
3517
3517
|
e.pluginManager.addColorManager("rgb", new RgbColorManager());
|
|
3518
3518
|
});
|
|
@@ -3555,7 +3555,7 @@
|
|
|
3555
3555
|
}
|
|
3556
3556
|
|
|
3557
3557
|
async function loadSizeUpdater(engine) {
|
|
3558
|
-
engine.checkVersion("4.0.0-beta.
|
|
3558
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3559
3559
|
await engine.pluginManager.register(e => {
|
|
3560
3560
|
e.pluginManager.addParticleUpdater("size", container => {
|
|
3561
3561
|
return Promise.resolve(new SizeUpdater(container));
|
|
@@ -3564,7 +3564,7 @@
|
|
|
3564
3564
|
}
|
|
3565
3565
|
|
|
3566
3566
|
async function loadBasic(engine) {
|
|
3567
|
-
engine.checkVersion("4.0.0-beta.
|
|
3567
|
+
engine.checkVersion("4.0.0-beta.16");
|
|
3568
3568
|
await engine.pluginManager.register(async (e) => {
|
|
3569
3569
|
await Promise.all([
|
|
3570
3570
|
loadHexColorPlugin(e),
|
|
@@ -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.bigCircles=t.__tsParticlesInternals.presets.bigCircles||{}))}(this,function(t){"use strict";const e="generated",i=100,s=.5,n=1e3,a={x:0,y:0,z:0},o=1,r=0,l=0,c=1,h="random",d=2*Math.PI,u="true",p="false",f="canvas",g=255,_=360,y=100,m=100,v=.25;var w;function P(t){return"z"in t?t.z:a.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"}(w||(w={}));class b{x;y;z;constructor(t=a.x,e=a.y,i=a.z){this.x=t,this.y=e,this.z=i}static get origin(){return b.create(a.x,a.y,a.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return b.create(t.x,t.y,P(t))}static create(t,e,i){return"number"==typeof t?new b(t,e??a.y,i??a.z):new b(t.x,t.y,P(t))}add(t){return b.create(this.x+t.x,this.y+t.y,this.z+P(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=P(t)}copy(){return b.clone(this)}div(t){return b.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return b.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 b.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),a.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=P(t)}sub(t){return b.create(this.x-t.x,this.y-t.y,this.z-P(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=P(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class x extends b{constructor(t=a.x,e=a.y){super(t,e,a.z)}static get origin(){return x.create(a.x,a.y)}static clone(t){return x.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new x(t,e??a.y):new x(t.x,t.y)}}function z(t){return"boolean"==typeof t}function M(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function C(t){return Array.isArray(t)}function O(t){return null==t}const k=Math.PI/180;let D=Math.random;const F=t=>requestAnimationFrame(t),R=t=>{cancelAnimationFrame(t)};function T(){return L(D(),0,1-Number.EPSILON)}function A(t,e){return T()*(e-t)+t}function L(t,e,i){return Math.min(Math.max(t,e),i)}function E(t){const e=B(t);let i=V(t);return e===i&&(i=0),A(i,e)}function U(t){return S(t)?t:E(t)}function V(t){return S(t)?t:t.min}function B(t){return S(t)?t:t.max}function $(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=B(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:$(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*k}function j(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function N(t){return t?t.endsWith("%")?parseFloat(t)/i:parseFloat(t):1}var Z,H,Q,X,Y,J;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Z||(Z={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(H||(H={})),function(t){t.none="none",t.max="max",t.min="min"}(Q||(Q={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(X||(X={})),function(t){t.precise="precise",t.percent="percent"}(Y||(Y={})),function(t){t.max="max",t.min="min",t.random="random"}(J||(J={}));function K(){return globalThis.document}function tt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function et(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(T()*t.length)}(t)]}function it(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==X.bottom||(n=t.top<e.height+i.x);!n||s&&s!==X.left||(n=t.right>i.x);!n||s&&s!==X.right||(n=t.left<e.width+i.y);!n||s&&s!==X.top||(n=t.bottom>i.y);return n}(st(t,s??0),e,i,n)}function st(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function nt(t,...e){for(const i of e){if(O(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(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 I(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=>nt(void 0,t)):nt(e[n],a)}}return t}function at(t,e){return C(t)?t.map((t,i)=>e(t,i)):e(t,0)}function ot(t,e,i){return C(t)?et(t,e,i):t}function rt(t,e){const i=t.value,a=t.animation,o={delayTime:U(a.delay)*n,enable:a.enable,value:U(t.value)*e,max:B(i)*e,min:V(i)*e,loops:0,maxLoops:U(a.count),time:0};if(a.enable){switch(o.decay=1-U(a.decay),a.mode){case Z.increase:o.status=H.increasing;break;case Z.decrease:o.status=H.decreasing;break;case Z.random:o.status=T()>=s?H.increasing:H.decreasing}const t=a.mode===Z.auto;switch(a.startValue){case J.min:o.value=o.min,t&&(o.status=H.increasing);break;case J.max:o.value=o.max,t&&(o.status=H.decreasing);break;case J.random:default:o.value=E(o),t&&(o.status=T()>=s?H.increasing:H.decreasing)}}return o.initialValue=o.value,o}function lt(t,e){return function(t,e){if(t.mode!==Y.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/i*e.width,y:t.y/i*e.height}:{width:t.width/i*e.width,height:t.height/i*e.height}}(t,e)}function ct(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;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case H.increasing:e.value+=a;break;case H.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case H.increasing:e.value>=r&&(e.status=H.decreasing,e.loops??=0,e.loops++);break;case H.decreasing:e.value<=o&&(e.status=H.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Q.max:i>=n&&t.destroy();break;case Q.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=L(e.value,o,r))}}const ht=function(t){const e=new Map,i=(t,e=new WeakSet)=>{if(null===t)return"null";const s=typeof t;if("undefined"===s)return"undefined";if("number"===s||"boolean"===s||"string"===s)return JSON.stringify(t);if("function"===s)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===s)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>i(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(s=>`${JSON.stringify(s)}:${i(t[s],e)}`).join(",")}}`},s=t=>(t=>i(t))(t);return(...i)=>{const n=s(i),a=Date.now(),o=e.get(n);if(void 0!==o)return e.delete(n),e.set(n,{value:o.value,ts:o.ts}),o.value;const r=t(...i);return e.set(n,{value:r,ts:a}),r}}(function(t){const e=K().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function dt(t,e,i,s,n){if(s){let s={passive:!0};z(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 ut(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 pt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var ft;!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"}(ft||(ft={}));class gt{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;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._engine.dispatchEvent(ft.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 ut(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 ut(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._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const _t=t=>(...e)=>{t(...e)},yt={debug:_t(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:_t(console.info),log:_t(console.log),trace:_t(console.trace),verbose:_t(console.log),warning:_t(console.warn)};function mt(){return yt}const vt="100%";class wt{pluginManager=new gt(this);_domArray=[];_eventDispatcher=new pt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0-beta.15"}addEventListener(t,e){this._eventDispatcher.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._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){await this.init();const{Container:i}=await Promise.resolve().then(function(){return Mi}),s=t.id??t.element?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:n,url:a}=t,o=a?await async function(t){const e=ot(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(mt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:n}):t.options,r=ot(o,n),{items:l}=this,c=l.findIndex(t=>t.id.description===s),h=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:r});if(c>=0){const t=this.item(c),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(c,e,h)}else l.push(h);const d=((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=u,s.body.append(n),n)})(s,t.element),g=(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=p,s.dataset[e]===u&&(s.style.width||=vt,s.style.height||=vt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f)[0];n?(s=n,s.dataset[e]=p):(s=i.createElement(f),s.dataset[e]=u,t.appendChild(s)),s.style.width||=vt,s.style.height||=vt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(d);return h.canvas.loadCanvas(g),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var Pt,bt,xt,zt,Mt,St,It,Ct;!function(t){t.circle="circle",t.rectangle="rectangle"}(Pt||(Pt={}));class Ot{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 kt extends Ot{radius;constructor(t,e,i){super(t,e,Pt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,W(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 kt||t.type===Pt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Dt||t.type===Pt.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 Dt extends Ot{size;constructor(t,e,i,s){super(t,e,Pt.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 kt)return t.intersects(this);if(!(t instanceof Dt))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"}(bt||(bt={})),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"}(zt||(zt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(St||(St={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(It||(It={})),function(t){t.easeInBack="ease-in-back",t.easeInBounce="ease-in-bounce",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInElastic="ease-in-elastic",t.easeInExpo="ease-in-expo",t.easeInGaussian="ease-in-gaussian",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInSigmoid="ease-in-sigmoid",t.easeInSine="ease-in-sine",t.easeInSmoothstep="ease-in-smoothstep",t.easeOutBack="ease-out-back",t.easeOutBounce="ease-out-bounce",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutElastic="ease-out-elastic",t.easeOutExpo="ease-out-expo",t.easeOutGaussian="ease-out-gaussian",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutSigmoid="ease-out-sigmoid",t.easeOutSine="ease-out-sine",t.easeOutSmoothstep="ease-out-smoothstep",t.easeInOutBack="ease-in-out-back",t.easeInOutBounce="ease-in-out-bounce",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutElastic="ease-in-out-elastic",t.easeInOutExpo="ease-in-out-expo",t.easeInOutGaussian="ease-in-out-gaussian",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutSigmoid="ease-in-out-sigmoid",t.easeInOutSine="ease-in-out-sine",t.easeInOutSmoothstep="ease-in-out-smoothstep"}(Ct||(Ct={}));class Ft{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){O(t)||(void 0!==t.count&&(this.count=$(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=$(t.speed)),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.delay&&(this.delay=$(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Rt extends Ft{mode;startValue;constructor(){super(),this.mode=Z.auto,this.startValue=J.random}load(t){super.load(t),O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Tt extends Ft{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),O(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=$(t.offset)))}}class At{h=new Tt(0,_);l=new Tt(0,m);s=new Tt(0,y);load(t){O(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Lt{value;constructor(){this.value=""}static create(t,e){const i=new Lt;return i.load(t),void 0!==e&&(M(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){O(t)||O(t.value)||(this.value=t.value)}}class Et extends Lt{animation;constructor(){super(),this.animation=new At}static create(t,e){const i=new Et;return i.load(t),void 0!==e&&(M(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Ut{color;image;opacity;position;repeat;size;constructor(){this.color=new Lt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){O(t)||(void 0!==t.color&&(this.color=Lt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Vt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){O(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Bt{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){O(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class $t{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(O(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=nt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Gt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){O(t)||(void 0!==t.color&&(this.color=Et.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class Wt{offset;value;constructor(){this.offset=0,this.value=90}load(t){O(t)||(void 0!==t.offset&&(this.offset=$(t.offset)),void 0!==t.value&&(this.value=$(t.value)))}}class qt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=Y.percent,this.radius=0}load(t){O(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class jt{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){O(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=$(t.maxSpeed)))}}class Nt{value;constructor(){this.value=0}load(t){O(t)||O(t.value)||(this.value=$(t.value))}}class Zt extends Nt{animation=new Ft;load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ht extends Zt{animation;constructor(){super(),this.animation=new Rt}load(t){super.load(t)}}class Qt{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Nt,this.enable=!1,this.options={}}load(t){O(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=nt(this.options,t.options)))}}class Xt{bottom;default;left;right;top;constructor(){this.default=zt.out}load(t){O(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 Yt{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){O(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=nt({},t.position)))}}class Jt{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new Wt,this.center=new qt,this.decay=0,this.distance={},this.direction=w.none,this.drift=0,this.enable=!1,this.gravity=new jt,this.path=new Qt,this.outModes=new Xt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Yt,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(O(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=$(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=$(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Kt extends Rt{destroy;constructor(){super(),this.destroy=Q.none,this.speed=2}load(t){super.load(t),O(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class te extends Ht{animation;constructor(){super(),this.animation=new Kt,this.value=1}load(t){if(O(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ee{color;opacity;width;constructor(){this.width=0}load(t){O(t)||(void 0!==t.color&&(this.color=Et.create(this.color,t.color)),void 0!==t.width&&(this.width=$(t.width)),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class ie{color;fill;stroke;load(t){O(t)||(void 0!==t.color&&(this.color=Et.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new Gt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new ee,this.stroke.load(t.stroke)))}}class se extends Nt{constructor(){super(),this.value=1}}class ne{horizontal;vertical;constructor(){this.horizontal=new se,this.vertical=new se}load(t){O(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class ae{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(O(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class oe{mode;value;constructor(){this.mode=xt.delete,this.value=0}load(t){O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class re{density;limit;value;constructor(){this.density=new ae,this.limit=new oe,this.value=0}load(t){O(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class le{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(O(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=nt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ce extends Rt{destroy;constructor(){super(),this.destroy=Q.none,this.speed=5}load(t){super.load(t),O(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class he extends Ht{animation;constructor(){super(),this.animation=new ce,this.value=3}load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class de extends Nt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),O(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class ue{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new ne,this.effect=new $t,this.groups={},this.move=new Jt,this.number=new re,this.opacity=new te,this.paint=new ie,this.paint.color=new Et,this.paint.color.value="#fff",this.paint.fill=new Gt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new le,this.size=new he,this.zIndex=new de}load(t){if(O(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(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]=nt(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),this.opacity.load(t.opacity);const e=t.paint;if(e&&(C(e)?this.paint=at(e,t=>{const e=new ie;return e.load(t),e}):C(this.paint)?(this.paint=new ie,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(C(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 pe(t,...e){for(const i of e)t.load(i)}function fe(t,e,...i){const s=new ue(t,e);return pe(s,...i),s}class ge{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new Ut,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Vt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=fe(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new Bt,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(O(t))return;void 0!==t.preset&&(this.preset=t.preset,at(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=$(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=$(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;z(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=nt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function _e(t,e){t.clearRect(a.x,a.y,e.width,e.height)}function ye(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const me=new Map;function ve(t,e){let i=me.get(t);if(!i){if(i=e(),me.size>=1e3){[...me.keys()].slice(0,500).forEach(t=>me.delete(t))}me.set(t,i)}return i}function we(t,e,i,s=!0){if(!e)return;const n=M(e)?{value:e}:e;if(M(n.value))return Pe(t,n.value,i,s);if(C(n.value)){const e=et(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=M(e)?{value:e}:e;if(M(n.value))return n.value===h?function(){const t=0,e=256,i=()=>Math.floor(A(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(C(n.value)){const e=et(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 be(t,e,i,n=!0){const a=we(t,e,i,n);return a?function(t){const e=t.r/g,i=t.g/g,n=t.b/g,a=Math.max(e,i,n),o=Math.min(e,i,n),r={h:0,l:(a+o)*s,s:0};a!==o&&(r.s=r.l<s?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-n)/(a-o):i===a?2+(n-e)/(a-o):4+(e-i)/(a-o));r.l*=m,r.s*=y,r.h*=60,r.h<0&&(r.h+=_);r.h>=_&&(r.h-=_);return r}(a):void 0}function xe(t){const e=(t.h%_+_)%_,i=Math.max(0,Math.min(y,t.s)),n=Math.max(0,Math.min(m,t.l)),a=e/_,o=i/y,r=n/m;if(0===i){const t=Math.round(r*g);return{r:t,g:t,b:t}}const l=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},c=r<s?r*(1+o):r+o-r*o,h=2*r-c,d=1/3,u=Math.min(g,g*l(h,c,a+d)),p=Math.min(g,g*l(h,c,a)),f=Math.min(g,g*l(h,c,a-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function ze(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?Me(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Me(t,e){return`color(display-p3 ${(t.r/g).toString()} ${(t.g/g).toString()} ${(t.b/g).toString()} / ${(e??1).toString()})`}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?function(t,e){return Me(xe(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Ie(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ce(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:_},s:{enable:!1,value:t.s,min:0,max:y},l:{enable:!1,value:t.l,min:0,max:m}};return e&&(Oe(s.h,e.h,i),Oe(s.s,e.s,i),Oe(s.l,e.l,i)),s}function Oe(t,e,s){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/i*s,t.decay=1-U(e.decay),t.status=H.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*n,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=$(e.offset)):t.velocity=0}function ke(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?E(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!==H.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=H.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=H.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=L(t.value,r,o)}function De(t,e){if(!t)return;const{h:i,s:s,l:n}=t;ke(i,!1,e),ke(s,!0,e),ke(n,!0,e)}const Fe=new wt;class Re{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:d};const n=i.circleRange;e.arc(a.x,a.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Te(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Re))})}var Ae;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ae||(Ae={}));const Le=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ee=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ue{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Le,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ee.exec(e);return i?{a:i[Ae.a]?Number.parseInt(i[Ae.a],16)/255:1,b:Number.parseInt(i[Ae.b]??"0",16),g:Number.parseInt(i[Ae.g]??"0",16),r:Number.parseInt(i[Ae.r]??"0",16)}:void 0}}async function Ve(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ue)})}var Be;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Be||(Be={}));const $e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ge{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 xe(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return xe({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=$e.exec(t);return e?function(t){const e=xe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?N(e[Be.a]):1,h:Number.parseInt(e[Be.h]??"0",10),l:Number.parseInt(e[Be.l]??"0",10),s:Number.parseInt(e[Be.s]??"0",10)}):void 0}}async function We(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ge)})}class qe{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ci});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function je(t){t.checkVersion("4.0.0-beta.15"),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,ut(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new qe(t.pluginManager))})}class Ne{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=rt(e,1);const s=e.animation;s.enable&&(t.opacity.velocity=U(s.speed)/i*this.container.retina.reduceFactor,s.sync||(t.opacity.velocity*=T()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&ct(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Ze(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ne(t)))})}class He{container;modes;_particleBouncePlugins;constructor(t){this.container=t,this.modes=[zt.bounce,zt.split],this._particleBouncePlugins=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let a=!1;for(const s of this._particleBouncePlugins)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=st(o,l),h=n.canvas.size;!function(t){if(t.outMode!==zt.bounce&&t.outMode!==zt.split||t.direction!==X.left&&t.direction!==X.right)return;t.bounds.right<0&&t.direction===X.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===X.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===X.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===X.left&&t.bounds.left<=0&&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.bounds.right>=t.canvasSize.width&&t.direction===X.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===X.left&&(t.particle.position.x=s),t.outMode===zt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,size:l}),function(t){if(t.outMode!==zt.bounce&&t.outMode!==zt.split||t.direction!==X.bottom&&t.direction!==X.top)return;t.bounds.bottom<0&&t.direction===X.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===X.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===X.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===X.top&&t.bounds.top<=0&&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.bounds.bottom>=t.canvasSize.height&&t.direction===X.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===X.top&&(t.particle.position.y=s),t.outMode===zt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,size:l})}}class Qe{container;modes;constructor(t){this.container=t,this.modes=[zt.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case It.normal:case It.outside:if(it(t.position,n.canvas.size,a,t.getRadius(),e))return;break;case It.inside:{const{dx:e,dy:i}=G(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 Xe{container;modes;constructor(t){this.container=t,this.modes=[zt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===X.left||e===X.right))??(t.options.move.distance.vertical&&(e===X.top||e===X.bottom)))return;const n=t.options.move.gravity,o=this.container,r=o.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===X.bottom||n.inverse&&i.y<-l&&e===X.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;it(t.position,o.canvas.size,a,l,e)||t.destroy()}}}const Ye=x.origin;class Je{container;modes;constructor(t){this.container=t,this.modes=[zt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case It.inside:{const{x:e,y:i}=t.velocity;Ye.setTo(a),Ye.length=t.moveCenter.radius,Ye.angle=t.velocity.angle+Math.PI,Ye.addTo(t.moveCenter);const{dx:s,dy:o}=G(t.position,Ye);if(e<=0&&s>=0||i<=0&&o>=0||e>=0&&s<=0||i>=0&&o<=0)return;t.position.x=Math.floor(E({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(E({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=G(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(it(t.position,n.canvas.size,a,t.getRadius(),e))return;switch(t.outType){case It.outside:{t.position.x=Math.floor(E({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(E({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=G(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case It.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=st(t.position,o);e===X.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===X.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===X.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===X.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class Ke{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,zt.bounce,t=>new He(t)),this._addUpdaterIfMissing(t,zt.out,t=>new Je(t)),this._addUpdaterIfMissing(t,zt.destroy,t=>new Qe(t)),this._addUpdaterIfMissing(t,zt.none,t=>new Xe(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this._updateOutMode(t,e,i.bottom??i.default,X.bottom),this._updateOutMode(t,e,i.left??i.default,X.left),this._updateOutMode(t,e,i.right??i.default,X.right),this._updateOutMode(t,e,i.top??i.default,X.top)}_addUpdaterIfMissing=(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.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ti(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ke(t)))})}class ei{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=ot(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Et.create(void 0===a?void 0:Et.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=be(this._pluginManager,i);s&&(t.fillColor=Ce(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=Et.create(void 0===a?void 0:Et.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=be(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=Ce(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)&&(De(t.fillColor,e),De(t.strokeColor,e))}}async function ii(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ei(t.pluginManager,e)))})}var si;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(si||(si={}));const ni=/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 ai{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=ni.exec(t);return e?{a:e.length>4?N(e[si.a]):1,b:parseInt(e[si.b]??"0",10),g:parseInt(e[si.g]??"0",10),r:parseInt(e[si.r]??"0",10)}:void 0}}async function oi(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ai)})}class ri{_container;constructor(t){this._container=t}init(t){const e=this._container,s=t.options.size.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/i*e.retina.reduceFactor,s.sync||(t.size.velocity*=T()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&ct(t,t.size,0,t.options.size.animation.destroy,e)}}async function li(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ri(t)))})}const ci={fpsLimit:120,background:{color:"#fff"},particles:{number:{value:100,density:{enable:!0}},paint:{fill:{color:{value:["#FF0000","#FF2A00","#FF5500","#FF8000","#FFAA00","#FFD400","#FFFF00","#D4FF00","#AAFF00","#80FF00","#55FF00","#2AFF00","#00FF00","#00FF2A","#00FF55","#00FF80","#00FFAA","#00FFD4","#00FFFF","#00D4FF","#00AAFF","#0080FF","#0055FF","#002AFF","#0000FF","#2A00FF","#5500FF","#8000FF","#AA00FF","#D400FF","#FF00FF","#FF00D4","#FF00AA","#FF0080","#FF0055","#FF002A"]},enable:!0}},shape:{type:"circle"},opacity:{value:{min:.4,max:.8}},size:{value:{min:150,max:300}},move:{enable:!0,angle:{value:30,offset:0},speed:{min:10,max:20},direction:w.top,outModes:zt.out}},detectRetina:!0},hi=["bigCircles","big-circles"];async function di(t){await t.pluginManager.register(async t=>{await async function(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(async t=>{await Promise.all([Ve(t),We(t),oi(t),je(t),Te(t),ii(t),Ze(t),ti(t),li(t)])})}(t),hi.forEach(e=>{t.pluginManager.addPreset(e,ci)})})}const ui=globalThis;ui.__tsParticlesInternals=ui.__tsParticlesInternals??{},ui.loadBigCirclesPreset=di;function pi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class fi{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{_e(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,f=this._reusableColorStyles,g=a?Se(a,r.hdr,h*d):void 0,_=o?Se(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=_,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,f,p),function(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 _={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?.(_);const y=s.effect?c.get(s.effect):void 0,m=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(y,_),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(m,_),function(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())}(m,_),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(m,_),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(y,_),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)ye(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{!function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(a.x,a.y,e.width,e.height)}(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{!function(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,a.x,a.y,e.width,e.height),t.globalAlpha=n}(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation="source-over")}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{_e(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){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)pi(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=be(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=be(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}function gi(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 _i{element;render;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new fi(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*s/t,y:i*s/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.element;if(!i)return;const s=i.style,n=we(this._pluginManager,e.color);s.backgroundColor=n?ze(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this._container;this._generated=e in t.dataset?"true"===t.dataset[e]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(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}(this.element.style);const s=this._standardSize;s.height=t.offsetHeight,s.width=t.offsetWidth;const n=this._container.retina.pixelRatio,a=this.size;t.height=a.height=s.height*n,t.width=a.width=s.width*n;const o=tt("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:o?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(this.element.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})}resize(){if(!this.element)return!1;const t=this._container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...e};e.height=i.height,e.width=i.width;const o=this.size;return this.element.width=o.width=n.width,this.element.height=o.height=n.height,this._container.started&&t.particles.setResizeFactor({width:e.width/a.width,height:e.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.element||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.element,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();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")}}};_repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&gi(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.element;t&&gi(t,ht(this._container.actualOptions.fullScreen.zIndex),!0)}}class yi{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*n)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),dt(document,"visibilitychange",e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void dt(globalThis,"resize",e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this._handleWindowResize()}),this._resizeObserver.observe(s))}}function mi(t){if(e=t.outMode,i=t.checkModes,!(e===i||C(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)}class vi{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;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=b.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this._container,i=this.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._container.dispatchEvent(ft.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??Ie(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*s}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._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??Ie(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??o),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??r,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??l,this._cachedTransform.d=e.cos*(t.d??c),this._cachedTransform}init(t,e,i,s){const n=this._container;this.id=t,this.group=s,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=It.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,o=n.actualOptions,r=fe(this._pluginManager,n,o.particles),l=r.reduceDuplicates,c=r.effect.type,d=r.shape.type;this.effect=ot(c,this.id,l),this.shape=ot(d,this.id,l);const u=r.effect,p=r.shape;if(i){if(i.effect?.type){const t=ot(i.effect.type,this.id,l);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=ot(i.shape.type,this.id,l);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(T()*t.length)]}if(this.shape===h){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(T()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return nt({close:e.close},ot(n,i,s))}(this.effect,u,this.id,l):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return nt({close:e.close},ot(n,i,s))}(this.shape,p,this.id,l):void 0,r.load(i);const f=this.effectData;f&&r.load(f.particles);const g=this.shapeData;g&&r.load(g.particles),this.effectClose=f?.close??r.effect.close,this.shapeClose=g?.close??r.shape.close,this.options=r,n.retina.initParticle(this),this.size=rt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy();let _,y;n.particles.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(_=n.effectDrawers.get(this.effect)),_?.loadEffect&&_.loadEffect(this),this.shape&&(y=n.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const m=y?.getSidesCount;m&&(this.sides=m(this)),this.spawning=!1;for(const t of n.particleUpdaters)t.init(this);_?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%d,i=e<0?e+d:e;return i>=Math.PI*s&&i<3*Math.PI*s}if(this.roll.horizontal){const e=(t+Math.PI*s)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?b.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return b.create(i.x,i.y,e)}const t=j({size:l,position:s}),c=b.create(t.x,t.y,e);this._fixHorizontal(c,r,o.left??o.default),this._fixHorizontal(c,r,o.right??o.default),this._fixVertical(c,r,o.top??o.default),this._fixVertical(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const t=function(t){const e=x.origin;return e.length=1,e.angle=t,e}(this.direction).copy(),e=this.options.move;if(e.direction===w.inside||e.direction===w.outside)return t;const i=q(U(e.angle.value)),n=q(U(e.angle.offset)),a={left:n-i*s,right:n+i*s};return e.straight||(t.angle+=E($(a.left,a.right))),e.random&&"number"==typeof e.speed&&(t.length*=T()),t};_fixHorizontal=(t,e,i)=>{mi({outMode:i,checkModes:[zt.bounce],coord:t.x,maxCoord:this._container.canvas.size.width,setCb:e=>t.x+=e,radius:e})};_fixVertical=(t,e,i)=>{mi({outMode:i,checkModes:[zt.bounce],coord:t.y,maxCoord:this._container.canvas.size.height,setCb:e=>t.y+=e,radius:e})};_getRollColor=t=>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;_initPosition=t=>{const e=this._container,i=U(this.options.zIndex.value),n=this._calcPosition(t,L(i,0,e.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...lt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return q(t);switch(t){case w.top:return-Math.PI*s;case w.topRight:return-Math.PI*v;case w.right:return 0;case w.bottomRight:return Math.PI*v;case w.bottom:return Math.PI*s;case w.bottomLeft:return.75*Math.PI;case w.left:return Math.PI;case w.topLeft:return.75*-Math.PI;case w.inside:return Math.atan2(i.y-e.y,i.x-e.x);case w.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*d}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case w.inside:this.outType=It.inside;break;case w.outside:this.outType=It.outside}this.offset=x.origin}}class wi{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.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._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new kt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Dt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof kt){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 Dt){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}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class Pi{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_maxZIndex;_minZIndex;_needsSort;_nextId;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zArray;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._minZIndex=0,this._maxZIndex=0,this.grid=new wi(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,a=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,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._pool.pop()??new vi(this._pluginManager,this._container);n.init(this._nextId,t,e,i);let a=!0;return s&&(a=s(n)),a?(this._array.push(n),this._zArray.push(n),this._nextId++,this._container.dispatchEvent(ft.particleAdded,{particle:n}),n):void this._pool.push(n)}catch(t){mt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._pool.length=0,this._zArray=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this._minZIndex=0,this._maxZIndex=0,this._needsSort=!1,this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this.grid=new wi(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.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._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=fe(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setLastZIndex(t){this._needsSort||=t>=this._maxZIndex||t>this._minZIndex&&t<this._maxZIndex}setResizeFactor(t){this._resizeFactor=t}update(t){const e=new Set;this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const i=this._resizeFactor;for(const s of this._array){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._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}for(const e of this._postUpdatePlugins)e.postUpdate?.(t);for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(i.destroyed||i.spawning)i.destroyed&&e.add(i);else for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t)}if(e.size)for(const t of e)this.remove(t);if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort((t,e)=>e.position.z-t.position.z||t.id-e.id);const e=t[0],i=t[t.length-1];if(!e||!i)return;this._maxZIndex=e.position.z,this._minZIndex=i.position.z,this._needsSort=!1}}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(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._limit=n.limit.value*a:this._groupLimits.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)};_initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)};_removeParticle=(t,e,i)=>{const s=this._array[t];if(!s)return!1;if(s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(n,1),s.destroy(i),this._container.dispatchEvent(ft.particleRemoved,{particle:s}),this._addToPool(s),!0}}class bi{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}}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,a.sizeAnimationSpeed=U(e.size.animation.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 xi(t){return!t.destroyed}function zi(t,e,...i){const s=new ge(t,e);return pe(s,...i),s}var Mi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this._pluginManager=i,this._dispatchCallback=e,this._onDestroy=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new bi(this),this.canvas=new _i(this._pluginManager,this),this.particles=new Pi(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=zi(this._pluginManager,this),this.actualOptions=zi(this._pluginManager,this),this._eventListeners=new yi(this),this.dispatchEvent(ft.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&xi(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(t=!0){if(xi(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._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(t),this.dispatchEvent(ft.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!xi(this))return;let e=t;this._drawAnimationFrame=F(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}mt().error(`Export plugin with type ${t} not found`)}async init(){if(!xi(this))return;const t=new Map;for(const e of this._pluginManager.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this._options=zi(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=zi(this._pluginManager,this,this._options),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:a,smooth:o,zLayers:r}=this.actualOptions;this.hdr=a,this.zLayers=r,this._duration=U(i)*n,this._delay=U(e)*n,this._lifeTime=0,this.fpsLimit=s>0?s:120,this._smooth=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ft.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ft.particlesSetup)}async initDrawersAndUpdaters(){const t=this._pluginManager;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(xi(this)&&(void 0!==this._drawAnimationFrame&&(t=this._drawAnimationFrame,R(t),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(ft.containerPaused)}}play(t){if(!xi(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ft.containerPlay),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(xi(this))return this.stop(),this.start()}async reset(t){if(xi(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=zi(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=zi(this._pluginManager,this,this._options),this.refresh()}async start(){xi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ft.containerStarted),this.play(),t()};this._delayTimeout=setTimeout(()=>{e()},this._delay)}))}stop(){if(xi(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(ft.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+n/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/n}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>n)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){mt().error("error in animation loop",t)}}}});function Si(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=L(t.velocity.x,-1,1),t.velocity.y=L(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 Ii(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(W(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?bt.clockwise:bt.counterClockwise,angle:T()*d,radius:o,acceleration:e.retina.spinAcceleration}}var Ci=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=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)*n,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},Ii(this._container,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options,n=i.move;if(!n.enable)return;const a=this._container,o=a.retina.pixelRatio,r=function(t){return t.slow.inRange?t.slow.factor:1}(t),l=a.retina.reduceFactor,c=t.retina.moveSpeed,h=t.retina.moveDrift,d=B(i.size.value)*o,u=c*(n.size?t.getRadius()/d:1)*r*(e.factor||1)*s,p=t.retina.maxSpeed;n.spin.enable?function(t,e,i,n){if(!e.spin)return;const a=e.spin.direction===bt.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)*n,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*n,e.spin.radius+=e.spin.acceleration*n;const r=Math.max(t.canvas.size.width,t.canvas.size.height),l=r*s;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)}(a,t,u,l):Si(t,n,u,p,h,l,e),function(t){const e=t.initialPosition,{dx:i,dy:n}=G(e,t.position),a=Math.abs(i),o=Math.abs(n),{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*s-t.velocity.x),c&&(t.velocity.y=t.velocity.x*s-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*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});t.loadBigCirclesPreset=di,t.tsParticles=Fe}),Object.assign(globalThis.window||globalThis,{loadBigCirclesPreset:(globalThis.__tsParticlesInternals.presets.bigCircles||{}).loadBigCirclesPreset}),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.bigCircles=t.__tsParticlesInternals.presets.bigCircles||{}))}(this,function(t){"use strict";const e="generated",i=100,s=.5,n=1e3,a={x:0,y:0,z:0},o=1,r=0,l=0,c=1,h="random",d=2*Math.PI,u="true",p="false",f="canvas",g=255,_=360,y=100,m=100,v=.25;var w;function P(t){return"z"in t?t.z:a.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"}(w||(w={}));class b{x;y;z;constructor(t=a.x,e=a.y,i=a.z){this.x=t,this.y=e,this.z=i}static get origin(){return b.create(a.x,a.y,a.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return b.create(t.x,t.y,P(t))}static create(t,e,i){return"number"==typeof t?new b(t,e??a.y,i??a.z):new b(t.x,t.y,P(t))}add(t){return b.create(this.x+t.x,this.y+t.y,this.z+P(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=P(t)}copy(){return b.clone(this)}div(t){return b.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return b.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 b.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),a.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=P(t)}sub(t){return b.create(this.x-t.x,this.y-t.y,this.z-P(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=P(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class x extends b{constructor(t=a.x,e=a.y){super(t,e,a.z)}static get origin(){return x.create(a.x,a.y)}static clone(t){return x.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new x(t,e??a.y):new x(t.x,t.y)}}function z(t){return"boolean"==typeof t}function M(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function C(t){return Array.isArray(t)}function O(t){return null==t}const k=Math.PI/180;let D=Math.random;const F=t=>requestAnimationFrame(t),R=t=>{cancelAnimationFrame(t)};function T(){return L(D(),0,1-Number.EPSILON)}function A(t,e){return T()*(e-t)+t}function L(t,e,i){return Math.min(Math.max(t,e),i)}function E(t){const e=B(t);let i=V(t);return e===i&&(i=0),A(i,e)}function U(t){return S(t)?t:E(t)}function V(t){return S(t)?t:t.min}function B(t){return S(t)?t:t.max}function $(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=B(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:$(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*k}function j(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function N(t){return t?t.endsWith("%")?parseFloat(t)/i:parseFloat(t):1}var Z,H,Q,X,Y,J;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Z||(Z={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(H||(H={})),function(t){t.none="none",t.max="max",t.min="min"}(Q||(Q={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(X||(X={})),function(t){t.precise="precise",t.percent="percent"}(Y||(Y={})),function(t){t.max="max",t.min="min",t.random="random"}(J||(J={}));function K(){return globalThis.document}function tt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function et(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(T()*t.length)}(t)]}function it(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==X.bottom||(n=t.top<e.height+i.x);!n||s&&s!==X.left||(n=t.right>i.x);!n||s&&s!==X.right||(n=t.left<e.width+i.y);!n||s&&s!==X.top||(n=t.bottom>i.y);return n}(st(t,s??0),e,i,n)}function st(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function nt(t,...e){for(const i of e){if(O(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(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 I(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=>nt(void 0,t)):nt(e[n],a)}}return t}function at(t,e){return C(t)?t.map((t,i)=>e(t,i)):e(t,0)}function ot(t,e,i){return C(t)?et(t,e,i):t}function rt(t,e){const i=t.value,a=t.animation,o={delayTime:U(a.delay)*n,enable:a.enable,value:U(t.value)*e,max:B(i)*e,min:V(i)*e,loops:0,maxLoops:U(a.count),time:0};if(a.enable){switch(o.decay=1-U(a.decay),a.mode){case Z.increase:o.status=H.increasing;break;case Z.decrease:o.status=H.decreasing;break;case Z.random:o.status=T()>=s?H.increasing:H.decreasing}const t=a.mode===Z.auto;switch(a.startValue){case J.min:o.value=o.min,t&&(o.status=H.increasing);break;case J.max:o.value=o.max,t&&(o.status=H.decreasing);break;case J.random:default:o.value=E(o),t&&(o.status=T()>=s?H.increasing:H.decreasing)}}return o.initialValue=o.value,o}function lt(t,e){return function(t,e){if(t.mode!==Y.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/i*e.width,y:t.y/i*e.height}:{width:t.width/i*e.width,height:t.height/i*e.height}}(t,e)}function ct(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;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case H.increasing:e.value+=a;break;case H.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case H.increasing:e.value>=r&&(e.status=H.decreasing,e.loops??=0,e.loops++);break;case H.decreasing:e.value<=o&&(e.status=H.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Q.max:i>=n&&t.destroy();break;case Q.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=L(e.value,o,r))}}const ht=function(t){const e=new Map,i=(t,e=new WeakSet)=>{if(null===t)return"null";const s=typeof t;if("undefined"===s)return"undefined";if("number"===s||"boolean"===s||"string"===s)return JSON.stringify(t);if("function"===s)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===s)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>i(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(s=>`${JSON.stringify(s)}:${i(t[s],e)}`).join(",")}}`},s=t=>(t=>i(t))(t);return(...i)=>{const n=s(i),a=Date.now(),o=e.get(n);if(void 0!==o)return e.delete(n),e.set(n,{value:o.value,ts:o.ts}),o.value;const r=t(...i);return e.set(n,{value:r,ts:a}),r}}(function(t){const e=K().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function dt(t,e,i,s,n){if(s){let s={passive:!0};z(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 ut(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 pt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var ft;!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"}(ft||(ft={}));class gt{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;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._engine.dispatchEvent(ft.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 ut(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 ut(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._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}const _t=t=>(...e)=>{t(...e)},yt={debug:_t(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:_t(console.info),log:_t(console.log),trace:_t(console.trace),verbose:_t(console.log),warning:_t(console.warn)};function mt(){return yt}const vt="100%";class wt{pluginManager=new gt(this);_domArray=[];_eventDispatcher=new pt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0-beta.16"}addEventListener(t,e){this._eventDispatcher.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._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){await this.init();const{Container:i}=await Promise.resolve().then(function(){return Mi}),s=t.id??t.element?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:n,url:a}=t,o=a?await async function(t){const e=ot(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(mt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:n}):t.options,r=ot(o,n),{items:l}=this,c=l.findIndex(t=>t.id.description===s),h=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:r});if(c>=0){const t=this.item(c),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(c,e,h)}else l.push(h);const d=((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=u,s.body.append(n),n)})(s,t.element),g=(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=p,s.dataset[e]===u&&(s.style.width||=vt,s.style.height||=vt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f)[0];n?(s=n,s.dataset[e]=p):(s=i.createElement(f),s.dataset[e]=u,t.appendChild(s)),s.style.width||=vt,s.style.height||=vt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(d);return h.canvas.loadCanvas(g),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var Pt,bt,xt,zt,Mt,St,It,Ct;!function(t){t.circle="circle",t.rectangle="rectangle"}(Pt||(Pt={}));class Ot{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 kt extends Ot{radius;constructor(t,e,i){super(t,e,Pt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,W(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 kt||t.type===Pt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Dt||t.type===Pt.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 Dt extends Ot{size;constructor(t,e,i,s){super(t,e,Pt.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 kt)return t.intersects(this);if(!(t instanceof Dt))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"}(bt||(bt={})),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"}(zt||(zt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(St||(St={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(It||(It={})),function(t){t.easeInBack="ease-in-back",t.easeInBounce="ease-in-bounce",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInElastic="ease-in-elastic",t.easeInExpo="ease-in-expo",t.easeInGaussian="ease-in-gaussian",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInSigmoid="ease-in-sigmoid",t.easeInSine="ease-in-sine",t.easeInSmoothstep="ease-in-smoothstep",t.easeOutBack="ease-out-back",t.easeOutBounce="ease-out-bounce",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutElastic="ease-out-elastic",t.easeOutExpo="ease-out-expo",t.easeOutGaussian="ease-out-gaussian",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutSigmoid="ease-out-sigmoid",t.easeOutSine="ease-out-sine",t.easeOutSmoothstep="ease-out-smoothstep",t.easeInOutBack="ease-in-out-back",t.easeInOutBounce="ease-in-out-bounce",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutElastic="ease-in-out-elastic",t.easeInOutExpo="ease-in-out-expo",t.easeInOutGaussian="ease-in-out-gaussian",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutSigmoid="ease-in-out-sigmoid",t.easeInOutSine="ease-in-out-sine",t.easeInOutSmoothstep="ease-in-out-smoothstep"}(Ct||(Ct={}));class Ft{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){O(t)||(void 0!==t.count&&(this.count=$(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=$(t.speed)),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.delay&&(this.delay=$(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Rt extends Ft{mode;startValue;constructor(){super(),this.mode=Z.auto,this.startValue=J.random}load(t){super.load(t),O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Tt extends Ft{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),O(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=$(t.offset)))}}class At{h=new Tt(0,_);l=new Tt(0,m);s=new Tt(0,y);load(t){O(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Lt{value;constructor(){this.value=""}static create(t,e){const i=new Lt;return i.load(t),void 0!==e&&(M(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){O(t)||O(t.value)||(this.value=t.value)}}class Et extends Lt{animation;constructor(){super(),this.animation=new At}static create(t,e){const i=new Et;return i.load(t),void 0!==e&&(M(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Ut{color;image;opacity;position;repeat;size;constructor(){this.color=new Lt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){O(t)||(void 0!==t.color&&(this.color=Lt.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Vt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){O(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Bt{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){O(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class $t{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(O(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=nt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Gt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){O(t)||(void 0!==t.color&&(this.color=Et.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class Wt{offset;value;constructor(){this.offset=0,this.value=90}load(t){O(t)||(void 0!==t.offset&&(this.offset=$(t.offset)),void 0!==t.value&&(this.value=$(t.value)))}}class qt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=Y.percent,this.radius=0}load(t){O(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class jt{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){O(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=$(t.maxSpeed)))}}class Nt{value;constructor(){this.value=0}load(t){O(t)||O(t.value)||(this.value=$(t.value))}}class Zt extends Nt{animation=new Ft;load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ht extends Zt{animation;constructor(){super(),this.animation=new Rt}load(t){super.load(t)}}class Qt{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Nt,this.enable=!1,this.options={}}load(t){O(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=nt(this.options,t.options)))}}class Xt{bottom;default;left;right;top;constructor(){this.default=zt.out}load(t){O(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 Yt{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){O(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=nt({},t.position)))}}class Jt{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new Wt,this.center=new qt,this.decay=0,this.distance={},this.direction=w.none,this.drift=0,this.enable=!1,this.gravity=new jt,this.path=new Qt,this.outModes=new Xt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Yt,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(O(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=$(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=$(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Kt extends Rt{destroy;constructor(){super(),this.destroy=Q.none,this.speed=2}load(t){super.load(t),O(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class te extends Ht{animation;constructor(){super(),this.animation=new Kt,this.value=1}load(t){if(O(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ee{color;opacity;width;constructor(){this.width=0}load(t){O(t)||(void 0!==t.color&&(this.color=Et.create(this.color,t.color)),void 0!==t.width&&(this.width=$(t.width)),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class ie{color;fill;stroke;load(t){O(t)||(void 0!==t.color&&(this.color=Et.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new Gt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new ee,this.stroke.load(t.stroke)))}}class se extends Nt{constructor(){super(),this.value=1}}class ne{horizontal;vertical;constructor(){this.horizontal=new se,this.vertical=new se}load(t){O(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class ae{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(O(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class oe{mode;value;constructor(){this.mode=xt.delete,this.value=0}load(t){O(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class re{density;limit;value;constructor(){this.density=new ae,this.limit=new oe,this.value=0}load(t){O(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class le{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(O(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=nt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ce extends Rt{destroy;constructor(){super(),this.destroy=Q.none,this.speed=5}load(t){super.load(t),O(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class he extends Ht{animation;constructor(){super(),this.animation=new ce,this.value=3}load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class de extends Nt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),O(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class ue{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new ne,this.effect=new $t,this.groups={},this.move=new Jt,this.number=new re,this.opacity=new te,this.paint=new ie,this.paint.color=new Et,this.paint.color.value="#fff",this.paint.fill=new Gt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new le,this.size=new he,this.zIndex=new de}load(t){if(O(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(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]=nt(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),this.opacity.load(t.opacity);const e=t.paint;if(e&&(C(e)?this.paint=at(e,t=>{const e=new ie;return e.load(t),e}):C(this.paint)?(this.paint=new ie,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(C(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 pe(t,...e){for(const i of e)t.load(i)}function fe(t,e,...i){const s=new ue(t,e);return pe(s,...i),s}class ge{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new Ut,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Vt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=fe(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new Bt,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(O(t))return;void 0!==t.preset&&(this.preset=t.preset,at(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=$(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=$(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;z(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=nt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function _e(t,e){t.clearRect(a.x,a.y,e.width,e.height)}function ye(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const me=new Map;function ve(t,e){let i=me.get(t);if(!i){if(i=e(),me.size>=1e3){[...me.keys()].slice(0,500).forEach(t=>me.delete(t))}me.set(t,i)}return i}function we(t,e,i,s=!0){if(!e)return;const n=M(e)?{value:e}:e;if(M(n.value))return Pe(t,n.value,i,s);if(C(n.value)){const e=et(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=M(e)?{value:e}:e;if(M(n.value))return n.value===h?function(){const t=0,e=256,i=()=>Math.floor(A(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(C(n.value)){const e=et(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 be(t,e,i,n=!0){const a=we(t,e,i,n);return a?function(t){const e=t.r/g,i=t.g/g,n=t.b/g,a=Math.max(e,i,n),o=Math.min(e,i,n),r={h:0,l:(a+o)*s,s:0};a!==o&&(r.s=r.l<s?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-n)/(a-o):i===a?2+(n-e)/(a-o):4+(e-i)/(a-o));r.l*=m,r.s*=y,r.h*=60,r.h<0&&(r.h+=_);r.h>=_&&(r.h-=_);return r}(a):void 0}function xe(t){const e=(t.h%_+_)%_,i=Math.max(0,Math.min(y,t.s)),n=Math.max(0,Math.min(m,t.l)),a=e/_,o=i/y,r=n/m;if(0===i){const t=Math.round(r*g);return{r:t,g:t,b:t}}const l=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},c=r<s?r*(1+o):r+o-r*o,h=2*r-c,d=1/3,u=Math.min(g,g*l(h,c,a+d)),p=Math.min(g,g*l(h,c,a)),f=Math.min(g,g*l(h,c,a-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function ze(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?Me(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Me(t,e){return`color(display-p3 ${(t.r/g).toString()} ${(t.g/g).toString()} ${(t.b/g).toString()} / ${(e??1).toString()})`}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?function(t,e){return Me(xe(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Ie(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ce(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:_},s:{enable:!1,value:t.s,min:0,max:y},l:{enable:!1,value:t.l,min:0,max:m}};return e&&(Oe(s.h,e.h,i),Oe(s.s,e.s,i),Oe(s.l,e.l,i)),s}function Oe(t,e,s){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/i*s,t.decay=1-U(e.decay),t.status=H.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*n,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=$(e.offset)):t.velocity=0}function ke(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?E(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!==H.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=H.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=H.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=L(t.value,r,o)}function De(t,e){if(!t)return;const{h:i,s:s,l:n}=t;ke(i,!1,e),ke(s,!0,e),ke(n,!0,e)}const Fe=new wt;class Re{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:d};const n=i.circleRange;e.arc(a.x,a.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Te(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Re))})}var Ae;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ae||(Ae={}));const Le=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ee=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ue{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Le,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ee.exec(e);return i?{a:i[Ae.a]?Number.parseInt(i[Ae.a],16)/255:1,b:Number.parseInt(i[Ae.b]??"0",16),g:Number.parseInt(i[Ae.g]??"0",16),r:Number.parseInt(i[Ae.r]??"0",16)}:void 0}}async function Ve(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ue)})}var Be;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Be||(Be={}));const $e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ge{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 xe(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return xe({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=$e.exec(t);return e?function(t){const e=xe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?N(e[Be.a]):1,h:Number.parseInt(e[Be.h]??"0",10),l:Number.parseInt(e[Be.l]??"0",10),s:Number.parseInt(e[Be.s]??"0",10)}):void 0}}async function We(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ge)})}class qe{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ci});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function je(t){t.checkVersion("4.0.0-beta.16"),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,ut(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new qe(t.pluginManager))})}class Ne{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=rt(e,1);const s=e.animation;s.enable&&(t.opacity.velocity=U(s.speed)/i*this.container.retina.reduceFactor,s.sync||(t.opacity.velocity*=T()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&ct(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Ze(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ne(t)))})}class He{container;modes;_particleBouncePlugins;constructor(t){this.container=t,this.modes=[zt.bounce,zt.split],this._particleBouncePlugins=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let a=!1;for(const s of this._particleBouncePlugins)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=st(o,l),h=n.canvas.size;!function(t){if(t.outMode!==zt.bounce&&t.outMode!==zt.split||t.direction!==X.left&&t.direction!==X.right)return;t.bounds.right<0&&t.direction===X.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===X.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===X.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===X.left&&t.bounds.left<=0&&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.bounds.right>=t.canvasSize.width&&t.direction===X.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===X.left&&(t.particle.position.x=s),t.outMode===zt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,size:l}),function(t){if(t.outMode!==zt.bounce&&t.outMode!==zt.split||t.direction!==X.bottom&&t.direction!==X.top)return;t.bounds.bottom<0&&t.direction===X.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===X.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===X.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===X.top&&t.bounds.top<=0&&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.bounds.bottom>=t.canvasSize.height&&t.direction===X.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===X.top&&(t.particle.position.y=s),t.outMode===zt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,size:l})}}class Qe{container;modes;constructor(t){this.container=t,this.modes=[zt.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case It.normal:case It.outside:if(it(t.position,n.canvas.size,a,t.getRadius(),e))return;break;case It.inside:{const{dx:e,dy:i}=G(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 Xe{container;modes;constructor(t){this.container=t,this.modes=[zt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===X.left||e===X.right))??(t.options.move.distance.vertical&&(e===X.top||e===X.bottom)))return;const n=t.options.move.gravity,o=this.container,r=o.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===X.bottom||n.inverse&&i.y<-l&&e===X.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;it(t.position,o.canvas.size,a,l,e)||t.destroy()}}}const Ye=x.origin;class Je{container;modes;constructor(t){this.container=t,this.modes=[zt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case It.inside:{const{x:e,y:i}=t.velocity;Ye.setTo(a),Ye.length=t.moveCenter.radius,Ye.angle=t.velocity.angle+Math.PI,Ye.addTo(t.moveCenter);const{dx:s,dy:o}=G(t.position,Ye);if(e<=0&&s>=0||i<=0&&o>=0||e>=0&&s<=0||i>=0&&o<=0)return;t.position.x=Math.floor(E({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(E({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=G(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(it(t.position,n.canvas.size,a,t.getRadius(),e))return;switch(t.outType){case It.outside:{t.position.x=Math.floor(E({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(E({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=G(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case It.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=st(t.position,o);e===X.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===X.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===X.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===X.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class Ke{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,zt.bounce,t=>new He(t)),this._addUpdaterIfMissing(t,zt.out,t=>new Je(t)),this._addUpdaterIfMissing(t,zt.destroy,t=>new Qe(t)),this._addUpdaterIfMissing(t,zt.none,t=>new Xe(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this._updateOutMode(t,e,i.bottom??i.default,X.bottom),this._updateOutMode(t,e,i.left??i.default,X.left),this._updateOutMode(t,e,i.right??i.default,X.right),this._updateOutMode(t,e,i.top??i.default,X.top)}_addUpdaterIfMissing=(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.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ti(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ke(t)))})}class ei{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=ot(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Et.create(void 0===a?void 0:Et.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=be(this._pluginManager,i);s&&(t.fillColor=Ce(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=Et.create(void 0===a?void 0:Et.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=be(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=Ce(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)&&(De(t.fillColor,e),De(t.strokeColor,e))}}async function ii(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ei(t.pluginManager,e)))})}var si;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(si||(si={}));const ni=/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 ai{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=ni.exec(t);return e?{a:e.length>4?N(e[si.a]):1,b:parseInt(e[si.b]??"0",10),g:parseInt(e[si.g]??"0",10),r:parseInt(e[si.r]??"0",10)}:void 0}}async function oi(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ai)})}class ri{_container;constructor(t){this._container=t}init(t){const e=this._container,s=t.options.size.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/i*e.retina.reduceFactor,s.sync||(t.size.velocity*=T()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&ct(t,t.size,0,t.options.size.animation.destroy,e)}}async function li(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ri(t)))})}const ci={fpsLimit:120,background:{color:"#fff"},particles:{number:{value:100,density:{enable:!0}},paint:{fill:{color:{value:["#FF0000","#FF2A00","#FF5500","#FF8000","#FFAA00","#FFD400","#FFFF00","#D4FF00","#AAFF00","#80FF00","#55FF00","#2AFF00","#00FF00","#00FF2A","#00FF55","#00FF80","#00FFAA","#00FFD4","#00FFFF","#00D4FF","#00AAFF","#0080FF","#0055FF","#002AFF","#0000FF","#2A00FF","#5500FF","#8000FF","#AA00FF","#D400FF","#FF00FF","#FF00D4","#FF00AA","#FF0080","#FF0055","#FF002A"]},enable:!0}},shape:{type:"circle"},opacity:{value:{min:.4,max:.8}},size:{value:{min:150,max:300}},move:{enable:!0,angle:{value:30,offset:0},speed:{min:10,max:20},direction:w.top,outModes:zt.out}},detectRetina:!0},hi=["bigCircles","big-circles"];async function di(t){await t.pluginManager.register(async t=>{await async function(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(async t=>{await Promise.all([Ve(t),We(t),oi(t),je(t),Te(t),ii(t),Ze(t),ti(t),li(t)])})}(t),hi.forEach(e=>{t.pluginManager.addPreset(e,ci)})})}const ui=globalThis;ui.__tsParticlesInternals=ui.__tsParticlesInternals??{},ui.loadBigCirclesPreset=di;function pi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class fi{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{_e(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,f=this._reusableColorStyles,g=a?Se(a,r.hdr,h*d):void 0,_=o?Se(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=_,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,f,p),function(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 _={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?.(_);const y=s.effect?c.get(s.effect):void 0,m=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(y,_),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(m,_),function(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())}(m,_),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(m,_),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(y,_),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)ye(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{!function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(a.x,a.y,e.width,e.height)}(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{!function(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,a.x,a.y,e.width,e.height),t.globalAlpha=n}(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation="source-over")}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{_e(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){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)pi(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=be(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=be(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}function gi(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 _i{element;render;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new fi(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*s/t,y:i*s/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.element;if(!i)return;const s=i.style,n=we(this._pluginManager,e.color);s.backgroundColor=n?ze(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this._container;this._generated=e in t.dataset?"true"===t.dataset[e]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(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}(this.element.style);const s=this._standardSize;s.height=t.offsetHeight,s.width=t.offsetWidth;const n=this._container.retina.pixelRatio,a=this.size;t.height=a.height=s.height*n,t.width=a.width=s.width*n;const o=tt("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:o?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(this.element.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})}resize(){if(!this.element)return!1;const t=this._container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...e};e.height=i.height,e.width=i.width;const o=this.size;return this.element.width=o.width=n.width,this.element.height=o.height=n.height,this._container.started&&t.particles.setResizeFactor({width:e.width/a.width,height:e.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.element||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.element,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();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")}}};_repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&gi(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.element;t&&gi(t,ht(this._container.actualOptions.fullScreen.zIndex),!0)}}class yi{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*n)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),dt(document,"visibilitychange",e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void dt(globalThis,"resize",e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this._handleWindowResize()}),this._resizeObserver.observe(s))}}function mi(t){if(e=t.outMode,i=t.checkModes,!(e===i||C(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)}class vi{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;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=b.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this._container,i=this.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._container.dispatchEvent(ft.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??Ie(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*s}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._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??Ie(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??o),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??r,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??l,this._cachedTransform.d=e.cos*(t.d??c),this._cachedTransform}init(t,e,i,s){const n=this._container;this.id=t,this.group=s,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.outType=It.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,o=n.actualOptions,r=fe(this._pluginManager,n,o.particles),l=r.reduceDuplicates,c=r.effect.type,d=r.shape.type;this.effect=ot(c,this.id,l),this.shape=ot(d,this.id,l);const u=r.effect,p=r.shape;if(i){if(i.effect?.type){const t=ot(i.effect.type,this.id,l);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=ot(i.shape.type,this.id,l);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(T()*t.length)]}if(this.shape===h){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(T()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return nt({close:e.close},ot(n,i,s))}(this.effect,u,this.id,l):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return nt({close:e.close},ot(n,i,s))}(this.shape,p,this.id,l):void 0,r.load(i);const f=this.effectData;f&&r.load(f.particles);const g=this.shapeData;g&&r.load(g.particles),this.effectClose=f?.close??r.effect.close,this.shapeClose=g?.close??r.shape.close,this.options=r,n.retina.initParticle(this),this.size=rt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy();let _,y;n.particles.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(_=n.effectDrawers.get(this.effect)),_?.loadEffect&&_.loadEffect(this),this.shape&&(y=n.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const m=y?.getSidesCount;m&&(this.sides=m(this)),this.spawning=!1;for(const t of n.particleUpdaters)t.init(this);_?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%d,i=e<0?e+d:e;return i>=Math.PI*s&&i<3*Math.PI*s}if(this.roll.horizontal){const e=(t+Math.PI*s)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?b.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return b.create(i.x,i.y,e)}const t=j({size:l,position:s}),c=b.create(t.x,t.y,e);this._fixHorizontal(c,r,o.left??o.default),this._fixHorizontal(c,r,o.right??o.default),this._fixVertical(c,r,o.top??o.default),this._fixVertical(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const t=function(t){const e=x.origin;return e.length=1,e.angle=t,e}(this.direction).copy(),e=this.options.move;if(e.direction===w.inside||e.direction===w.outside)return t;const i=q(U(e.angle.value)),n=q(U(e.angle.offset)),a={left:n-i*s,right:n+i*s};return e.straight||(t.angle+=E($(a.left,a.right))),e.random&&"number"==typeof e.speed&&(t.length*=T()),t};_fixHorizontal=(t,e,i)=>{mi({outMode:i,checkModes:[zt.bounce],coord:t.x,maxCoord:this._container.canvas.size.width,setCb:e=>t.x+=e,radius:e})};_fixVertical=(t,e,i)=>{mi({outMode:i,checkModes:[zt.bounce],coord:t.y,maxCoord:this._container.canvas.size.height,setCb:e=>t.y+=e,radius:e})};_getRollColor=t=>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;_initPosition=t=>{const e=this._container,i=U(this.options.zIndex.value),n=this._calcPosition(t,L(i,0,e.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...lt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return q(t);switch(t){case w.top:return-Math.PI*s;case w.topRight:return-Math.PI*v;case w.right:return 0;case w.bottomRight:return Math.PI*v;case w.bottom:return Math.PI*s;case w.bottomLeft:return.75*Math.PI;case w.left:return Math.PI;case w.topLeft:return.75*-Math.PI;case w.inside:return Math.atan2(i.y-e.y,i.x-e.x);case w.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*d}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case w.inside:this.outType=It.inside;break;case w.outside:this.outType=It.outside}this.offset=x.origin}}class wi{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.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._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new kt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Dt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(t){if(t instanceof kt){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 Dt){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}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class Pi{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_maxZIndex;_minZIndex;_needsSort;_nextId;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zArray;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._minZIndex=0,this._maxZIndex=0,this.grid=new wi(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,a=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,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._pool.pop()??new vi(this._pluginManager,this._container);n.init(this._nextId,t,e,i);let a=!0;return s&&(a=s(n)),a?(this._array.push(n),this._zArray.push(n),this._nextId++,this._container.dispatchEvent(ft.particleAdded,{particle:n}),n):void this._pool.push(n)}catch(t){mt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._pool.length=0,this._zArray=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this._minZIndex=0,this._maxZIndex=0,this._needsSort=!1,this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this.grid=new wi(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.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._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=fe(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setLastZIndex(t){this._needsSort||=t>=this._maxZIndex||t>this._minZIndex&&t<this._maxZIndex}setResizeFactor(t){this._resizeFactor=t}update(t){const e=new Set;this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const i=this._resizeFactor;for(const s of this._array){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._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}for(const e of this._postUpdatePlugins)e.postUpdate?.(t);for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(i.destroyed||i.spawning)i.destroyed&&e.add(i);else for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t)}if(e.size)for(const t of e)this.remove(t);if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort((t,e)=>e.position.z-t.position.z||t.id-e.id);const e=t[0],i=t[t.length-1];if(!e||!i)return;this._maxZIndex=e.position.z,this._minZIndex=i.position.z,this._needsSort=!1}}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(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._limit=n.limit.value*a:this._groupLimits.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)};_initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)};_removeParticle=(t,e,i)=>{const s=this._array[t];if(!s)return!1;if(s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(n,1),s.destroy(i),this._container.dispatchEvent(ft.particleRemoved,{particle:s}),this._addToPool(s),!0}}class bi{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}}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,a.sizeAnimationSpeed=U(e.size.animation.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 xi(t){return!t.destroyed}function zi(t,e,...i){const s=new ge(t,e);return pe(s,...i),s}var Mi=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this._pluginManager=i,this._dispatchCallback=e,this._onDestroy=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new bi(this),this.canvas=new _i(this._pluginManager,this),this.particles=new Pi(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=zi(this._pluginManager,this),this.actualOptions=zi(this._pluginManager,this),this._eventListeners=new yi(this),this.dispatchEvent(ft.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&xi(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(t=!0){if(xi(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._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(t),this.dispatchEvent(ft.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!xi(this))return;let e=t;this._drawAnimationFrame=F(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}mt().error(`Export plugin with type ${t} not found`)}async init(){if(!xi(this))return;const t=new Map;for(const e of this._pluginManager.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this._options=zi(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=zi(this._pluginManager,this,this._options),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:a,smooth:o,zLayers:r}=this.actualOptions;this.hdr=a,this.zLayers=r,this._duration=U(i)*n,this._delay=U(e)*n,this._lifeTime=0,this.fpsLimit=s>0?s:120,this._smooth=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ft.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ft.particlesSetup)}async initDrawersAndUpdaters(){const t=this._pluginManager;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(xi(this)&&(void 0!==this._drawAnimationFrame&&(t=this._drawAnimationFrame,R(t),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(ft.containerPaused)}}play(t){if(!xi(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ft.containerPlay),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(xi(this))return this.stop(),this.start()}async reset(t){if(xi(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=zi(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=zi(this._pluginManager,this,this._options),this.refresh()}async start(){xi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ft.containerStarted),this.play(),t()};this._delayTimeout=setTimeout(()=>{e()},this._delay)}))}stop(){if(xi(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(ft.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+n/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/n}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>n)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){mt().error("error in animation loop",t)}}}});function Si(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=L(t.velocity.x,-1,1),t.velocity.y=L(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 Ii(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(W(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?bt.clockwise:bt.counterClockwise,angle:T()*d,radius:o,acceleration:e.retina.spinAcceleration}}var Ci=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=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)*n,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},Ii(this._container,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options,n=i.move;if(!n.enable)return;const a=this._container,o=a.retina.pixelRatio,r=function(t){return t.slow.inRange?t.slow.factor:1}(t),l=a.retina.reduceFactor,c=t.retina.moveSpeed,h=t.retina.moveDrift,d=B(i.size.value)*o,u=c*(n.size?t.getRadius()/d:1)*r*(e.factor||1)*s,p=t.retina.maxSpeed;n.spin.enable?function(t,e,i,n){if(!e.spin)return;const a=e.spin.direction===bt.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)*n,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*n,e.spin.radius+=e.spin.acceleration*n;const r=Math.max(t.canvas.size.width,t.canvas.size.height),l=r*s;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)}(a,t,u,l):Si(t,n,u,p,h,l,e),function(t){const e=t.initialPosition,{dx:i,dy:n}=G(e,t.position),a=Math.abs(i),o=Math.abs(n),{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*s-t.velocity.x),c&&(t.velocity.y=t.velocity.x*s-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*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});t.loadBigCirclesPreset=di,t.tsParticles=Fe}),Object.assign(globalThis.window||globalThis,{loadBigCirclesPreset:(globalThis.__tsParticlesInternals.presets.bigCircles||{}).loadBigCirclesPreset}),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.0.0-beta.
|
|
2
|
+
/* Preset v4.0.0-beta.16 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/engine'], factory) :
|