@tsparticles/preset-fountain 4.2.1 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -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.fountain=t.__tsParticlesInternals.presets.fountain||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",y=255,m=360,v=100,w=100,P=.25;var b;function x(t){return"z"in t?t.z:o.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(b||(b={}));class z{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??o.y,i??o.z):new z(t.x,t.y,x(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends z{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return M.create(o.x,o.y)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??o.y):new M(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function k(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function D(t){return null==t}const _=Math.PI/180;let E=Math.random;const R=t=>requestAnimationFrame(t),L=t=>{cancelAnimationFrame(t)};function F(){return A(E(),0,1-Number.EPSILON)}function T(t,e){return F()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function B(t){const e=$(t);let i=V(t);return e===i&&(i=0),T(i,e)}function U(t){return k(t)?t:B(t)}function V(t){return k(t)?t:t.min}function $(t){return k(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&k(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*_}function H(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??F()*s)*t.size.width/s,y:(t.position?.y??F()*s)*t.size.height/s}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function tt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(et(t,s??0),e,i,n)}function et(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function it(t,...e){for(const i of e){if(D(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return O(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>it(void 0,t)):it(e[n],a)}}return t}function st(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function nt(t,e,i){return I(t)?J(t,e,i):t}function at(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let ot,rt;function lt(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ct(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class ht{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var dt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(dt||(dt={}));class ut{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(dt.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return ct(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const pt=t=>(...e)=>{t(...e)},ft={debug:pt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:pt(console.info),log:pt(console.log),trace:pt(console.trace),verbose:pt(console.log),warning:pt(console.warn)};function gt(){return ft}const yt="100%";class mt{pluginManager=new ut(this);#h=[];#d=new ht;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return ls}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=nt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(gt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=nt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var vt,wt,Pt,bt,xt,zt,Mt,Ct,St,kt,Ot;!function(t){t.circle="circle",t.rectangle="rectangle"}(vt||(vt={}));class It{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Dt extends It{radius;constructor(t,e,i){super(t,e,vt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Dt||t.type===vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof _t||t.type===vt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class _t extends It{size;constructor(t,e,i,s){super(t,e,vt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Dt)return t.intersects(this);if(!(t instanceof _t))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(wt||(wt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Pt||(Pt={})),function(t){t.delete="delete",t.wait="wait"}(bt||(bt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(xt||(xt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(zt||(zt={})),function(t){t.none="none",t.max="max",t.min="min"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ct||(Ct={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(St||(St={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Ot||(Ot={}));class Et{load(t){D(t)||this.doLoad(t)}}function Rt(t,...e){for(const i of e)t.load(i)}function Lt(t,e,i){void 0!==i&&(t[e]=i)}function Ft(t,e,i){void 0!==i&&(t[e]=G(i))}function Tt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Bt extends Et{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ft(this,"count",t.count),Lt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Ft(this,"delay",t.delay),Lt(this,"sync",t.sync)}}class Ut extends Bt{mode=Pt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Lt(this,"mode",t.mode),Lt(this,"startValue",t.startValue)}}class Vt extends Bt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Lt(this,"max",t.max),Lt(this,"min",t.min),Ft(this,"offset",t.offset)}}class $t extends Et{h=new Vt(0,m);l=new Vt(0,w);s=new Vt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Gt extends Et{value="";static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){D(t.value)||(this.value=t.value)}}class Wt extends Gt{animation=new $t;static create(t,e){const i=new Wt;return i.load(t),void 0!==e&&(S(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class jt extends Et{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Gt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Lt(this,"image",t.image),Lt(this,"position",t.position),Lt(this,"repeat",t.repeat),Lt(this,"size",t.size),Lt(this,"opacity",t.opacity)}}class qt extends Et{enable=!0;zIndex=0;doLoad(t){Lt(this,"enable",t.enable),Lt(this,"zIndex",t.zIndex)}}class Ht extends Et{delay=.5;enable=!0;doLoad(t){Lt(this,"delay",t.delay),Lt(this,"enable",t.enable)}}class Nt extends Et{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Lt(this,"close",t.close),Lt(this,"type",t.type)}}class Xt extends Et{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Lt(this,"enable",t.enable),Ft(this,"opacity",t.opacity)}}class Yt extends Et{offset=0;value=90;doLoad(t){Ft(this,"offset",t.offset),Ft(this,"value",t.value)}}class Qt extends Et{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Lt(this,"x",t.x),Lt(this,"y",t.y),Lt(this,"mode",t.mode),Lt(this,"radius",t.radius)}}class Kt extends Et{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ft(this,"acceleration",t.acceleration),Lt(this,"enable",t.enable),Lt(this,"inverse",t.inverse),Ft(this,"maxSpeed",t.maxSpeed)}}class Zt extends Et{value=0;doLoad(t){D(t.value)||(this.value=G(t.value))}}class Jt extends Zt{animation=new Bt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class te extends Jt{animation=new Ut}class ee extends Et{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Lt(this,"clamp",t.clamp),this.delay.load(t.delay),Lt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=it(this.options,t.options))}}class ie extends Et{bottom;default=xt.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class se extends Et{acceleration=0;enable=!1;position;doLoad(t){Ft(this,"acceleration",t.acceleration),Lt(this,"enable",t.enable),t.position&&(this.position=it({},t.position))}}class ne extends Et{angle=new Yt;center=new Qt;decay=0;direction=b.none;distance={};drift=0;enable=!1;gravity=new Kt;outModes=new ie;path=new ee;random=!1;size=!1;speed=2;spin=new se;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ft(this,"decay",t.decay),Lt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ft(this,"drift",t.drift),Lt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Lt(this,"random",t.random),Lt(this,"size",t.size),Ft(this,"speed",t.speed),this.spin.load(t.spin),Lt(this,"straight",t.straight),Lt(this,"vibrate",t.vibrate),Lt(this,"warp",t.warp)}}class ae extends Et{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Ft(this,"width",t.width),Ft(this,"opacity",t.opacity)}}class oe extends Et{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Tt(this,"fill",t.fill,()=>new Xt),Tt(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Et{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Et{enable=!1;height=1080;width=1920;doLoad(t){Lt(this,"enable",t.enable),Lt(this,"width",t.width),Lt(this,"height",t.height)}}class he extends Et{mode=bt.delete;value=0;doLoad(t){Lt(this,"mode",t.mode),Lt(this,"value",t.value)}}class de extends Et{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Lt(this,"value",t.value)}}class ue extends Et{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Lt(this,"close",t.close),Lt(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Lt(this,"opacityRate",t.opacityRate),Lt(this,"sizeRate",t.sizeRate),Lt(this,"velocityRate",t.velocityRate)}}class fe extends Et{bounce=new le;effect=new Nt;groups={};move=new ne;number=new de;paint;palette;reduceDuplicates=!1;shape=new ue;zIndex=new pe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new oe,this.paint.color=new Wt,this.paint.color.value="#fff",this.paint.fill=new Xt,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=it(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=st(e,t=>{const e=new oe;return e.load(t),e}):I(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function ge(t,e,...i){const s=new fe(t,e);return Rt(s,...i),s}class ye extends Et{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new jt,this.fullScreen=new qt,this.particles=ge(this.#p,this.#u),this.resize=new Ht}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,st(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Lt(this,"autoPlay",t.autoPlay),Lt(this,"clear",t.clear),Lt(this,"key",t.key),Lt(this,"name",t.name),Ft(this,"delay",t.delay),Lt(this,"detectRetina",t.detectRetina),Ft(this,"duration",t.duration),Lt(this,"fpsLimit",t.fpsLimit),Lt(this,"hdr",t.hdr),Lt(this,"pauseOnBlur",t.pauseOnBlur),Lt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Lt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=it(this.style,t.style),Lt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const me=new Map;function ve(t,e){let i=me.get(t);return i||(i=e(),me.size>2e3&&me.clear(),me.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Pe(t,n.value,i,s);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return we(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Pe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(T(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function be(t,e,i,s=!0){const a=we(t,e,i,s);return a?function(t){const e=t.r/y,i=t.g/y,s=t.b/y,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o));r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=m);r.h>=m&&(r.h-=m);return r}(a):void 0}function xe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ze(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/m,o=i/v,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(y,y*xe(c,l,a+h)),u=Math.min(y,y*xe(c,l,a)),p=Math.min(y,y*xe(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Me(t,e,i){const s=i??1;return ve(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ce(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?Me(ze(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Se(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};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,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=Ot.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function Ie(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?B(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==Ot.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=Ot.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Ot.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=A(t.value,r,o)}function De(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Ie(i,!1,e),Ie(s,!0,e),Ie(n,!0,e)}const _e=new mt;class Ee{enable=!1;mode="destination-out";load(t){D(t)||(Lt(this,"mode",t.mode),Lt(this,"enable",t.enable))}}class Re{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return cs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Ee),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Ee,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Le(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Re)})}class Fe{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=O(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Te(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Fe))})}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 Be=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ue=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ve{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Be,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ue.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 $e(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}var Ge;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ge||(Ge={}));const We=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class je{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=We.exec(t);return e?function(t){const e=ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[Ge.a]):1,h:Number.parseInt(e[Ge.h]??"0",10),l:Number.parseInt(e[Ge.l]??"0",10),s:Number.parseInt(e[Ge.s]??"0",10)}):void 0}}async function qe(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new je)})}class He{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return us});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ne(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new He(t.pluginManager))})}function Xe(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:$(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Pt.increase:o.status=Ot.increasing;break;case Pt.decrease:o.status=Ot.decreasing;break;case Pt.random:o.status=F()>=n?Ot.increasing:Ot.decreasing}const t=s.mode===Pt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=Ot.increasing);break;case kt.max:o.value=o.max,t&&(o.status=Ot.decreasing);break;case kt.random:default:o.value=B(o),t&&(o.status=F()>=n?Ot.increasing:Ot.decreasing)}}return o.initialValue=o.value,o}function Ye(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case Ot.increasing:e.value+=a;break;case Ot.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Ot.increasing:e.value>=r&&(e.status=Ot.decreasing,e.loops??=0,e.loops++);break;case Ot.decreasing:e.value<=o&&(e.status=Ot.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Mt.max:i>=n&&t.destroy();break;case Mt.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class Qe extends Ut{destroy=Mt.none;load(t){super.load(t),D(t)||Lt(this,"destroy",t.destroy)}}class Ke extends te{animation=new Qe;value=1;load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ze{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Xe(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){At(t,"opacity",Ke,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ye(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Je(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ze(t)))})}class ti{modes;#u;#m;constructor(t){this.#u=t,this.modes=[xt.bounce,xt.split],this.#m=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#m)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=et(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class ei{modes;constructor(t){this.modes=[xt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case St.normal:case St.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case St.inside:{const{dx:e,dy:i}=W(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 ii{modes;#u;constructor(t){this.#u=t,this.modes=[xt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;tt(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const si=M.origin;class ni{modes;#u;constructor(t){this.#u=t,this.modes=[xt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case St.inside:{const{x:e,y:i}=t.velocity;si.setTo(o),si.length=t.moveCenter.radius,si.angle=t.velocity.angle+Math.PI,si.addTo(t.moveCenter);const{dx:s,dy:a}=W(t.position,si);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(B({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(B({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=W(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case St.outside:{t.position.x=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case St.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=et(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,xt.bounce,t=>new ti(t)),this.#v(t,xt.out,t=>new ni(t)),this.#v(t,xt.destroy,t=>new ei(t)),this.#v(t,xt.none,t=>new ii(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function oi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ai(t)))})}class ri{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=nt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Wt.create(void 0===a?void 0:Wt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=be(this.#p,i);s&&(t.fillColor=ke(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=Wt.create(void 0===a?void 0:Wt.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.#p,i)??t.getFillColor();s&&(t.strokeColor=ke(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 li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ri(t.pluginManager,e)))})}var ci;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ci||(ci={}));const hi=/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 di{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=hi.exec(t);return e?{a:e.length>4?X(e[ci.a]):1,b:parseInt(e[ci.b]??"0",10),g:parseInt(e[ci.g]??"0",10),r:parseInt(e[ci.r]??"0",10)}:void 0}}async function ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi extends Ut{destroy=Mt.none;load(t){super.load(t),D(t)||Lt(this,"destroy",t.destroy)}}class fi extends te{animation=new pi;value=3;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class gi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){At(t,"size",fi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Xe(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ye(t,t.size,0,t.options.size.animation.destroy,e)}}async function yi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new gi(t)))})}async function mi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Le(t),$e(t),qe(t),ui(t),Ne(t),Te(t),li(t),Je(t),oi(t),yi(t)])})}class vi{bottom;left;right;top;load(t){D(t)||(Ft(this,"bottom",t.bottom),Ft(this,"left",t.left),Ft(this,"right",t.right),Ft(this,"top",t.top))}}var wi;!function(t){t.explode="explode",t.none="none",t.split="split"}(wi||(wi={}));class Pi{maxSizeFactor=3;speed=2;load(t){D(t)||(Lt(this,"maxSizeFactor",t.maxSizeFactor),Lt(this,"speed",t.speed))}}class bi extends Zt{value=3}class xi extends Zt{value={min:4,max:9}}class zi{count=1;factor=new bi;fillColor;fillColorOffset;particles;rate=new xi;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){D(t)||(void 0!==t.fillColor&&(this.fillColor=Gt.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=Gt.create(this.strokeColor,t.strokeColor)),Lt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=st(t.particles,t=>it({},t)),Lt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class Mi{bounds=new vi;explode=new Pi;mode=wi.none;split=new zi;load(t){D(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function Ci(t,e,i,s){return t&&s?function(t,e){const i=U(e.h??0),s=U(e.s??0),n=U(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return Wt.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?Wt.create(void 0,e):i?Wt.create(void 0,i):s?function(t){return Wt.create(void 0,{value:{hsl:t}})}(s):void 0}function Si(t,e,i,s){const n=i.options.destroy;if(!n)return;const a=n.split,o=ge(t,e,i.options),r=nt(a.fillColor),l=nt(a.strokeColor),c=i.getFillColor(),h=i.getStrokeColor();o.move.load({center:{x:i.position.x,y:i.position.y,mode:Q.precise}});const d=1/U(a.factor.value),u=o.size;u&&(k(u.value)?u.value*=d:(u.value.min*=d,u.value.max*=d)),o.load(s);const p=nt(o.paint),f=p?.fill,g=p?.stroke,y=Ci(a.fillColorOffset,r,f?.color,c),m=Ci(a.strokeColorOffset,l,g?.color,h);y&&f&&(f.color=y),m&&g&&(g.color=m);const v=a.sizeOffset?G(-i.size.value,i.size.value):0,w={x:i.position.x+B(v),y:i.position.y+B(v)};return e.particles.addParticle(w,o,i.group,t=>!(t.size.value<.5)&&(t.velocity.length=B(G(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class ki{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:a,left:o,right:r,top:l}=n,{destroyBounds:c}=t,h=e.canvas.size;a&&(c.bottom=U(a)*h.height/s),o&&(c.left=U(o)*h.width/s),r&&(c.right=U(r)*h.width/s),l&&(c.top=U(l)*h.height/s)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){At(t,"destroy",Mi,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case wi.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=U(n.rate.value),o=nt(n.particles);for(let s=0;s<a;s++)Si(t,e,i,o)}(this.#p,this.#u,t);break;case wi.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Oi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new ki(t.pluginManager,e)))})}class Ii{count;delay;duration;wait=!1;load(t){D(t)||(Lt(this,"count",t.count),Ft(this,"delay",t.delay),Ft(this,"duration",t.duration),Lt(this,"wait",t.wait))}}class Di{delay=.1;quantity=1;load(t){D(t)||(Ft(this,"quantity",t.quantity),Ft(this,"delay",t.delay))}}class _i{color=!1;opacity=!1;load(t){D(t)||(Lt(this,"color",t.color),Lt(this,"opacity",t.opacity))}}class Ei{options={};replace=new _i;type="square";load(t){D(t)||(void 0!==t.options&&(this.options=it({},t.options??{})),this.replace.load(t.replace),Lt(this,"type",t.type))}}class Ri{height=0;mode=Q.percent;width=0;load(t){D(t)||(Lt(this,"mode",t.mode),Lt(this,"height",t.height),Lt(this,"width",t.width))}}class Li{fill;stroke;load(t){D(t)||(t.fill&&(this.fill??=new Xt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class Fi{autoPlay=!0;direction;domId;fill=!0;life=new Ii;name;particles;position;rate=new Di;shape=new Ei;size;spawn=new Li;spawnFillColor;spawnStrokeColor;startCount=0;load(t){D(t)||(Lt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Ri,this.size.load(t.size)),Lt(this,"direction",t.direction),Lt(this,"domId",t.domId),Lt(this,"fill",t.fill),this.life.load(t.life),Lt(this,"name",t.name),this.particles=st(t.particles,t=>it({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new Wt,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new Wt,this.spawnStrokeColor.load(t.spawnStrokeColor)),Lt(this,"startCount",t.startCount))}}class Ti{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return ps});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=st(i.emitters,t=>{const e=new Fi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const Ai=new WeakMap;var Bi;async function Ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ai.get(e);return i||(i=Promise.resolve().then(function(){return ys}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ai.delete(e),t}),Ai.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return gs}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ti(e))})}!function(t){t.emitter="emitter"}(Bi||(Bi={}));class Vi{color;image;load(t){D(t)||(void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Lt(this,"image",t.image))}}class $i{enable=!1;fill=new Vi;length=10;load(t){D(t)||(Lt(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),Lt(this,"length",t.length))}}class Gi{id="trail";#p;constructor(t){this.#p=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return ms});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.trail;s?.load||(e.trail=s=new $i),s.load(i?.trail)}needsPlugin(){return!0}}async function Wi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Gi(t.pluginManager))})}const ji={fpsLimit:120,particles:{bounce:{vertical:{value:{min:.75,max:.85}}},paint:{fill:{color:{value:["#3998D0","#2EB6AF","#A9BD33","#FEC73B","#F89930","#F45623","#D62E32","#EB586E","#9952CF"]},enable:!0}},number:{value:0},destroy:{mode:"split",split:{count:2,factor:{value:{min:1.1,max:2}},rate:{value:{min:2,max:3}}}},opacity:{value:.5},size:{value:{min:10,max:20}},move:{enable:!0,gravity:{enable:!0,maxSpeed:50},speed:{min:10,max:20},direction:b.none,random:!1,straight:!1,outModes:{bottom:xt.split,default:xt.bounce,top:xt.none}}},detectRetina:!0,background:{color:"#fff"},emitters:{direction:b.top,life:{count:0,duration:.15,delay:3},rate:{delay:.1,quantity:5},size:{width:0,height:0}},trail:{enable:!0,fill:{color:"#fff"},length:3}};async function qi(t){await t.pluginManager.register(async t=>{await Promise.all([mi(t),Oi(t),Ui(t),Wi(t)]),t.pluginManager.addPreset("fountain",ji)})}const Hi=globalThis;Hi.loadFountainPreset=qi,Hi.tsParticles=_e;function Ni(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Xi{#b;#x;#z;#M;#C;#u;#S;#k;#O;#I;#D;#_;#E;#R;#p;#L;#F;#T={};#A=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#x=i,this.#S=null,this.#F=[],this.#L=[],this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#O=[],this.#I=[],this.#D=[],this.#_=[],this.#R=[],this.#E=[]}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}clear(){let t=!1;for(const e of this.#b)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#F=[],this.#L=[],this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#O=[],this.#I=[],this.#D=[],this.#_=[],this.#R=[],this.#E=[]}draw(t){const e=this.#S;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#T,g=a?Ce(a,r.hdr,h*d):void 0,y=o?Ce(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#D)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,d,f,p),this.#$({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#R)e.drawSettingsSetup?.(i,t);for(const e of this.#_)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#M)e.clearDraw?.(i,t);for(const e of this.#E)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#O=[],this.#D=[],this.#I=[],this.#_=[],this.#R=[],this.#E=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.canvasClear&&this.#b.push(t),t.canvasPaint&&this.#z.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#D.push(t),t.drawParticleCleanup&&this.#I.push(t),t.draw&&this.#_.push(t),t.drawSettingsSetup&&this.#R.push(t),t.drawSettingsCleanup&&this.#E.push(t),t.clearDraw&&this.#M.push(t)}initUpdaters(){this.#F=[],this.#L=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#L.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#F.push(t)}paint(){let t=!1;for(const e of this.#z)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,o.x,o.y,this.#x.size.width,this.#x.size.height),i.globalAlpha=s})}setContext(t){this.#S=t,this.#S&&(this.#S.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}#G(t){for(const e of this.#L)e.afterDraw?.(t)}#V(t,e,i,s,n,a){for(const o of this.#F){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Ni(a,t,e)}o.beforeDraw?.(e)}}#j(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#$(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 y={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?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#q(m,y),this.#H(v,y),this.#N(v,y),this.#X(v,y),this.#j(m,y),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#N(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#H(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=be(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=be(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#A[0]=e,this.#A[1]=i,this.#A}}const Yi=new WeakMap;function Qi(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 Ki{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Q;#K;#p;#Z;#J;#tt;#et;constructor(t,e){this.#p=t,this.#u=e,this.render=new Xi(t,e,this),this.#tt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#tt;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#J=[],this.#Z="none"}get#it(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#st();this.render.destroy(),this.#J=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#et?this.#et:{x:e*n/t,y:i*n/t}}init(){this.#nt(t=>{t.disconnect()}),this.#Q=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#at()}),this.resize(),this.#ot(),this.initBackground(),this.#nt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=we(this.#p,e.color);s.backgroundColor=n?Me(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#J=[];for(const t of this.#u.plugins)t.resize&&this.#J.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Yi.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Yi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#K=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#tt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#tt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Z=t,this.#at())}setZoom(t,e){this.zoom=t,this.#et=e}stop(){this.#nt(t=>{t.disconnect()}),this.#Q=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#lt(),e&&await t.refresh()}#lt(){for(const t of this.#J)t.resize?.()}#rt(){const t=this.#u.actualOptions.hdr&&Z("(color-gamut: p3)")?.matches&&Z("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ot(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#it?this.#ct():this.#st();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#at(){const t=this.domElement;if(!t)return;this.#nt(t=>{t.disconnect()}),this.#ot(),this.initBackground();const e=this.#Z;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#nt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#st(){const t=this.domElement,e=this.#K;t&&e&&Qi(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&Qi(t,function(t){if(ot!==t||!rt){ot=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}rt=e}return rt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Zi{#u;#ht;#dt;#ut;constructor(t){this.#u=t,this.#ht={visibilityChange:()=>{this.#pt()},resize:()=>{this.#ft()}}}addListeners(){this.#gt(!0)}removeListeners(){this.#gt(!1)}#pt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ft(){this.#ut&&(clearTimeout(this.#ut),this.#ut=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ut=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#gt(t){const e=this.#ht;this.#yt(t),lt(document,"visibilitychange",e.visibilityChange,t,!1)}#yt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void lt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#dt&&!t?(s&&this.#dt.unobserve(s),this.#dt.disconnect(),this.#dt=void 0):!this.#dt&&t&&s&&(this.#dt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#ft()}),this.#dt.observe(s))}}function Ji(t){if(e=t.outMode,i=t.checkModes,!(e===i||I(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function ts(t,e){const i=t%e;return i<0?i+e:i}function es(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=nt(n.effect.type,t.id,a),t.shape=nt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=nt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=nt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class is{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;#mt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=z.origin;#wt={sin:0,cos:0};#Pt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(dt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#bt(this.bubble.color??Se(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#mt.fillOpacity=i*s*e,this.#mt.opacity=i*e,this.#mt.strokeOpacity=i*n*e,this.#mt}getPosition(){return this.#vt.x=this.position.x+this.offset.x,this.#vt.y=this.position.y+this.offset.y,this.#vt.z=this.position.z,this.#vt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#bt(this.bubble.color??Se(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??r),this.#Pt.b=i?e.sin*(t.b??1):t.b??l,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c,this.#Pt.d=e.cos*(t.d??h),this.#Pt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=St.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=es(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#xt(e),this.initialVelocity=this.#zt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#Mt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Mt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=ts(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=ts(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ts(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ct(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=N({size:l,position:s}),c=z.create(t.x,t.y,e);this.#St(c,r,o.left??o.default),this.#St(c,r,o.right??o.default),this.#kt(c,r,o.top??o.default),this.#kt(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#zt(){const t=this.options.move,e=function(t){const e=M.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===b.inside||t.direction===b.outside)return e;const i=q(U(t.angle.value)),s=q(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=B(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#St(t,e,i){Ji({outMode:i,checkModes:[xt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#kt(t,e,i){Ji({outMode:i,checkModes:[xt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ot(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===xt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#It(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Mt(t){const e=this.#Ot(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#It(t.direction,t.outMode),l=a?this.#Dt(a(r),"shape"):void 0,c=o?this.#Dt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#bt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===zt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#xt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ct(t,A(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...at(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(k(t))return q(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*P;case b.right:return 0;case b.bottomRight:return Math.PI*P;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=St.inside;break;case b.outside:this.outType=St.outside}this.offset=M.origin}#Dt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class ss{#_t;#Et=new Map;#Rt=[];#Lt;#Ft;#Tt=[];#At;constructor(t){this.#_t=t,this.#Lt=0,this.#At=0}clear(){this.#Et.clear();const t=this.#Ft;t&&(this.#_t=t),this.#Ft=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Bt(e,i);this.#Et.has(s)||this.#Et.set(s,[]),this.#Et.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Ut(t);if(!s)return i;const n=Math.floor(s.minX/this.#_t),a=Math.floor(s.maxX/this.#_t),o=Math.floor(s.minY/this.#_t),r=Math.floor(s.maxY/this.#_t);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Et.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Vt(t.x,t.y,e),a=this.query(n,i,s);return this.#$t(),a}queryRectangle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#$t(),a}setCellSize(t){this.#Ft=t}#Vt(t,e,i){return(this.#Rt[this.#Lt++]??=new Dt(t,e,i)).reset(t,e,i)}#Gt(t,e,i,s){return(this.#Tt[this.#At++]??=new _t(t,e,i,s)).reset(t,e,i,s)}#Bt(t,e){return`${Math.floor(t/this.#_t)}_${Math.floor(e/this.#_t)}`}#Ut(t){if(t instanceof Dt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof _t){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#$t(){this.#Lt=0,this.#At=0}}class ns{checkParticlePositionPlugins;grid;#Wt;#u;#jt;#qt;#Ht;#Nt;#Xt;#Yt;#p;#Qt;#Kt;#Zt;#Jt;#te;#ee;constructor(t,e){this.#p=t,this.#u=e,this.#Ht=0,this.#Wt=[],this.#Qt=[],this.#qt=0,this.#jt=new Map,this.#Nt=new Map,this.#ee=this.#ie(this.#u.zLayers),this.grid=new ss(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}get count(){return this.#Wt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#jt.get(i)??this.#qt,o=this.count;if(a>0)switch(n){case bt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case bt.wait:if(o>=a)return}try{const n=this.#Qt.pop()??new is(this.#p,this.#u);n.init(this.#Ht,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Wt.push(n),this.#se(n),this.#Ht++,this.#u.dispatchEvent(dt.particleAdded,{particle:n}),n):void this.#Qt.push(n)}catch(t){gt().warning(`error adding particle: ${t}`)}}clear(){this.#Wt=[],this.#Nt.clear(),this.#ne(this.#u.zLayers)}destroy(){this.#Wt=[],this.#Qt.length=0,this.#Nt.clear(),this.#ee=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}drawParticles(t){for(let e=this.#ee.length-1;e>=0;e--){const i=this.#ee[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Wt.filter(t)}find(t){return this.#Wt.find(t)}get(t){return this.#Wt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#te=[],this.#Yt=[],this.#Zt=[],this.#Xt=[],this.#Kt=[],this.#Nt.clear(),this.#ne(t.zLayers),this.grid=new ss(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#te.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#Zt.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Kt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Wt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#ae(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=ge(this.#p,this.#u,s);this.#oe(n,i,t)}this.#oe(t.particles,i)}setResizeFactor(t){this.#Jt=t}update(t){this.grid.clear();for(const e of this.#te)e.update?.(t);const e=this.#re(t);for(const e of this.#Zt)e.postUpdate?.(t);if(this.#le(t,e),e.size)for(const t of e)this.remove(t);this.#Jt=void 0}#ce(...t){this.#Qt.push(...t)}#oe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#qt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#jt.set(i,s?.number.limit.value??n.limit.value));const a=this.#he(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#qt=n.limit.value*a:this.#jt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ie(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#de(t){const e=this.#ee.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#he(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#se(t){const e=this.#de(t.position.z),i=this.#ee[e];i&&(i.push(t),this.#Nt.set(t.id,e))}#ae(t,e,i){const s=this.#Wt[t];return!!s&&(s.group===e&&(this.#Wt.splice(t,1),this.#ue(s),s.destroy(i),this.#u.dispatchEvent(dt.particleRemoved,{particle:s}),this.#ce(s),!0))}#ue(t){const e=this.#Nt.get(t.id)??this.#de(t.position.z),i=this.#ee[e];if(!i)return void this.#Nt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Nt.delete(t.id)}#ne(t){const e=Math.max(Math.floor(t),1);if(this.#ee.length===e)for(const t of this.#ee)t.length=0;else this.#ee=this.#ie(e)}#pe(t){const e=this.#de(t.position.z),i=this.#Nt.get(t.id);if(void 0===i)return void this.#se(t);if(i===e)return;const s=this.#ee[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ee[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Nt.set(t.id,e)}else this.#Nt.set(t.id,e)}#re(t){const e=new Set,i=this.#Jt;for(const s of this.#Wt){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#le(t,e){for(const i of this.#Wt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Kt)e.postParticleUpdate?.(i,t);this.#pe(i)}}}class as{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function os(t){return!t.destroyed}function rs(t,e,...i){const s=new ye(t,e);return Rt(s,...i),s}var ls=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#fe;#ge;#ye={value:0,factor:0};#me;#ve;#we;#Pe;#be;#xe;#ze;#Me;#Ce;#Se;#ke;#p;#Oe;#Ie;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#me=e,this.#Ce=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Oe=!1,this.#fe=0,this.#we=0,this.#Me=0,this.#be=!0,this.started=!1,this.destroyed=!1,this.#ke=!0,this.#ze=0,this.zLayers=100,this.pageHidden=!1,this.#Ie=a,this.#xe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new as(this),this.canvas=new Ki(this.#p,this),this.particles=new ns(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Se=rs(this.#p,this),this.actualOptions=rs(this.#p,this),this.#Pe=new Zi(this),this.dispatchEvent(dt.containerBuilt)}get animationStatus(){return!this.#ke&&!this.pageHidden&&os(this)}get options(){return this.#Se}get sourceOptions(){return this.#Ie}addLifeTime(t){this.#Me+=t}alive(){return!this.#we||this.#Me<=this.#we}destroy(t=!0){if(os(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Ce(t),this.dispatchEvent(dt.containerDestroyed)}}dispatchEvent(t,e){this.#me(t,{container:this,data:e})}draw(t){if(!os(this))return;let e=t;this.#ve=R(t=>{e&&(this.#ze=void 0,e=!1),this.#De(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}gt().error(`Export plugin with type ${t} not found`)}async init(){if(!os(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Se=rs(this.#p,this,this.#xe,this.sourceOptions),this.actualOptions=rs(this.#p,this,this.#Se),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,hdr:n,smooth:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#we=U(i)*a,this.#fe=U(e)*a,this.#Me=0,this.fpsLimit=s>0?s:120,this.#Oe=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(dt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(dt.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(os(this)&&(void 0!==this.#ve&&(t=this.#ve,L(t),this.#ve=void 0),!this.#ke)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ke=!0),this.dispatchEvent(dt.containerPaused)}}play(t){if(!os(this))return;const e=this.#ke||t;if(!this.#be||this.actualOptions.autoPlay){if(this.#ke&&(this.#ke=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(dt.containerPlay),this.draw(e??!1)}else this.#be=!1}async refresh(){if(os(this))return this.stop(),this.start()}async reset(t){if(os(this))return this.#xe=t,this.#Ie=t,this.#Se=rs(this.#p,this,this.#xe,this.sourceOptions),this.actualOptions=rs(this.#p,this,this.#Se),this.refresh()}async start(){os(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(dt.containerStarted),this.play(),t()};this.#ge=setTimeout(()=>{e()},this.#fe)}))}stop(){if(os(this)&&this.started){this.#ge&&(clearTimeout(this.#ge),this.#ge=void 0),this.#be=!0,this.started=!1,this.#Pe.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Ie=this.#Se,this.dispatchEvent(dt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#De(t){try{if(!this.#Oe&&void 0!==this.#ze&&t<this.#ze+a/this.fpsLimit)return void this.draw(!1);if(this.#ze??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#ye,t-this.#ze,this.fpsLimit,this.#Oe),this.addLifeTime(this.#ye.value),this.#ze=t,this.#ye.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ye),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){gt().error("error in animation loop",t)}}}});var cs=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#_e;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#_e&&(t.globalCompositeOperation=this.#_e)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#_e=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function hs(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function ds(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(j(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?wt.clockwise:wt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var us=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-U(e.decay),t.pathDelay=U(s.delay.value)*a,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:U(i.acceleration),inverse:i.inverse},ds(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===wt.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),l=r*n;e.spin.radius>l?(e.spin.radius=l,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,h,o):hs(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Ee()}redrawInit(){return this.#Ee()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ee(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var ps=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const fs=new Map;var gs=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||fs.set(t,e)}getShapeGenerator(t){return fs.get(t)}getSupportedShapeGenerators(){return fs.keys()}}});var ys=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Re;#p;constructor(t){this.#Re=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Fi;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return Ps}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Re.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Re.get(t);return e||(e=[],this.#Re.set(t,e)),e}initContainer(t){this.#Re.has(t)||(this.#Re.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var ms=Object.freeze({__proto__:null,TrailPluginInstance:class{#u;#p;#Le;constructor(t,e){this.#u=e,this.#p=t}canvasClear(){const t=this.#u,e=t.actualOptions.trail,i=this.#Le;if(!e?.enable||!i||e.length<=0)return!1;let s=!1;const n=t.canvas;return i.color?(n.render.paintBase(Me(i.color,t.hdr,i.opacity)),s=!0):i.image&&(n.render.paintImage(i.image,i.opacity),s=!0),s}async init(){try{await this.#Fe()}catch(t){gt().error(t)}}async#Fe(){const t=this.#u.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=we(this.#p,e.color);if(!t)return;this.#Le={color:{...t},opacity:i}}else await new Promise((t,s)=>{if(!e.image)return;const n=K().createElement("img");n.addEventListener("load",()=>{this.#Le={image:n,opacity:i},t()}),n.addEventListener("error",t=>{gt().error(t),s(new Error("Error loading image"))}),n.src=e.image})}}});function vs(t,e,i,s){(t.paint??=new oe).fill={color:Wt.create(void 0,{value:e}),enable:s,opacity:i}}function ws(t,e,i,s){(t.paint??=new oe).stroke={color:Wt.create(void 0,{value:e}),opacity:i,width:s}}var Ps=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Te;#Ae;#Be;#we;#Ue;#Ve;#$e;#Ge;#We;#Q;#je;#ke;#p;#qe;#dt;#He;#Ne;#Xe;#Ye;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#qe=i,this.#Te=0,this.#Ae=0,this.#Be=0,this.#Ge=o,n instanceof Fi?this.options=n:(this.options=new Fi,this.options.load(n)),this.#Xe=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#Ge??this.#Ct(),this.name=this.options.name,this.fill=this.options.fill,this.#Ve=!this.options.life.wait,this.#Ye=!1;const r=it({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=be(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=be(this.#p,this.options.spawn.stroke.color)),this.#ke=!this.options.autoPlay,this.#je=r,this.#Ne=this.#Qe(),this.size=this.#Ne.mode===Q.percent?{width:this.#Ne.width/s*this.#u.canvas.size.width,height:this.#Ne.height/s*this.#u.canvas.size.height}:{width:this.#Ne.width,height:this.#Ne.height},this.#We=this.options.life.count??-1,this.#$e=this.#We<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#Q=new MutationObserver(()=>{this.resize()}),this.#dt=new ResizeObserver(()=>{this.resize()}),this.#Q.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#dt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#He=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#ke=!0,this.pause()}externalPlay(){this.#ke=!1,this.play()}async init(){await(this.#He?.init())}pause(){this.#ke||(this.#Ue=void 0)}play(){if(this.#ke)return;if(!(this.#We>0||this.#$e)&&this.options.life.count||!(this.#Ve||this.#Be>=(this.#Xe??0)))return;const t=this.#u;if(void 0===this.#Ue){const e=U(this.options.rate.delay);this.#Ue=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#We>0||this.#$e)&&this.#Ke()}resize(){const t=this.#Ge,e=this.#u;this.position=t&&tt(t,e.canvas.size,M.origin)?t:this.#Ct(),this.#Ne=this.#Qe(),this.size=this.#Ne.mode===Q.percent?{width:this.#Ne.width/s*e.canvas.size.width,height:this.#Ne.height/s*e.canvas.size.height}:{width:this.#Ne.width,height:this.#Ne.height},this.#He?.resize(this.position,this.size)}update(t){if(this.#ke)return;const e=this.#u;this.#Ve&&(this.#Ve=!1,this.#Be=this.#Xe??0,this.#Ae=this.#Ue??0),this.#Ye||(this.#Ye=!0,this.#Ze(this.options.startCount)),void 0!==this.#we&&(this.#Te+=t.value,this.#Te>=this.#we&&(this.pause(),void 0!==this.#Xe&&(this.#Xe=void 0),this.#$e||this.#We--,this.#We>0||this.#$e?(this.position=this.#Ct(),this.#He?.resize(this.position,this.size),this.#Xe=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#Je(),this.#Te-=this.#we,this.#we=void 0)),void 0!==this.#Xe&&(this.#Be+=t.value,this.#Be>=this.#Xe&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Be-=this.#Xe,this.#Xe=void 0)),void 0!==this.#Ue&&(this.#Ae+=t.value,this.#Ae>=this.#Ue&&(this.#ti(),this.#Ae-=this.#Ue))}#Ct(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return H({size:t.canvas.size,position:this.options.position})}#Qe(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new Ri;return t.load({height:0,mode:Q.percent,width:0}),t})()}#Je(){this.#Q?.disconnect(),this.#Q=void 0,this.#dt?.disconnect(),this.#dt=void 0,this.#qe(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ti(){if(this.#ke)return;const t=U(this.options.rate.quantity);this.#Ze(t)}#Ze(t){const e=nt(this.#je)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#He,u=c||h,p=u||d,f=u?{h:m,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?it({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#ei(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#ei(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#ei(i.l,this.spawnFillColor.l,f.l)),vs(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#ei(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#ei(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#ei(a.l,this.spawnStrokeColor.l,f.l)),ws(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#He){const e=this.#He.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&vs(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ke(){if(this.#ke)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#We>0||this.#$e)&&void 0!==t&&t>0&&(this.#we=t*a)}#ei(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=B(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadFountainPreset=qi,t.tsParticles=_e}),Object.assign(globalThis.window||globalThis,{loadFountainPreset:(globalThis.__tsParticlesInternals.presets.fountain||{}).loadFountainPreset}),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.fountain=t.__tsParticlesInternals.presets.fountain||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",m=255,y=360,v=100,w=100,P=.25;var b;function x(t){return"z"in t?t.z:o.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(b||(b={}));class M{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function k(t){return"string"==typeof t}function S(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function _(t){return null==t}const D=Math.PI/180;let E=Math.random;const L=t=>requestAnimationFrame(t),R=t=>{cancelAnimationFrame(t)};function F(){return B(E(),0,1-Number.EPSILON)}function T(t,e){return F()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function A(t){const e=$(t);let i=V(t);return e===i&&(i=0),T(i,e)}function U(t){return S(t)?t:A(t)}function V(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(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 j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function H(t){return t*D}function q(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??F()*s)*t.size.width/s,y:(t.position?.y??F()*s)*t.size.height/s}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function tt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(et(t,s??0),e,i,n)}function et(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function it(t,...e){for(const i of e){if(_(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return O(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>it(void 0,t)):it(e[s],n)}}return t}function st(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function nt(t,e,i){return I(t)?J(t,e,i):t}function at(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let ot,rt;function lt(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ct(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class ht{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var dt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(dt||(dt={}));class ut{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(dt.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return ct(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const pt=t=>(...e)=>{t(...e)},ft={debug:pt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:pt(console.info),log:pt(console.log),trace:pt(console.trace),verbose:pt(console.log),warning:pt(console.warn)};function gt(){return ft}const mt="100%";class yt{pluginManager=new ut(this);#h=[];#d=new ht;#o=!1;get items(){return this.#h}get version(){return"4.3.1"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return cs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=nt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(gt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=nt(r,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=mt,s.style.height||=mt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=mt,s.style.height||=mt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var vt,wt,Pt,bt,xt,Mt,zt,Ct,kt,St,Ot,It;!function(t){t.circle="circle",t.rectangle="rectangle"}(vt||(vt={}));class _t{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Dt extends _t{radius;constructor(t,e,i){super(t,e,vt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Dt||t.type===vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Et||t.type===vt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Et extends _t{size;constructor(t,e,i,s){super(t,e,vt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Dt)return t.intersects(this);if(!(t instanceof Et))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(wt||(wt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Pt||(Pt={})),function(t){t.delete="delete",t.wait="wait"}(bt||(bt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(xt||(xt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Mt||(Mt={})),function(t){t.none="none",t.max="max",t.min="min"}(zt||(zt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ct||(Ct={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(kt||(kt={})),function(t){t.max="max",t.min="min",t.random="random"}(St||(St={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Ot||(Ot={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(It||(It={}));class Lt{load(t){_(t)||this.doLoad(t)}}function Rt(t,...e){for(const i of e)t.load(i)}function Ft(t,e,i){void 0!==i&&(t[e]=i)}function Tt(t,e,i){void 0!==i&&(t[e]=W(i))}function Bt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Ut extends Lt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Tt(this,"count",t.count),Ft(this,"enable",t.enable),Tt(this,"speed",t.speed),Tt(this,"decay",t.decay),Tt(this,"delay",t.delay),Ft(this,"sync",t.sync)}}class Vt extends Ut{mode=Pt.auto;startValue=St.random;doLoad(t){super.doLoad(t),Ft(this,"mode",t.mode),Ft(this,"startValue",t.startValue)}}class $t extends Ut{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Ft(this,"max",t.max),Ft(this,"min",t.min),Tt(this,"offset",t.offset)}}class Wt extends Lt{h=new $t(0,y);l=new $t(0,w);s=new $t(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Gt extends Lt{value="";static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(k(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class jt extends Gt{animation=new Wt;static create(t,e){const i=new jt;return i.load(t),void 0!==e&&(k(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Ht extends Lt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Gt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Ft(this,"element",t.element),Ft(this,"draw",t.draw),Ft(this,"image",t.image),Ft(this,"position",t.position),Ft(this,"repeat",t.repeat),Ft(this,"size",t.size),Ft(this,"opacity",t.opacity)}}class qt extends Lt{enable=!0;zIndex=0;doLoad(t){Ft(this,"enable",t.enable),Ft(this,"zIndex",t.zIndex)}}class Nt extends Lt{delay=.5;enable=!0;doLoad(t){Ft(this,"delay",t.delay),Ft(this,"enable",t.enable)}}class Xt extends Lt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Ft(this,"close",t.close),Ft(this,"type",t.type)}}class Yt extends Lt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=jt.create(this.color,t.color)),Ft(this,"enable",t.enable),Tt(this,"opacity",t.opacity)}}class Qt extends Lt{offset=0;value=90;doLoad(t){Tt(this,"offset",t.offset),Tt(this,"value",t.value)}}class Kt extends Lt{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Ft(this,"x",t.x),Ft(this,"y",t.y),Ft(this,"mode",t.mode),Ft(this,"radius",t.radius)}}class Zt extends Lt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Tt(this,"acceleration",t.acceleration),Ft(this,"enable",t.enable),Ft(this,"inverse",t.inverse),Tt(this,"maxSpeed",t.maxSpeed)}}class Jt extends Lt{value=0;doLoad(t){_(t.value)||(this.value=W(t.value))}}class te extends Jt{animation=new Ut;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class ee extends te{animation=new Vt}class ie extends Lt{clamp=!0;delay=new Jt;enable=!1;generator;options={};doLoad(t){Ft(this,"clamp",t.clamp),this.delay.load(t.delay),Ft(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=it(this.options,t.options))}}class se extends Lt{bottom;default=xt.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class ne extends Lt{acceleration=0;enable=!1;position;doLoad(t){Tt(this,"acceleration",t.acceleration),Ft(this,"enable",t.enable),t.position&&(this.position=it({},t.position))}}class ae extends Lt{angle=new Qt;center=new Kt;decay=0;direction=b.none;distance={};drift=0;enable=!1;gravity=new Zt;outModes=new se;path=new ie;random=!1;size=!1;speed=2;spin=new ne;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Tt(this,"decay",t.decay),Ft(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Tt(this,"drift",t.drift),Ft(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Ft(this,"random",t.random),Ft(this,"size",t.size),Tt(this,"speed",t.speed),this.spin.load(t.spin),Ft(this,"straight",t.straight),Ft(this,"vibrate",t.vibrate),Ft(this,"warp",t.warp)}}class oe extends Lt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=jt.create(this.color,t.color)),Tt(this,"width",t.width),Tt(this,"opacity",t.opacity)}}class re extends Lt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=jt.create(this.color,t.color)),Bt(this,"fill",t.fill,()=>new Yt),Bt(this,"stroke",t.stroke,()=>new oe)}}class le extends Jt{value=1}class ce extends Lt{horizontal=new le;vertical=new le;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class he extends Lt{enable=!1;height=1080;width=1920;doLoad(t){Ft(this,"enable",t.enable),Ft(this,"width",t.width),Ft(this,"height",t.height)}}class de extends Lt{mode=bt.delete;value=0;doLoad(t){Ft(this,"mode",t.mode),Ft(this,"value",t.value)}}class ue extends Lt{density=new he;limit=new de;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Ft(this,"value",t.value)}}class pe extends Lt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Ft(this,"close",t.close),Ft(this,"type",t.type)}}class fe extends Jt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Ft(this,"opacityRate",t.opacityRate),Ft(this,"sizeRate",t.sizeRate),Ft(this,"velocityRate",t.velocityRate)}}class ge extends Lt{bounce=new ce;effect=new Xt;groups={};move=new ae;number=new ue;paint;palette;reduceDuplicates=!1;shape=new pe;zIndex=new fe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new re,this.paint.color=new jt,this.paint.color.value="#fff",this.paint.fill=new Yt,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=it(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=st(e,t=>{const e=new re;return e.load(t),e}):I(this.paint)?(this.paint=new re,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function me(t,e,...i){const s=new ge(t,e);return Rt(s,...i),s}class ye extends Lt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new Ht,this.fullScreen=new qt,this.particles=me(this.#p,this.#u),this.resize=new Nt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,st(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Ft(this,"autoPlay",t.autoPlay),Ft(this,"clear",t.clear),Ft(this,"key",t.key),Ft(this,"name",t.name),Tt(this,"delay",t.delay),Ft(this,"detectRetina",t.detectRetina),Tt(this,"duration",t.duration),Ft(this,"fpsLimit",t.fpsLimit),Ft(this,"hdr",t.hdr),Ft(this,"pauseOnBlur",t.pauseOnBlur),Ft(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Ft(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=it(this.style,t.style),Ft(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const ve=new Map;function we(t,e){let i=ve.get(t);return i||(i=e(),ve.size>2e3&&ve.clear(),ve.set(t,i)),i}function Pe(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return be(t,n.value,i,s);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function be(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(T(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(I(n.value)){const e=J(n.value,i,s);if(!e)return;return be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function xe(t,e,i,s=!0){const a=Pe(t,e,i,s);return a?function(t){const e=t.r/m,i=t.g/m,s=t.b/m,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o));r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=y);r.h>=y&&(r.h-=y);return r}(a):void 0}function Me(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ze(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(m,m*Me(c,l,a+h)),u=Math.min(m,m*Me(c,l,a)),p=Math.min(m,m*Me(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Ce(t,e,i){const s=e?4:2,n=i??1;return we(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function ke(t,e,i){const s=e?4:2,a=i??1;return we(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${a.toString()}`,()=>e?Ce(function(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=r*m;return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3;return{r:Math.min(m,m*Me(c,l,a+h)),g:Math.min(m,m*Me(c,l,a)),b:Math.min(m,m*Me(c,l,a-h))}}(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${a.toString()})`)}function Se(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Oe(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Ie(s.h,e.h,i),Ie(s.s,e.s,i),Ie(s.l,e.l,i)),s}function Ie(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=Ot.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=W(e.offset)):t.velocity=0}function _e(t,e,i,s){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 n=t.offset?A(t.offset):0,a=((t.velocity??0)*i.factor+3.6*n)*(s?.5075:1),o=t.decay??1,r=t.max,l=t.min;e&&t.status!==Ot.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=Ot.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=Ot.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=B(t.value,l,r)}function De(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;_e(s,!1,e,i),_e(n,!0,e,i),_e(a,!0,e,i)}const Ee=new yt;class Le{enable=!1;mode="destination-out";load(t){_(t)||(Ft(this,"mode",t.mode),Ft(this,"enable",t.enable))}}class Re{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Le),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Le,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Fe(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Re)})}class Te{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=O(s)?{min:H(s.min),max:H(s.max)}:{min:0,max:H(s)}}}async function Be(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Te))})}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 Ue=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ve=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class $e{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ue,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ve.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 We(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new $e)})}var Ge;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ge||(Ge={}));const je=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class He{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=je.exec(t);return e?function(t){const e=ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[Ge.a]):1,h:Number.parseInt(e[Ge.h]??"0",10),l:Number.parseInt(e[Ge.l]??"0",10),s:Number.parseInt(e[Ge.s]??"0",10)}):void 0}}async function qe(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new He)})}class Ne{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ps});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Xe(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ne(t.pluginManager))})}function Ye(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:$(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Pt.increase:o.status=Ot.increasing;break;case Pt.decrease:o.status=Ot.decreasing;break;case Pt.random:o.status=F()>=n?Ot.increasing:Ot.decreasing}const t=s.mode===Pt.auto;switch(s.startValue){case St.min:o.value=o.min,t&&(o.status=Ot.increasing);break;case St.max:o.value=o.max,t&&(o.status=Ot.decreasing);break;case St.random:default:o.value=A(o),t&&(o.status=F()>=n?Ot.increasing:Ot.decreasing)}}return o.initialValue=o.value,o}function Qe(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case Ot.increasing:e.value+=a;break;case Ot.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Ot.increasing:e.value>=r&&(e.status=Ot.decreasing,e.loops??=0,e.loops++);break;case Ot.decreasing:e.value<=o&&(e.status=Ot.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case zt.max:i>=n&&t.destroy();break;case zt.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=B(e.value,o,r))}}class Ke extends Vt{destroy=zt.none;load(t){super.load(t),_(t)||Ft(this,"destroy",t.destroy)}}class Ze extends ee{animation=new Ke;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Je{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Ye(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){At(t,"opacity",Ze,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Qe(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function ti(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Je(t)))})}class ei{modes;#u;#y;constructor(t){this.#u=t,this.modes=[xt.bounce,xt.split],this.#y=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#y)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=et(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class ii{modes;constructor(t){this.modes=[xt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case kt.normal:case kt.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case kt.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 si{modes;#u;constructor(t){this.#u=t,this.modes=[xt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;tt(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const ni=z.origin;class ai{modes;#u;constructor(t){this.#u=t,this.modes=[xt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case kt.inside:{const{x:e,y:i}=t.velocity;ni.setTo(o),ni.length=t.moveCenter.radius,ni.angle=t.velocity.angle+Math.PI,ni.addTo(t.moveCenter);const{dx:s,dy:a}=G(t.position,ni);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(A({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(A({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(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case kt.outside:{t.position.x=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(A({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 kt.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=et(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class oi{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,xt.bounce,t=>new ei(t)),this.#v(t,xt.out,t=>new ai(t)),this.#v(t,xt.destroy,t=>new ii(t)),this.#v(t,xt.none,t=>new si(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ri(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new oi(t)))})}class li{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=nt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=jt.create(void 0===a?void 0:jt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=xe(this.#p,i);s&&(t.fillColor=Oe(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=jt.create(void 0===a?void 0:jt.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=xe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Oe(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(De(t.fillColor,e,this.#u.hdr),De(t.strokeColor,e,this.#u.hdr))}}async function ci(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new li(t.pluginManager,e)))})}var hi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(hi||(hi={}));const di=/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 ui{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=di.exec(t);return e?{a:e.length>4?X(e[hi.a]):1,b:parseInt(e[hi.b]??"0",10),g:parseInt(e[hi.g]??"0",10),r:parseInt(e[hi.r]??"0",10)}:void 0}}async function pi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ui)})}class fi extends Vt{destroy=zt.none;load(t){super.load(t),_(t)||Ft(this,"destroy",t.destroy)}}class gi extends ee{animation=new fi;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class mi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){At(t,"size",gi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Ye(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Qe(t,t.size,0,t.options.size.animation.destroy,e)}}async function yi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new mi(t)))})}async function vi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([Fe(t),We(t),qe(t),pi(t),Xe(t),Be(t),ci(t),ti(t),ri(t),yi(t)])})}class wi{bottom;left;right;top;load(t){_(t)||(Tt(this,"bottom",t.bottom),Tt(this,"left",t.left),Tt(this,"right",t.right),Tt(this,"top",t.top))}}var Pi;!function(t){t.explode="explode",t.none="none",t.split="split"}(Pi||(Pi={}));class bi{maxSizeFactor=3;speed=2;load(t){_(t)||(Ft(this,"maxSizeFactor",t.maxSizeFactor),Ft(this,"speed",t.speed))}}class xi extends Jt{value=3}class Mi extends Jt{value={min:4,max:9}}class zi{count=1;factor=new xi;fillColor;fillColorOffset;particles;rate=new Mi;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){_(t)||(void 0!==t.fillColor&&(this.fillColor=Gt.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=Gt.create(this.strokeColor,t.strokeColor)),Ft(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=st(t.particles,t=>it({},t)),Ft(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class Ci{bounds=new wi;explode=new bi;mode=Pi.none;split=new zi;load(t){_(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function ki(t,e,i,s){return t&&s?function(t,e){const i=U(e.h??0),s=U(e.s??0),n=U(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return jt.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?jt.create(void 0,e):i?jt.create(void 0,i):s?function(t){return jt.create(void 0,{value:{hsl:t}})}(s):void 0}function Si(t,e,i,s){const n=i.options.destroy;if(!n)return;const a=n.split,o=me(t,e,i.options),r=nt(a.fillColor),l=nt(a.strokeColor),c=i.getFillColor(),h=i.getStrokeColor();o.move.load({center:{x:i.position.x,y:i.position.y,mode:Q.precise}});const d=1/U(a.factor.value),u=o.size;u&&(S(u.value)?u.value*=d:(u.value.min*=d,u.value.max*=d)),o.load(s);const p=nt(o.paint),f=p?.fill,g=p?.stroke,m=ki(a.fillColorOffset,r,f?.color,c),y=ki(a.strokeColorOffset,l,g?.color,h);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?W(-i.size.value,i.size.value):0,w={x:i.position.x+A(v),y:i.position.y+A(v)};return e.particles.addParticle(w,o,i.group,t=>!(t.size.value<.5)&&(t.velocity.length=A(W(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Oi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:a,left:o,right:r,top:l}=n,{destroyBounds:c}=t,h=e.canvas.size;a&&(c.bottom=U(a)*h.height/s),o&&(c.left=U(o)*h.width/s),r&&(c.right=U(r)*h.width/s),l&&(c.top=U(l)*h.height/s)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){At(t,"destroy",Ci,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case Pi.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=U(n.rate.value),o=nt(n.particles);for(let s=0;s<a;s++)Si(t,e,i,o)}(this.#p,this.#u,t);break;case Pi.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Ii(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Oi(t.pluginManager,e)))})}class _i{count;delay;duration;wait=!1;load(t){_(t)||(Ft(this,"count",t.count),Tt(this,"delay",t.delay),Tt(this,"duration",t.duration),Ft(this,"wait",t.wait))}}class Di{delay=.1;quantity=1;load(t){_(t)||(Tt(this,"quantity",t.quantity),Tt(this,"delay",t.delay))}}class Ei{color=!1;opacity=!1;load(t){_(t)||(Ft(this,"color",t.color),Ft(this,"opacity",t.opacity))}}class Li{options={};replace=new Ei;type="square";load(t){_(t)||(void 0!==t.options&&(this.options=it({},t.options??{})),this.replace.load(t.replace),Ft(this,"type",t.type))}}class Ri{height=0;mode=Q.percent;width=0;load(t){_(t)||(Ft(this,"mode",t.mode),Ft(this,"height",t.height),Ft(this,"width",t.width))}}class Fi{fill;stroke;load(t){_(t)||(t.fill&&(this.fill??=new Yt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new oe,this.stroke.load(t.stroke)))}}class Ti{autoPlay=!0;direction;domId;fill=!0;life=new _i;name;particles;position;rate=new Di;shape=new Li;size;spawn=new Fi;spawnFillColor;spawnStrokeColor;startCount=0;load(t){_(t)||(Ft(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Ri,this.size.load(t.size)),Ft(this,"direction",t.direction),Ft(this,"domId",t.domId),Ft(this,"fill",t.fill),this.life.load(t.life),Ft(this,"name",t.name),this.particles=st(t.particles,t=>it({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new jt,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new jt,this.spawnStrokeColor.load(t.spawnStrokeColor)),Ft(this,"startCount",t.startCount))}}class Bi{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return fs});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=st(i.emitters,t=>{const e=new Ti;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const Ai=new WeakMap;var Ui;async function Vi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ai.get(e);return i||(i=Promise.resolve().then(function(){return ys}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ai.delete(e),t}),Ai.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ms}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Bi(e))})}!function(t){t.emitter="emitter"}(Ui||(Ui={}));class $i{color;image;load(t){_(t)||(void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Ft(this,"image",t.image))}}class Wi{enable=!1;fill=new $i;length=10;load(t){_(t)||(Ft(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),Ft(this,"length",t.length))}}class Gi{id="trail";#p;constructor(t){this.#p=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return vs});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.trail;s?.load||(e.trail=s=new Wi),s.load(i?.trail)}needsPlugin(){return!0}}async function ji(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Gi(t.pluginManager))})}const Hi={fpsLimit:120,particles:{bounce:{vertical:{value:{min:.75,max:.85}}},paint:{fill:{color:{value:["#3998D0","#2EB6AF","#A9BD33","#FEC73B","#F89930","#F45623","#D62E32","#EB586E","#9952CF"]},enable:!0}},number:{value:0},destroy:{mode:"split",split:{count:2,factor:{value:{min:1.1,max:2}},rate:{value:{min:2,max:3}}}},opacity:{value:.5},size:{value:{min:10,max:20}},move:{enable:!0,gravity:{enable:!0,maxSpeed:50},speed:{min:10,max:20},direction:b.none,random:!1,straight:!1,outModes:{bottom:xt.split,default:xt.bounce,top:xt.none}}},detectRetina:!0,background:{color:"#fff"},emitters:{direction:b.top,life:{count:0,duration:.15,delay:3},rate:{delay:.1,quantity:5},size:{width:0,height:0}},trail:{enable:!0,fill:{color:"#fff"},length:3}};async function qi(t){await t.pluginManager.register(async t=>{await Promise.all([vi(t),Ii(t),Vi(t),ji(t)]),t.pluginManager.addPreset("fountain",Hi)})}const Ni=globalThis;Ni.loadFountainPreset=qi,Ni.tsParticles=Ee;function Xi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Yi{#b;#x;#M;#z;#C;#u;#k;#S;#O;#I;#_;#D;#p;#E;#L;#R={};#F=[void 0,void 0];#T={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#k=null,this.#b=null,this.#x=new Set,this.#L=[],this.#E=[],this.#M=[],this.#C=[],this.#O=[],this.#I=[],this.#_=[],this.#D={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}clear(){for(const t of this.#M)if(t.canvasClear?.())return;for(const t of Object.values(It))if("number"==typeof t)for(const e of this.#B(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#b=null,this.#x.clear(),this.#L=[],this.#E=[],this.#M=[],this.#C=[],this.#O=[],this.#I=[],this.#_=[];for(const t of Object.values(It))"number"==typeof t&&(this.#D[t]=[])}draw(t){const e=this.#k;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.#A(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#T,f=this.#R,g=a?ke(a,r.hdr,h*d):void 0,m=o?ke(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#_)i.drawParticleSetup?.(s,t,e);this.#U(s,t,i,d,f,p),this.#V({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#$(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#z.size.width,a=this.#z.size.height;if(this.#b)try{s.drawImage(this.#b,o.x,o.y,n,a)}catch{this.#G("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(s,t)}catch{this.#G("background-draw-error","Error in background.draw callback")}for(const t of this.#B(It.BackgroundMask))t.canvasPaint?.();for(const e of this.#B(It.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#B(It.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#B(It.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#j(),this.paint()}initPlugins(){this.#M=[],this.#C=[],this.#O=[],this.#_=[],this.#I=[];for(const t of Object.values(It))"number"==typeof t&&(this.#D[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#_.push(t),t.drawParticleCleanup&&this.#I.push(t),t.canvasClear&&this.#M.push(t),t.canvasPaint&&this.#B(It.BackgroundMask).push(t),t.drawSettingsSetup&&this.#B(It.CanvasSetup).push(t),t.draw&&this.#B(It.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#B(It.CanvasCleanup).push(t)}initUpdaters(){this.#L=[],this.#E=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#E.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#B(It.BackgroundMask))if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,o.x,o.y,this.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#k=t,this.#k&&(this.#k.globalCompositeOperation=i)}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}#$(t){for(const e of this.#E)e.afterDraw?.(t)}#U(t,e,i,s,n,a){for(const o of this.#L){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)Xi(a,t,e)}o.beforeDraw?.(e)}}#H(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#V(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#q(y,m),this.#N(v,m),this.#X(v,m),this.#Y(v,m),this.#H(y,m),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(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())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#N(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#B(t){return this.#D[t]}#A(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=xe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=xe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#F[0]=e,this.#F[1]=i,this.#F}#j(){const t=this.#u.actualOptions.background;if(this.#b=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#b=e:e?this.#G("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#G("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#b=t.element)}#G(t,e){this.#x.has(t)||(this.#x.add(t),gt().warning(e))}}const Qi=new WeakMap;function Ki(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 Zi{domElement;render;renderCanvas;size;zoom=1;#u;#Q;#K;#Z;#p;#J;#tt;#et;#it;constructor(t,e){this.#p=t,this.#u=e,this.render=new Yi(t,e,this),this.#et={height:0,width:0};const i=e.retina.pixelRatio,s=this.#et;this.size={height:s.height*i,width:s.width*i},this.#Q=!1,this.#tt=[],this.#J="none"}get#st(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#nt();this.render.destroy(),this.#tt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#it?this.#it:{x:e*n/t,y:i*n/t}}init(){this.#at(t=>{t.disconnect()}),this.#K=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ot()}),this.resize(),this.#rt(),this.initBackground(),this.#at(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#lt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Pe(this.#p,e.color);s.backgroundColor=n?Ce(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#tt=[];for(const t of this.#u.plugins)t.resize&&this.#tt.push(t)}loadCanvas(t){this.#Q&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Q=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Qi.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Qi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Z=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#et,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#et,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=o.width,i.height=l.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#J=t,this.#ot())}setZoom(t,e){this.zoom=t,this.#it=e}stop(){this.#at(t=>{t.disconnect()}),this.#K=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ct(),e&&await t.refresh()}#ct(){for(const t of this.#tt)t.resize?.()}#lt(){const t=this.#u.actualOptions.hdr&&Z("(color-gamut: p3)")?.matches&&Z("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#rt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#st?this.#ht():this.#nt();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")}}}#ot(){const t=this.domElement;if(!t)return;this.#at(t=>{t.disconnect()}),this.#rt(),this.initBackground();const e=this.#J;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#at(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#nt(){const t=this.domElement,e=this.#Z;t&&e&&Ki(t,e,!0)}#at(t){this.#K&&t(this.#K)}#ht(){const t=this.domElement;t&&Ki(t,function(t){if(ot!==t||!rt){ot=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}rt=e}return rt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ji{#u;#dt;#ut;#pt;constructor(t){this.#u=t,this.#dt={visibilityChange:()=>{this.#ft()},resize:()=>{this.#gt()}}}addListeners(){this.#mt(!0)}removeListeners(){this.#mt(!1)}#ft(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#gt(){this.#pt&&(clearTimeout(this.#pt),this.#pt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#pt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#mt(t){const e=this.#dt;this.#yt(t),lt(document,"visibilitychange",e.visibilityChange,t,!1)}#yt(t){const e=this.#dt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void lt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#ut&&!t?(s&&this.#ut.unobserve(s),this.#ut.disconnect(),this.#ut=void 0):!this.#ut&&t&&s&&(this.#ut=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#gt()}),this.#ut.observe(s))}}function ts(t){if(e=t.outMode,i=t.checkModes,!(e===i||I(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function es(t,e){const i=t%e;return i<0?i+e:i}function is(t,e,i,s){const n=me(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=nt(n.effect.type,t.id,a),t.shape=nt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=nt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=nt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class ss{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#vt={fillOpacity:1,opacity:1,strokeOpacity:1};#wt=M.origin;#Pt={sin:0,cos:0};#bt={a:1,b:0,c:0,d:1};#u;#xt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#xt.push(t),this.#xt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#xt.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(dt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Mt(this.#zt(Se(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getModifier(t){return this.#xt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=U(this.opacity?.value??1),s=this.#zt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#vt.fillOpacity=s*n*e,this.#vt.opacity=s*e,this.#vt.strokeOpacity=s*a*e,this.#vt}getPosition(){return this.#wt.x=this.position.x+this.offset.x,this.#wt.y=this.position.y+this.offset.y,this.#wt.z=this.position.z,this.#wt}getRadius(){return this.#zt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Pt.sin=Math.sin(t),this.#Pt.cos=Math.cos(t),this.#Pt}getStrokeColor(){return this.#Mt(this.#zt(Se(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#bt.a=e.cos*(t.a??r),this.#bt.b=i?e.sin*(t.b??1):t.b??l,this.#bt.c=i?-e.sin*(t.c??1):t.c??c,this.#bt.d=e.cos*(t.d??h),this.#bt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=kt.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=is(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Ct(e),this.initialVelocity=this.#kt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#St({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#St({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=es(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=es(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=es(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#xt.findIndex(e=>e.id===t);e>=0&&this.#xt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#zt(t,e){let i=t;for(const t of this.#xt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Ot(t,e){let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=N({size:l,position:s}),c=M.create(t.x,t.y,e);this.#It(c,r,o.left??o.default),this.#It(c,r,o.right??o.default),this.#_t(c,r,o.top??o.default),this.#_t(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}}#kt(){const t=this.options.move,e=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===b.inside||t.direction===b.outside)return e;const i=H(U(t.angle.value)),s=H(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=A(W(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#It(t,e,i){ts({outMode:i,checkModes:[xt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#_t(t,e,i){ts({outMode:i,checkModes:[xt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Dt(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===xt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#Et(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#St(t){const e=this.#Dt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Et(t.direction,t.outMode),l=a?this.#Lt(a(r),"shape"):void 0,c=o?this.#Lt(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Mt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Mt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Ct(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ot(t,B(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...at(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return H(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*P;case b.right:return 0;case b.bottomRight:return Math.PI*P;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=kt.inside;break;case b.outside:this.outType=kt.outside}this.offset=z.origin}#Lt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class ns{#Rt;#Ft=new Map;#Tt=[];#Bt;#At;#Ut=[];#Vt;constructor(t){this.#Rt=t,this.#Bt=0,this.#Vt=0}clear(){this.#Ft.clear();const t=this.#At;t&&(this.#Rt=t),this.#At=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#$t(e,i);this.#Ft.has(s)||this.#Ft.set(s,[]),this.#Ft.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Wt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Rt),a=Math.floor(s.maxX/this.#Rt),o=Math.floor(s.minY/this.#Rt),r=Math.floor(s.maxY/this.#Rt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Ft.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.#Gt(t.x,t.y,e),a=this.query(n,i,s);return this.#jt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ht(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#jt(),a}setCellSize(t){this.#At=t}#Gt(t,e,i){return(this.#Tt[this.#Bt++]??=new Dt(t,e,i)).reset(t,e,i)}#Ht(t,e,i,s){return(this.#Ut[this.#Vt++]??=new Et(t,e,i,s)).reset(t,e,i,s)}#$t(t,e){return`${Math.floor(t/this.#Rt)}_${Math.floor(e/this.#Rt)}`}#Wt(t){if(t instanceof Dt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Et){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}#jt(){this.#Bt=0,this.#Vt=0}}class as{checkParticlePositionPlugins;grid;#qt;#u;#Nt;#Xt;#Yt;#Qt;#Kt;#Zt;#p;#Jt;#te;#ee;#ie;#se;#ne;constructor(t,e){this.#p=t,this.#u=e,this.#Yt=0,this.#qt=[],this.#Jt=[],this.#Xt=0,this.#Nt=new Map,this.#Qt=new Map,this.#ne=this.#ae(this.#u.zLayers),this.grid=new ns(100),this.checkParticlePositionPlugins=[],this.#Kt=[],this.#Zt=[],this.#ee=[],this.#te=[],this.#se=[]}get count(){return this.#qt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Xt:this.#Nt.get(i)??this.#Xt,o=this.count;if(a>0)switch(n){case bt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case bt.wait:if(o>=a)return}try{const n=this.#Jt.pop()??new ss(this.#p,this.#u);n.init(this.#Yt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#qt.push(n),this.#oe(n),this.#Yt++,this.#u.dispatchEvent(dt.particleAdded,{particle:n}),n):void this.#Jt.push(n)}catch(t){gt().warning(`error adding particle: ${t}`)}}clear(){this.#qt=[],this.#Qt.clear(),this.#re(this.#u.zLayers)}destroy(){this.#qt=[],this.#Jt.length=0,this.#Qt.clear(),this.#ne=[],this.checkParticlePositionPlugins=[],this.#Kt=[],this.#Zt=[],this.#ee=[],this.#te=[],this.#se=[]}drawParticles(t){for(let e=this.#ne.length-1;e>=0;e--){const i=this.#ne[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#qt.filter(t)}find(t){return this.#qt.find(t)}get(t){return this.#qt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#se=[],this.#Zt=[],this.#ee=[],this.#Kt=[],this.#te=[],this.#Qt.clear(),this.#re(t.zLayers),this.grid=new ns(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#se.push(e),e.particleUpdate&&this.#Zt.push(e),e.postUpdate&&this.#ee.push(e),e.particleReset&&this.#Kt.push(e),e.postParticleUpdate&&this.#te.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#qt.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.#le(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=me(this.#p,this.#u,s);this.#ce(n,i,t)}this.#ce(t.particles,i)}setResizeFactor(t){this.#ie=t}update(t){this.grid.clear();for(const e of this.#se)e.update?.(t);const e=this.#he(t);for(const e of this.#ee)e.postUpdate?.(t);if(this.#de(t,e),e.size)for(const t of e)this.remove(t);this.#ie=void 0}#ue(...t){this.#Jt.push(...t)}#ce(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Xt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Nt.set(i,s?.number.limit.value??n.limit.value));const a=this.#pe(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.#Xt=n.limit.value*a:this.#Nt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ae(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#fe(t){const e=this.#ne.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#pe(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#oe(t){const e=this.#fe(t.position.z),i=this.#ne[e];i&&(i.push(t),this.#Qt.set(t.id,e))}#le(t,e,i){const s=this.#qt[t];return!!s&&(s.group===e&&(this.#qt.splice(t,1),this.#ge(s),s.destroy(i),this.#u.dispatchEvent(dt.particleRemoved,{particle:s}),this.#ue(s),!0))}#ge(t){const e=this.#Qt.get(t.id)??this.#fe(t.position.z),i=this.#ne[e];if(!i)return void this.#Qt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Qt.delete(t.id)}#re(t){const e=Math.max(Math.floor(t),1);if(this.#ne.length===e)for(const t of this.#ne)t.length=0;else this.#ne=this.#ae(e)}#me(t){const e=this.#fe(t.position.z),i=this.#Qt.get(t.id);if(void 0===i)return void this.#oe(t);if(i===e)return;const s=this.#ne[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ne[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Qt.set(t.id,e)}else this.#Qt.set(t.id,e)}#he(t){const e=new Set,i=this.#ie;for(const s of this.#qt){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.#Kt)t.particleReset?.(s);for(const e of this.#Zt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#de(t,e){for(const i of this.#qt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#te)e.postParticleUpdate?.(i,t);this.#me(i)}}}class os{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function rs(t){return!t.destroyed}function ls(t,e,...i){const s=new ye(t,e);return Rt(s,...i),s}var cs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#ye;#ve;#we={value:0,factor:0};#Pe;#be;#xe;#Me;#ze;#Ce;#ke;#Se;#Oe;#Ie;#_e;#p;#De;#Ee;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#Pe=e,this.#Oe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#De=!1,this.#ye=0,this.#xe=0,this.#Se=0,this.#ze=!0,this.started=!1,this.destroyed=!1,this.#_e=!0,this.#ke=0,this.zLayers=100,this.pageHidden=!1,this.#Ee=a,this.#Ce=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new os(this),this.canvas=new Zi(this.#p,this),this.particles=new as(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ie=ls(this.#p,this),this.actualOptions=ls(this.#p,this),this.#Me=new Ji(this),this.dispatchEvent(dt.containerBuilt)}get animationStatus(){return!this.#_e&&!this.pageHidden&&rs(this)}get options(){return this.#Ie}get sourceOptions(){return this.#Ee}addLifeTime(t){this.#Se+=t}alive(){return!this.#xe||this.#Se<=this.#xe}destroy(t=!0){if(rs(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Oe(t),this.dispatchEvent(dt.containerDestroyed)}}dispatchEvent(t,e){this.#Pe(t,{container:this,data:e})}draw(t){if(!rs(this))return;let e=t;this.#be=L(t=>{e&&(this.#ke=void 0,e=!1),this.#Le(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}gt().error(`Export plugin with type ${t} not found`)}async init(){if(!rs(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Ie=ls(this.#p,this,this.#Ce,this.sourceOptions),this.actualOptions=ls(this.#p,this,this.#Ie),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,hdr:n,smooth:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#xe=U(i)*a,this.#ye=U(e)*a,this.#Se=0,this.fpsLimit=s>0?s:120,this.#De=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(dt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(dt.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(rs(this)&&(void 0!==this.#be&&(t=this.#be,R(t),this.#be=void 0),!this.#_e)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#_e=!0),this.dispatchEvent(dt.containerPaused)}}play(t){if(!rs(this))return;const e=this.#_e||t;if(!this.#ze||this.actualOptions.autoPlay){if(this.#_e&&(this.#_e=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(dt.containerPlay),this.draw(e??!1)}else this.#ze=!1}async refresh(){if(rs(this))return this.stop(),this.start()}async reset(t){if(rs(this))return this.#Ce=t,this.#Ee=t,this.#Ie=ls(this.#p,this,this.#Ce,this.sourceOptions),this.actualOptions=ls(this.#p,this,this.#Ie),this.refresh()}async start(){rs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Me.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(dt.containerStarted),this.play(),t()};this.#ve=setTimeout(()=>{e()},this.#ye)}))}stop(){if(rs(this)&&this.started){this.#ve&&(clearTimeout(this.#ve),this.#ve=void 0),this.#ze=!0,this.started=!1,this.#Me.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.#Ee=this.#Ie,this.dispatchEvent(dt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Le(t){try{if(!this.#De&&void 0!==this.#ke&&t<this.#ke+a/this.fpsLimit)return void this.draw(!1);if(this.#ke??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#we,t-this.#ke,this.fpsLimit,this.#De),this.addLifeTime(this.#we.value),this.#ke=t,this.#we.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#we),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){gt().error("error in animation loop",t)}}}});var hs=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=It.CanvasSetup;#u;#Re;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Re&&(t.globalCompositeOperation=this.#Re)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Re=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function ds(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=B(t.velocity.x,-1,1),t.velocity.y=B(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 us(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(j(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?wt.clockwise:wt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var ps=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-U(e.decay),t.pathDelay=U(s.delay.value)*a,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:U(i.acceleration),inverse:i.inverse},us(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===wt.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),l=r*n;e.spin.radius>l?(e.spin.radius=l,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,h,o):ds(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Fe()}redrawInit(){return this.#Fe()}update(){for(const t of this.pathGenerators.values())t.update()}async#Fe(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var fs=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const gs=new Map;var ms=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||gs.set(t,e)}getShapeGenerator(t){return gs.get(t)}getSupportedShapeGenerators(){return gs.keys()}}});var ys=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Te;#p;constructor(t){this.#Te=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Ti;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return bs}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Te.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Te.get(t);return e||(e=[],this.#Te.set(t,e)),e}initContainer(t){this.#Te.has(t)||(this.#Te.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var vs=Object.freeze({__proto__:null,TrailPluginInstance:class{layer=It.PluginContent;#u;#p;#Be;constructor(t,e){this.#u=e,this.#p=t}canvasClear(){const t=this.#u,e=t.actualOptions.trail,i=this.#Be;if(!e?.enable||!i||e.length<=0)return!1;let s=!1;const n=t.canvas;return i.color?(n.render.paintBase(Ce(i.color,t.hdr,i.opacity)),s=!0):i.image&&(n.render.paintImage(i.image,i.opacity),s=!0),s}async init(){try{await this.#Ae()}catch(t){gt().error(t)}}async#Ae(){const t=this.#u.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=Pe(this.#p,e.color);if(!t)return;this.#Be={color:{...t},opacity:i}}else await new Promise((t,s)=>{if(!e.image)return;const n=K().createElement("img");n.addEventListener("load",()=>{this.#Be={image:n,opacity:i},t()}),n.addEventListener("error",t=>{gt().error(t),s(new Error("Error loading image"))}),n.src=e.image})}}});function ws(t,e,i,s){(t.paint??=new re).fill={color:jt.create(void 0,{value:e}),enable:s,opacity:i}}function Ps(t,e,i,s){(t.paint??=new re).stroke={color:jt.create(void 0,{value:e}),opacity:i,width:s}}var bs=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ue;#Ve;#$e;#xe;#We;#Ge;#je;#He;#qe;#K;#Ne;#_e;#p;#Xe;#ut;#Ye;#Qe;#Ke;#Ze;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#Xe=i,this.#Ue=0,this.#Ve=0,this.#$e=0,this.#He=o,n instanceof Ti?this.options=n:(this.options=new Ti,this.options.load(n)),this.#Ke=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#He??this.#Ot(),this.name=this.options.name,this.fill=this.options.fill,this.#Ge=!this.options.life.wait,this.#Ze=!1;const r=it({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=xe(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=xe(this.#p,this.options.spawn.stroke.color)),this.#_e=!this.options.autoPlay,this.#Ne=r,this.#Qe=this.#Je(),this.size=this.#Qe.mode===Q.percent?{width:this.#Qe.width/s*this.#u.canvas.size.width,height:this.#Qe.height/s*this.#u.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#qe=this.options.life.count??-1,this.#je=this.#qe<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#K=new MutationObserver(()=>{this.resize()}),this.#ut=new ResizeObserver(()=>{this.resize()}),this.#K.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#ut.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#Ye=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#_e=!0,this.pause()}externalPlay(){this.#_e=!1,this.play()}async init(){await(this.#Ye?.init())}pause(){this.#_e||(this.#We=void 0)}play(){if(this.#_e)return;if(!(this.#qe>0||this.#je)&&this.options.life.count||!(this.#Ge||this.#$e>=(this.#Ke??0)))return;const t=this.#u;if(void 0===this.#We){const e=U(this.options.rate.delay);this.#We=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#qe>0||this.#je)&&this.#ti()}resize(){const t=this.#He,e=this.#u;this.position=t&&tt(t,e.canvas.size,z.origin)?t:this.#Ot(),this.#Qe=this.#Je(),this.size=this.#Qe.mode===Q.percent?{width:this.#Qe.width/s*e.canvas.size.width,height:this.#Qe.height/s*e.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#Ye?.resize(this.position,this.size)}update(t){if(this.#_e)return;const e=this.#u;this.#Ge&&(this.#Ge=!1,this.#$e=this.#Ke??0,this.#Ve=this.#We??0),this.#Ze||(this.#Ze=!0,this.#ei(this.options.startCount)),void 0!==this.#xe&&(this.#Ue+=t.value,this.#Ue>=this.#xe&&(this.pause(),void 0!==this.#Ke&&(this.#Ke=void 0),this.#je||this.#qe--,this.#qe>0||this.#je?(this.position=this.#Ot(),this.#Ye?.resize(this.position,this.size),this.#Ke=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#ii(),this.#Ue-=this.#xe,this.#xe=void 0)),void 0!==this.#Ke&&(this.#$e+=t.value,this.#$e>=this.#Ke&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#$e-=this.#Ke,this.#Ke=void 0)),void 0!==this.#We&&(this.#Ve+=t.value,this.#Ve>=this.#We&&(this.#si(),this.#Ve-=this.#We))}#Ot(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return q({size:t.canvas.size,position:this.options.position})}#Je(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new Ri;return t.load({height:0,mode:Q.percent,width:0}),t})()}#ii(){this.#K?.disconnect(),this.#K=void 0,this.#ut?.disconnect(),this.#ut=void 0,this.#Xe(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#si(){if(this.#_e)return;const t=U(this.options.rate.quantity);this.#ei(t)}#ei(t){const e=nt(this.#Ne)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#Ye,u=c||h,p=u||d,f=u?{h:y,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?it({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#ni(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#ni(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#ni(i.l,this.spawnFillColor.l,f.l)),ws(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#ni(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#ni(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#ni(a.l,this.spawnStrokeColor.l,f.l)),Ps(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Ye){const e=this.#Ye.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&ws(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#ti(){if(this.#_e)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#qe>0||this.#je)&&void 0!==t&&t>0&&(this.#xe=t*a)}#ni(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=A(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadFountainPreset=qi,t.tsParticles=Ee}),Object.assign(globalThis.window||globalThis,{loadFountainPreset:(globalThis.__tsParticlesInternals.presets.fountain||{}).loadFountainPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Preset v4.
|
|
2
|
+
/* Preset v4.3.1 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/updater-destroy'), require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/plugin-trail'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/updater-destroy', '@tsparticles/plugin-emitters/plugin', '@tsparticles/plugin-trail', '@tsparticles/engine'], factory) :
|