@tsparticles/basic
Version:
Basic tsParticles bundle — minimal core engine with only the essential features for fast, lightweight particle animations. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.
2 lines • 96.9 kB
JavaScript
!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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},s={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const s=e.exec(t);if(s?.[1])return void console.error(`tsParticles - ${s[1]} - ${t.slice(s[0].length)}`,...i)}console.error(`tsParticles - Error - ${t}`,...i)},info:i(console.info),log:i(console.log),trace:i(console.trace),verbose:i(console.log),warning:i(console.warn)};function n(){return s}var a;t.MoveDirection=void 0,(a=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",a.bottomLeft="bottom-left",a.bottomRight="bottom-right",a.left="left",a.none="none",a.right="right",a.top="top",a.topLeft="top-left",a.topRight="top-right",a.outside="outside",a.inside="inside";const o="generated",r="100%",l="source-over",c="resize",d="visibilitychange",h=100,u=.5,p=1e3,g={x:0,y:0,z:0},f={a:1,b:0,c:0,d:1},m="random",y="mid",v=2*Math.PI,P="true",b="false",w="canvas",M=255,x=360,z=100,S=100,C=.25,O=.75,k=400;function I(t){return"z"in t?t.z:g.z}class D{x;y;z;constructor(t=g.x,e=g.y,i=g.z){this.x=t,this.y=e,this.z=i}static get origin(){return D.create(g.x,g.y,g.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 D.create(t.x,t.y,I(t))}static create(t,e,i){return"number"==typeof t?new D(t,e??g.y,i??g.z):new D(t.x,t.y,I(t))}add(t){return D.create(this.x+t.x,this.y+t.y,this.z+I(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=I(t)}copy(){return D.clone(this)}div(t){return D.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return D.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 D.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),g.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=I(t)}sub(t){return D.create(this.x-t.x,this.y-t.y,this.z-I(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=I(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class L extends D{constructor(t=g.x,e=g.y){super(t,e,g.z)}static get origin(){return L.create(g.x,g.y)}static clone(t){return L.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new L(t,e??g.y):new L(t.x,t.y)}}function _(t){return"boolean"==typeof t}function T(t){return"string"==typeof t}function R(t){return"number"==typeof t}function E(t,e){return Object.values(t).some(t=>t===e)}function A(t,e,i){return E(t,e)?e:i}function F(t){return"object"==typeof t&&null!==t}function B(t){return Array.isArray(t)}function U(t){return null==t}const V=Math.PI/180;let H=Math.random;const N={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function $(){return q(H(),0,1-Number.EPSILON)}function W(t,e){return $()*(e-t)+t}function j(t){return N.nextFrame(t)}function G(t){N.cancel(t)}function q(t,e,i){return Math.min(Math.max(t,e),i)}function X(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function Y(t){const e=K(t);let i=Z(t);return e===i&&(i=0),W(i,e)}function Q(t){return R(t)?t:Y(t)}function Z(t){return R(t)?t:t.min}function K(t){return R(t)?t:t.max}function J(t,e){if(t===e||void 0===e&&R(t))return t;const i=Z(t),s=K(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:J(i,s)}function tt(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function et(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function it(t,e){return Math.sqrt(et(t,e))}function st(t,e,i){return et(t,e)<=i*i}function nt(t){return t*V}function at(e,i,s){if(R(e))return nt(e);switch(e){case t.MoveDirection.top:return-Math.PI*u;case t.MoveDirection.topRight:return-Math.PI*C;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*C;case t.MoveDirection.bottom:return Math.PI*u;case t.MoveDirection.bottomLeft:return Math.PI*O;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*O;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return $()*v}}function ot(t){const e=L.origin;return e.length=1,e.angle=t,e}function rt(t,e,i,s){return L.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function lt(t){return{x:(t.position?.x??$()*h)*t.size.width/h,y:(t.position?.y??$()*h)*t.size.height/h}}function ct(t){const{position:e,size:i}=t;return{x:e?.x??$()*i.width,y:e?.y??$()*i.height}}function dt(t){return t?t.endsWith("%")?Number.parseFloat(t)/h:Number.parseFloat(t):1}const ht={engineVersionMismatch:"TSP-1001",particlePositionNotFound:"TSP-1002",pluginRegisterAfterLoad:"TSP-1003",offscreenCanvasUnsupported:"TSP-1101",offscreenCanvasTransferFailed:"TSP-1102",hdrEnableInvalid:"TSP-1201",hdrModeInvalid:"TSP-1202",hdrPeakNitsInvalid:"TSP-1203"};function ut(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var pt,gt;function ft(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function mt(){return globalThis.document}function yt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function vt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function Pt(t,e){return t===e||B(e)&&e.includes(t)}function bt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor($()*t.length)]}function wt(t,e,i,s,n){return Mt(xt(t,s??0),e,i,n)}function Mt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function xt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function zt(t,...e){for(const i of e){if(U(i))continue;if(!F(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):F(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return F(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(ft(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(ft(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>zt(void 0,t)):zt(e[s],n)}}return t}function St(t,e){return B(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Ct(t,e,i){return B(t)?bt(t,e,i):t}function Ot(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/h*i.width,y:e.y/h*i.height}:{width:e.width/h*i.width,height:e.height/h*i.height}}(e,i)}function kt(t){const e=mt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||U(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}let It,Dt;function Lt(t){if(It!==t||!Dt){It=t;const e=mt().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)}Dt=e}return Dt}function _t(t,e,i,s,n){if(s){let s={passive:!0};_(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 Tt(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}async function Rt(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function Et(t){const e=Ct(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(B(t))return t.every(t=>F(t)&&!B(t));return F(t)&&!B(t)}(e))return e;n().error("invalid configuration data while retrieving config file")}else n().error(`${t.status.toString()} while retrieving config file`)}catch(t){n().error(`error while retrieving config file: ${t}`)}return t.fallback}function At(t){let e;const i=mt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===w)e=t,e.dataset[o]??=b,e.dataset[o]===P&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(w).item(0);s?(e=s,e.dataset[o]=b):(e=i.createElement(w),e.dataset[o]=P,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}function Ft(t,e){const i=mt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[o]=P,i.body.append(s),s)}t.OutModeDirection=void 0,(pt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",pt.left="left",pt.right="right",pt.top="top",t.PixelMode=void 0,(gt=t.PixelMode||(t.PixelMode={})).precise="precise",gt.percent="percent";class Bt{#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 Ut,Vt,Ht,Nt,$t,Wt,jt,Gt,qt,Xt,Yt,Qt,Zt,Kt;t.EventType=void 0,(Ut=t.EventType||(t.EventType={})).configAdded="configAdded",Ut.containerInit="containerInit",Ut.particlesSetup="particlesSetup",Ut.containerStarted="containerStarted",Ut.containerStopped="containerStopped",Ut.containerDestroyed="containerDestroyed",Ut.containerPaused="containerPaused",Ut.containerPlay="containerPlay",Ut.containerBuilt="containerBuilt",Ut.particleAdded="particleAdded",Ut.particleDestroyed="particleDestroyed",Ut.particleRemoved="particleRemoved";class Jt{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=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}get initialized(){return this.#o}addColorManager(t,e){this.#o||this.colorManagers.set(t,e)}addConfig(e){if(this.#o)return;const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.#o||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#o||this.initializers.effects.set(t,e)}addPalette(t,e){this.#o||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#o||this.initializers.updaters.set(t,e)}addPlugin(t){this.#o||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#o||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#o)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}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 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}}}async register(...t){if(this.#o)throw new Error(ut(ht.pluginRegisterAfterLoad));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))}}class te{pluginManager=new Jt(this);#d=[];#h=new Bt;#o=!1;get items(){return this.#d}get version(){return"4.5.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(ut(ht.engineVersionMismatch,this.version))}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const{Container:i}=await Promise.resolve().then(function(){return Ss}),s=t.id??e?.id??`tsparticles${Math.floor(1e4*$()).toString()}`,{index:n,url:a}=t,o=Ct(a?await Et({fallback:t.options,url:a,index:n}):t.options,n),{items:r}=this,l=r.findIndex(t=>t.id.description===s),c=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(c);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:o});if(l>=0){const t=this.item(l),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),r.splice(l,e,c)}else r.push(c);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:At(Ft(s,e));return c.canvas.loadCanvas(d),await c.start(),c}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Vt||(Vt={}));class ee{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 ie extends ee{radius;constructor(t,e,i){super(t,e,Vt.circle),this.radius=i}contains(t){return st(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof ie||t.type===Vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof se||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 se extends ee{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 ie)return t.intersects(this);if(!(t instanceof se))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 ne(t,e,i){void 0!==i&&(t[e]=i)}function ae(t,e,i){void 0!==i&&(t[e]=J(i))}function oe(t,e,i){void 0!==i&&t[e].load(i)}function re(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function le(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}t.RotateDirection=void 0,(Ht=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ht.counterClockwise="counter-clockwise",Ht.random="random",t.AnimationMode=void 0,(Nt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Nt.increase="increase",Nt.decrease="decrease",Nt.random="random",t.HdrMode=void 0,($t=t.HdrMode||(t.HdrMode={})).standard="standard",$t.natural="natural",$t.vivid="vivid",$t.cinematic="cinematic",$t.dynamic="dynamic",t.LimitMode=void 0,(Wt=t.LimitMode||(t.LimitMode={})).delete="delete",Wt.wait="wait",t.OutMode=void 0,(jt=t.OutMode||(t.OutMode={})).bounce="bounce",jt.none="none",jt.out="out",jt.destroy="destroy",jt.split="split",t.AlterType=void 0,(Gt=t.AlterType||(t.AlterType={})).darken="darken",Gt.enlighten="enlighten",t.DestroyType=void 0,(qt=t.DestroyType||(t.DestroyType={})).none="none",qt.max="max",qt.min="min",t.GradientType=void 0,(Xt=t.GradientType||(t.GradientType={})).linear="linear",Xt.radial="radial",Xt.random="random",t.ParticleOutType=void 0,(Yt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Yt.inside="inside",Yt.outside="outside",t.StartValueType=void 0,(Qt=t.StartValueType||(t.StartValueType={})).max="max",Qt.min="min",Qt.random="random",t.AnimationStatus=void 0,(Zt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Zt.decreasing="decreasing",t.DrawLayer=void 0,(Kt=t.DrawLayer||(t.DrawLayer={}))[Kt.BackgroundElement=0]="BackgroundElement",Kt[Kt.BackgroundDraw=1]="BackgroundDraw",Kt[Kt.BackgroundMask=2]="BackgroundMask",Kt[Kt.CanvasSetup=3]="CanvasSetup",Kt[Kt.PluginContent=4]="PluginContent",Kt[Kt.Particles=5]="Particles",Kt[Kt.CanvasCleanup=6]="CanvasCleanup",Kt[Kt.Foreground=7]="Foreground";class ce{load(t){U(t)||this.doLoad(t)}}function de(t,...e){for(const i of e)t.load(i)}class he extends ce{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ae(this,"count",t.count),ne(this,"enable",t.enable),ae(this,"speed",t.speed),ae(this,"decay",t.decay),ae(this,"delay",t.delay),ne(this,"sync",t.sync)}}class ue extends he{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),ne(this,"mode",t.mode),ne(this,"startValue",t.startValue)}}class pe extends he{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),ne(this,"max",t.max),ne(this,"min",t.min),ae(this,"offset",t.offset)}}class ge extends ce{h=new pe(0,x);l=new pe(0,S);s=new pe(0,z);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class fe extends ce{value="";static create(t,e){const i=new fe;return i.load(t),void 0!==e&&(T(e)||B(e)?i.load({value:e}):i.load(e)),i}doLoad(t){U(t.value)||(this.value=t.value)}}class me extends fe{animation=new ge;static create(t,e){const i=new me;return i.load(t),void 0!==e&&(T(e)||B(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 ye extends ce{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new fe,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=fe.create(this.color,t.color)),ne(this,"element",t.element),ne(this,"draw",t.draw),ne(this,"image",t.image),ne(this,"position",t.position),ne(this,"repeat",t.repeat),ne(this,"size",t.size),ne(this,"opacity",t.opacity)}}class ve extends ce{enable=!0;zIndex=0;doLoad(t){ne(this,"enable",t.enable),ne(this,"zIndex",t.zIndex)}}class Pe extends ce{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!_(e.enable))throw new Error(ut(ht.hdrEnableInvalid,String(e.enable)));if(void 0!==e.mode&&!E(t.HdrMode,e.mode))throw new Error(ut(ht.hdrModeInvalid,Object.values(t.HdrMode).join(", "),(i=e.mode,String(i))));var i;if(void 0!==e.peakNits&&(!R(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(ut(ht.hdrPeakNitsInvalid,String(e.peakNits)));ne(this,"enable",e.enable),ne(this,"mode",e.mode),ne(this,"peakNits",e.peakNits)}}class be extends ce{delay=.5;enable=!0;doLoad(t){ne(this,"delay",t.delay),ne(this,"enable",t.enable)}}class we extends ce{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]=zt(this.options[t]??{},i))}ne(this,"close",t.close),ne(this,"type",t.type)}}class Me extends ce{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=me.create(this.color,t.color)),ne(this,"enable",t.enable),ae(this,"opacity",t.opacity)}}class xe extends ce{offset=0;value=90;doLoad(t){ae(this,"offset",t.offset),ae(this,"value",t.value)}}class ze extends ce{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){ne(this,"x",t.x),ne(this,"y",t.y),ne(this,"mode",t.mode),ne(this,"radius",t.radius)}}class Se extends ce{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ae(this,"acceleration",t.acceleration),ne(this,"enable",t.enable),ne(this,"inverse",t.inverse),ae(this,"maxSpeed",t.maxSpeed)}}class Ce extends ce{value=0;doLoad(t){U(t.value)||(this.value=J(t.value))}}class Oe extends Ce{animation=new he;doLoad(t){super.doLoad(t),oe(this,"animation",t.animation)}}class ke extends Oe{animation=new ue}class Ie extends ce{clamp=!0;delay=new Ce;enable=!1;generator;options={};doLoad(t){ne(this,"clamp",t.clamp),this.delay.load(t.delay),ne(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=zt(this.options,t.options))}}class De extends ce{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class Le extends ce{acceleration=0;enable=!1;position;doLoad(t){ae(this,"acceleration",t.acceleration),ne(this,"enable",t.enable),t.position&&(this.position=zt({},t.position))}}class _e extends ce{angle=new xe;center=new ze;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new Se;outModes=new De;path=new Ie;random=!1;size=!1;speed=2;spin=new Le;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(R(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ae(this,"decay",t.decay),ne(this,"direction",t.direction),void 0!==t.distance&&(this.distance=R(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ae(this,"drift",t.drift),ne(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(F(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),ne(this,"random",t.random),ne(this,"size",t.size),ae(this,"speed",t.speed),this.spin.load(t.spin),ne(this,"straight",t.straight),ne(this,"vibrate",t.vibrate),ne(this,"warp",t.warp)}}class Te extends ce{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=me.create(this.color,t.color)),ae(this,"width",t.width),ae(this,"opacity",t.opacity)}}class Re extends ce{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=me.create(this.color,t.color)),re(this,"fill",t.fill,()=>new Me),re(this,"stroke",t.stroke,()=>new Te)}}class Ee extends Ce{value=1}class Ae extends ce{horizontal=new Ee;vertical=new Ee;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Fe extends ce{enable=!1;height=1080;width=1920;doLoad(t){ne(this,"enable",t.enable),ne(this,"width",t.width),ne(this,"height",t.height)}}class Be extends ce{mode=t.LimitMode.delete;value=0;doLoad(t){ne(this,"mode",t.mode),ne(this,"value",t.value)}}class Ue extends ce{density=new Fe;limit=new Be;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),ne(this,"value",t.value)}}class Ve extends ce{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]=zt(this.options[t]??{},i))}ne(this,"close",t.close),ne(this,"type",t.type)}}class He extends Ce{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),ne(this,"opacityRate",t.opacityRate),ne(this,"sizeRate",t.sizeRate),ne(this,"velocityRate",t.velocityRate)}}class Ne extends ce{bounce=new Ae;effect=new we;groups={};move=new _e;number=new Ue;paint;palette;reduceDuplicates=!1;shape=new Ve;zIndex=new He;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Re,this.paint.color=new me,this.paint.color.value="#fff",this.paint.fill=new Me,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=zt(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&&(B(e)?this.paint=St(e,t=>{const e=new Re;return e.load(t),e}):B(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.#u.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(B(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function $e(t,e,...i){const s=new Ne(t,e);return de(s,...i),s}class We extends ce{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;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 ye,this.fullScreen=new ve,this.hdr=new Pe,this.particles=$e(this.#p,this.#u),this.resize=new be}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,St(this.preset,t=>{this.#f(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#g(this.palette)),ne(this,"autoPlay",e.autoPlay),ne(this,"clear",e.clear),ne(this,"key",e.key),ne(this,"name",e.name),ae(this,"delay",e.delay),ne(this,"detectRetina",e.detectRetina),ae(this,"duration",e.duration),ne(this,"fpsLimit",e.fpsLimit);const i=e.hdr;_(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),ne(this,"pauseOnBlur",e.pauseOnBlur),ne(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),ne(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;_(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=zt(this.style,e.style),ne(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const je=new Map,Ge=1.15,qe=1.05,Xe=.2126,Ye=.7152,Qe=.0722;function Ze(t,e){let i=je.get(t);return i||(i=e(),je.size>2e3&&je.clear(),je.set(t,i)),i}function Ke(t){return q(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function Je(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ti(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function ei(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function ii(t,e,i,s=!0){if(!e)return;const n=T(e)?{value:e}:e;if(T(n.value))return si(t,n.value,i,s);if(B(n.value)){const e=bt(n.value,i,s);if(!e)return;return ii(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function si(t,e,i,s=!0){if(!e)return;const n=T(e)?{value:e}:e;if(T(n.value))return n.value===m?hi():oi(t,n.value);if(B(n.value)){const e=bt(n.value,i,s);if(!e)return;return si(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function ni(t,e,i,s=!0){const n=ii(t,e,i,s);return n?ai(n):void 0}function ai(t){const e=t.r/M,i=t.g/M,s=t.b/M,n=Math.max(e,i,s),a=Math.min(e,i,s),o={h:0,l:(n+a)*u,s:0};return n!==a&&(o.s=o.l<u?(n-a)/(n+a):(n-a)/(2-n-a),o.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),o.l*=S,o.s*=z,o.h*=60,o.h<0&&(o.h+=x),o.h>=x&&(o.h-=x),o}function oi(t,e){return ei(t,e)}function ri(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 li(t){const e=(t.h%x+x)%x,i=Math.max(0,Math.min(z,t.s)),s=Math.max(0,Math.min(S,t.l)),n=e/x,a=i/z,o=s/S;if(0===i){const t=Math.round(o*M);return{r:t,g:t,b:t}}const r=o<u?o*(1+a):o+a-o*a,l=2*o-r,c=1/3,d=Math.min(M,M*ri(l,r,n+c)),h=Math.min(M,M*ri(l,r,n)),p=Math.min(M,M*ri(l,r,n-c));return{r:Math.round(d),g:Math.round(h),b:Math.round(p)}}function ci(t){const e=(t.h%x+x)%x,i=Math.max(0,Math.min(z,t.s)),s=Math.max(0,Math.min(S,t.l)),n=e/x,a=i/z,o=s/S;if(0===i){const t=o*M;return{r:t,g:t,b:t}}const r=o<u?o*(1+a):o+a-o*a,l=2*o-r,c=1/3;return{r:Math.min(M,M*ri(l,r,n+c)),g:Math.min(M,M*ri(l,r,n)),b:Math.min(M,M*ri(l,r,n-c))}}function di(t){const e=li(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function hi(t,e){const i=t??0;if(e)return{r:W(i,M),g:W(i,M),b:W(i,M)};const s=()=>Math.floor(W(i,256));return{b:s(),g:s(),r:s()}}function ui(e,i,s,n,a){const o=i?4:2,r=s??1;return Ze(i?`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-hdr-${r.toString()}-${(n??k).toString()}-${a??t.HdrMode.standard}`:`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const a=s/203,o=function(e,i,s,n){const a=e.r/M,o=e.g/M,r=e.b/M;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:o,r:a};const l=Math.max(1,i),c=Xe*a+Ye*o+Qe*r,d=function(t,e,i){if(t<=i)return Ke(t);const s=t+(t-i)*(e-1);return Ke(s)}(c,i,s),h=c>0?d/c:1;return function(e,i,s,n,a){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:q(q(t+(s-t)*Ge,0,a)*qe,0,a),g:q(q(t+(i-t)*Ge,0,a)*qe,0,a),r:q(q(t+(e-t)*Ge,0,a)*qe,0,a)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,o=(t+i+n)/3;return{b:q(o+1.1*(n-o),0,a),g:q(o+1.1*(i-o),0,a),r:q(o+1.1*(t-o),0,a)}}case t.HdrMode.dynamic:{const t=Xe*e+Ye*i+Qe*s,n=Math.min(1,2*t),o=1-n,r=(e+i+s)/3,l=q(r+(e-r)*Ge,0,a)*qe,c=q(r+(i-r)*Ge,0,a)*qe,d=q(r+(s-r)*Ge,0,a)*qe;return{b:q(s*o+d*n,0,a),g:q(i*o+c*n,0,a),r:q(e*o+l*n,0,a)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(q(a*h,0,l),q(o*h,0,l),q(r*h,0,l),n,l)}(e,a,.18,n);return`color(display-p3 ${o.r.toString()} ${o.g.toString()} ${o.b.toString()} / ${(i??1).toString()})`}(e,s,n,a):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function pi(e,i,s,n,a){const o=i?4:2,r=s??1;return Ze(i?`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-hdr-${r.toString()}-${(n??k).toString()}-${a??t.HdrMode.standard}`:`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-sdr-${r.toString()}`,()=>i?ui(ci(e),!0,s,n,a):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function gi(t,e,i,s,n){let a=t,o=e;if("r"in a||(a=n?ci(t):li(t)),"r"in o||(o=n?ci(e):li(e)),n){const t={b:Je(a.b/M),g:Je(a.g/M),r:Je(a.r/M)},e={b:Je(o.b/M),g:Je(o.g/M),r:Je(o.r/M)},n=i+s;return{b:ti((t.b*i+e.b*s)/n)*M,g:ti((t.g*i+e.g*s)/n)*M,r:ti((t.r*i+e.r*s)/n)*M}}return{b:X(a.b,o.b,i,s),g:X(a.g,o.g,i,s),r:X(a.r,o.r,i,s)}}function fi(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function mi(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:x},s:{enable:!1,value:t.s,min:0,max:z},l:{enable:!1,value:t.l,min:0,max:S}};return e&&(yi(s.h,e.h,i),yi(s.s,e.s,i),yi(s.l,e.l,i)),s}function yi(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=Q(i.speed)/h*s,e.decay=1-Q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=Q(i.count),e.time=0,e.delayTime=Q(i.delay)*p,i.sync||(e.velocity*=$(),e.value*=$()),e.initialValue=e.value,e.offset=J(i.offset)):e.velocity=0}function vi(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?Y(e.offset):0,o=(e.velocity??0)*s.factor+3.6*a,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=q(e.value,c,l)}function Pi(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;vi(s,!1,e),vi(n,!0,e),vi(a,!0,e)}function bi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const wi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new te}();class Mi{enable=!1;mode="destination-out";load(t){U(t)||(ne(this,"mode",t.mode),ne(this,"enable",t.enable))}}class xi{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 Mi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Mi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function zi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new xi)})}class Si{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:v};const n=i.circleRange;e.arc(g.x,g.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=F(s)?{min:nt(s.min),max:nt(s.max)}:{min:0,max:nt(s)}}}async function Ci(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Si))})}var Oi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Oi||(Oi={}));const ki=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ii=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Di{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(ki,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ii.exec(e);return i?{a:i[Oi.a]?Number.parseInt(i[Oi.a],16)/255:1,b:Number.parseInt(i[Oi.b]??"0",16),g:Number.parseInt(i[Oi.g]??"0",16),r:Number.parseInt(i[Oi.r]??"0",16)}:void 0}}async function Li(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Di)})}var _i;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(_i||(_i={}));const Ti=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ri{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 li(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return li({h:Q(e.h),l:Q(e.l),s:Q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ti.exec(t);return e?di({a:e.length>4?dt(e[_i.a]):1,h:Number.parseInt(e[_i.h]??"0",10),l:Number.parseInt(e[_i.l]??"0",10),s:Number.parseInt(e[_i.s]??"0",10)}):void 0}}async function Ei(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ri)})}class Ai{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ks});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Fi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initialized||(e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i))},t.pluginManager.addPlugin(new Ai(t.pluginManager))})}function Bi(e,i){const s=e.value,n=e.animation,a={delayTime:Q(n.delay)*p,enable:n.enable,value:Q(e.value)*i,max:K(s)*i,min:Z(s)*i,loops:0,maxLoops:Q(n.count),time:0};if(n.enable){switch(a.decay=1-Q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=$()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=Y(a),e&&(a.status=$()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function Ui(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=q(i.value,r,l))}}class Vi extends ue{destroy=t.DestroyType.none;load(t){super.load(t),U(t)||ne(this,"destroy",t.destroy)}}class Hi extends ke{animation=new Vi;value=1;load(t){if(U(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ni{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Bi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=Q(i.speed)/h*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=$()))}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){le(t,"opacity",Hi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ui(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function $i(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ni(t)))})}const Wi={[t.OutModeDirection.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[t.OutModeDirection.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[t.OutModeDirection.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[t.OutModeDirection.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class ji{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>!!t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;for(const t of this.#y)if(t.particleBounce?.(e,s,i))return;const a=e.getPosition(),o=e.offset,r=e.getRadius(),l=xt(a,r),c=this.#u.canvas.size,d=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||!(e.direction in Wi))return;const i=Wi[e.direction],s=e.bounds,n=e.canvasSize[i.canvas],a=e.particle.position,o=e.particle.velocity[i.axis];if(i.negative&&s[i.negativeEdge]<0?a[i.axis]=e.size+e.offset[i.axis]:!i.negative&&s[i.positiveEdge]>n&&(a[i.axis]=n-e.size-e.offset[i.axis]),!e.outOfCanvas||!(i.negative&&o<0||!i.negative&&o>0))return;e.particle.velocity[i.axis]*=-Q(e.particle.options.bounce[i.bounce].value);const r=e.offset[i.axis]+e.size;a[i.axis]=i.negative?r:n-r,e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:l,canvasSize:c,offset:o,outOfCanvas:d,size:r})}}class Gi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=tt(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class qi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,l=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;wt(e.position,o.canvas.size,g,l,i)||e.destroy()}}}const Xi=L.origin;class Yi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;if(e.outType===t.ParticleOutType.inside)this.#v(e,a);else{if(e.isInsideCanvasForOutMode(n,i))return;e.outType===t.ParticleOutType.outside?this.#P(e):this.#b(e,a,i)}}#v(t,e){const{x:i,y:s}=t.velocity;Xi.setTo(g),Xi.length=t.moveCenter.radius,Xi.angle=t.velocity.angle+Math.PI,Xi.addTo(t.moveCenter);const{dx:n,dy:a}=tt(t.position,Xi);if(i<=0&&n>=0||s<=0&&a>=0||i>=0&&n<=0||s>=0&&a<=0)return;t.position.x=Math.floor(Y({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(Y({min:0,max:e.canvas.size.height}));const{dx:o,dy:r}=tt(t.position,t.moveCenter);t.direction=Math.atan2(-r,-o),t.velocity.angle=t.direction,t.justWarped=!0}#b(e,i,s){const n=e.options.move.warp,a=i.canvas.size,o=e.getRadius(),r={bottom:a.height+o+e.offset.y,left:-o-e.offset.x,right:a.width+o+e.offset.x,top:-o-e.offset.y},l=xt(e.position,o);s===t.OutModeDirection.right&&l.left>a.width+e.offset.x?(e.position.x=r.left,e.initialPosition.x=e.position.x,n||(e.position.y=$()*a.height,e.initialPosition.y=e.position.y),e.justWarped=!0):s===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=r.right,e.initialPosition.x=e.position.x,n||(e.position.y=$()*a.height,e.initialPosition.y=e.position.y),e.justWarped=!0),s===t.OutModeDirection.bottom&&l.top>a.height+e.offset.y?(n||(e.position.x=$()*a.width,e.initialPosition.x=e.position.x),e.position.y=r.top,e.initialPosition.y=e.position.y,e.justWarped=!0):s===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(n||(e.position.x=$()*a.width,e.initialPosition.x=e.position.x),e.position.y=r.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0)}#P(t){t.position.x=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=tt(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class Qi{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#w(e,t.OutMode.bounce,t=>new ji(t)),this.#w(e,t.OutMode.out,t=>new Yi(t)),this.#w(e,t.OutMode.destroy,t=>new Gi(t)),this.#w(e,t.OutMode.none,t=>new qi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#M(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#M(e,i,s.left??s.default,t.OutModeDirection.left),this.#M(e,i,s.right??s.default,t.OutModeDirection.right),this.#M(e,i,s.top??s.default,t.OutModeDirection.top)}#w(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))}#M(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Zi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Qi(t)))})}class Ki{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=Ct(i.paint,t.id,i.reduceDuplicates);this.#x(s,t,e),this.#z(s,t,e)}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)&&(Pi(t.fillColor,e,this.#u.hdr),Pi(t.strokeColor,e,this.#u.hdr))}#x(t,e,i){const s=t?.fill,n=t?.color,a=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const o=me.create(void 0===a?void 0:me.create(void 0,a),s.color);e.fillEnabled=s.enable,e.fillOpacity=Q(s.opacity),e.fillAnimation=o.animation;const r=ni(this.#p,o);r&&(e.fillColor=mi(r,e.fillAnimation,i.retina.reduceFactor))}#z(t,e,i){const s=t?.stroke,n=t?.color,a=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const o=me.create(void 0===a?void 0:me.create(void 0,a),s.color);e.strokeWidth=Q(s.width)*i.retina.pixelRatio,e.strokeOpacity=Q(s.opacity??1),e.strokeAnimation=o.animation;const r=ni(this.#p,o)??e.getFillColor();r&&(e.strokeColor=mi(r,e.strokeAnimation,i.retina.reduceFactor))}}async function Ji(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ki(t.pluginManager,e)))})}var ts;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ts||(ts={}));const es=/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 is{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:Q(e.r),g:Q(e.g),b:Q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=es.exec(t);return e?{a:e.length>4?dt(e[ts.a]):1,b:parseInt(e[ts.b]??"0",10),g:parseInt(e[ts.g]??"0",10),r:parseInt(e[ts.r]??"0",10)}:void 0}}async function ss(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new is)})}class ns extends ue{destroy=t.DestroyType.none;load(t){super.load(t),U(t)||ne(this,"destroy",t.destroy)}}class as extends ke{animation=new ns;value=3;load(t){if(super.load(t),U(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class os{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/h*e.retina.reduceFactor,s.sync||(t.size.velocity*=$()))}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){le(t,"size",as,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Bi(i,e),t.retina.sizeAnimationSpeed=Q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ui(t,t.size,0,t.options.size.animation.destroy,e)}}async function rs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new os(t)))})}async function ls(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([zi(t),Li(t),Ei(t),ss(t),Fi(t),Ci(t),Ji(t),$i(t),Zi(t),rs(t)])})}const cs=globalThis;cs.loadBasic=ls,cs.tsParticles=wi;function ds(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class hs{#S;#C;#O;#k;#I;#u;#D;#L;#_;#T;#R;#E;#p;#A;#F;#B={};#U=[void 0,void 0];#V={};constructor(t,e,i){this.#p=t,this.#u=e,this.#k=i,this.#D=null,this.#S=null,this.#C=new Set,this.#F=[],this.#A=[],this.#O=[],this.#I=[],this.#_=[],this.#T=[],this.#R=[],this.#E={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#L}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(g.x,g.y,this.#k.size.width,this.#k.size.height)})}clear(){const e=new Set;for(const t of this.#O)if(e.add(t),t.canvasClear?.())return t;for(const i of Object.values(t.DrawLayer))if("number"==typeof i)for(const t of this.#H(i))if(!e.has(t)&&(e.add(t),t.canvasClear?.()))return t;this.canvasClear()}destroy(){this.stop(),this.#S=null,this.#C.clear(),this.#F=[],this.#A=[],this.#O=[],this.#I=[],this.#_=[],this.#T=[],this.#R=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#E[e]=[])}draw(t){const e=this.#D;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.#N(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#V,g=this.#B,f=a?pi(a,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=o?pi(o,r.hdr,u*h,r.peakNits,r.hdrMode):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#R)i.drawParticleSetup?.(s,t,e);this.#$(s,t,i,h,g,p),this.#W({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#j(t);for(const i of this.#T)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#_)this.#G(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u,n=this.clear();i.update(e),this.draw(a=>{const o=this.#k.size.width,r=this.#k.size.height;if(this.#S)try{a.drawImage(this.#S,g.x,g.y,o,r)}catch{this.#q("background-element-draw-error","Error drawing background element onto canvas")}const l=s.background;if(l.draw)try{l.draw(a,e)}catch{this.#q("background-draw-error","Error in background.draw callback")}for(const e of this.#H(t.DrawLayer.BackgroundMask))e!==n&&e.canvasPaint?.();for(const i of this.#H(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(a,e);for(const i of this.#H(t.DrawLayer.PluginContent))i.draw?.(a,e);i.drawParticles(e);for(const i of this.#H(t.DrawLayer.CanvasCleanup))i.clearDraw?.(a,e),i.drawSettingsCleanup?.(a,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#X(),this.paint()}initPlugins(){this.#O=[],this.#I=[],this.#_=[],this.#R=[],this.#T=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#E[e]=[]);this.#Y()}initUpdaters(){this.#F=[],this.#A=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#A.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#F.push(t)}paint(){let e=!1;for(const i of this.#H(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(g.x,g.y,this.#k.size.width,this.#k.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,g.x,g.y,this.#k.size.width,this.#k.size.height),i.globalAlpha=s})}setContext(t){this.#D=t,this.#D&&(this.#D.globalCompositeOperation=l)}setContextSettings(t){this.#L=t}stop(){this.draw(t=>{t.clearRect(g.x,g.y,this.#k.size.width,this.#k.size.height)})}#j(t){for(const e of this.#A)e.afterDraw?.(t)}#$(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)ds(a,t,e)}o.beforeDraw?.(e)}}#Q(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#Z(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#W(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#Z(y,m),this.#K(v,m),this.#J(v,m),this.#tt(v,m),this.#Q(y,m),i.resetTransform()}#G(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#J(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())}#tt(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#K(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#H(t){return this.#E[t]}#N(t){let e,i;for(const s of this.#I)if(!e&&s.particleFillColor&&(e=ni(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ni(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#U[0]=e,this.#U[1]=i,this.#U}#et(e){const i=[[t.DrawLayer.BackgroundMask,!!e.canvasPaint],[t.DrawLayer.CanvasSetup,!!e.drawSettingsSetup],[t.DrawLayer.PluginContent,!!e.draw],[t.DrawLayer.CanvasCleanup,!!(e.clearDraw??e.drawSettingsCleanup)]];for(const[t,s]of i)s&&this.#E[t].push(e)}#Y(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#I.push(t),t.drawParticle&&this.#_.push(t),t.drawParticleSetup&&this.#R.push(t),t.drawParticleCleanup&&this.#T.push(t),t.canvasClear&&this.#O.push(t),this.#et(t)}#it(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement}#X(){const t=this.#u.actualOptions.background;if(this.#S=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e&&this.#it(e)?this.#S=e:e?this.#q("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#q("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#it(t.element)&&(this.#S=t.element)}#q(t,e){this.#C.has(t)||(this.#C.add(t),n().warning(e))}}const us=new WeakMap;function ps(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 gs{domElement;render;renderCanvas;size;zoom=1;#u;#st;#nt;#at;#ot;#p;#rt;#lt;#ct;#dt;constructor(t,e){this.#p=t,this.#u=e,this.render=new hs(t,e,this),this.#ct={height:0,width:0};const i=e.retina.pixelRatio,s=this.#ct;this.size={height:s.height*i,width:s.width*i},this.#st=!1,this.#lt=[],this.#rt="none"}get#ht(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#st){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ut();this.render.destroy(),this.#lt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#dt?this.#dt:{x:e*u/t,y:i*u/t}}init(){this.#pt(t=>{t.disconnect()}),this.#at=vt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#gt()}),this.resize(),this.#ft(),this.#pt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#mt(),this.initBackground(),this.#yt(),this.render.init()}initBackground(){const e=this.#u,i=e.actualOptions.background,s=this.domElement;if(!s)return;const n=s.style,a=ii(this.#p,i.color);if(a){const s=e.actualOptions.hdr;n.backgroundColor=ui(a,e.hdr,i.opacity,s.peakNits,A(t.HdrMode,s.mode,t.HdrMode.standard))}else n.backgroundColor="";n.backgroundImage=i.image||"",n.backgroundPosition=i.position||"",n.backgroundRepeat=i.repeat||"",n.backgroundSize=i.size||""}initPlugins(){this.#lt=[];for(const t of this.#u.plugins)t.resize&&this.#lt.push(t)}loadCanvas(t){this.#st&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#st=!!e&&"true"===e.dataset[o],this.renderCanvas=e?(t=>{const e=us.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(ut(ht.offscreenCanvasUnsupported));try{const e=t.transferControlToOffscreen();return us.set(t,e),e}catch{throw new TypeError(ut(ht.offscreenCanvasTransferFailed))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#ot=kt(i.style));const s=this.#ct,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const a=this.#u.retina.pixelRatio,r=this.size;n.height=r.height=s.height*a,n.width=r.width=s.width*a}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.#ct,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.#rt=t,this.#gt())}setZoom(t,e){this.zoom=t,this.#dt=e}stop(){this.#pt(t=>{t.disconnect()}),this.#at=void 0,this.#vt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Pt(),e&&await t.refresh()}#Pt(){for(const t of this.#lt)t.resize?.()}#mt(){const e=this.#u,i=e.actualOptions.hdr.enable&&yt("(color-gamut: p3)")?.matches&&yt("(dynamic-range: high)")?.matches;e.hdrMode=A(t.HdrMode,e.actualOptions.hdr.mode,t.HdrMode.standard),e.peakNits=e.actualOptions.hdr.peakNits;const s=this.renderCanvas;if(!s)return void(e.hdr=i??!1);let n;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...i?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{n=s.getContext("2d",this.render.settings)}catch{n=null}if(i&&!n){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{n=s.getContext("2d",t)}catch{n=null}}if(this.render.setContext(n),n){const t=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(n);void 0!==t&&(e.hdr="display-p3"===t)}}#yt(){this.#vt();const t=yt("(color-gamut: p3)"),e=yt("(dynamic-range: high)"),i=()=>{this.#mt(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#nt=s}#ft(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#ht?this.#bt():this.#ut();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")}}}#vt(){if(this.#nt){for(const{handler:t,mql:e}of this.#nt)e.removeEventListener("change",t);this.#nt=void 0}}#gt(){const t=this.domElement;if(!t)return;this.#pt(t=>{t.disconnect()}),this.#ft(),this.initBackground();const e=this.#rt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#pt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ut(){const t=this.domElement,e=this.#ot;t&&e&&ps(t,e,!0)}#pt(t){this.#at&&t(this.#at)}#bt(){const t=this.domElement;t&&ps(t,Lt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class fs{#u;#wt;#Mt;#xt;constructor(t){this.#u=t,this.#wt={visibilityChange:()=>{this.#zt()},resize:()=>{this.#St()}}}addListeners(){this.#Ct(!0)}removeListeners(){this.#Ct(!1)}#zt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(mt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#St(){this.#xt&&(clearTimeout(this.#xt),this.#xt=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#xt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*p)}#Ct(t){const e=this.#wt;this.#Ot(t),_t(document,d,e.visibilityChange,t,!1)}#Ot(t){const e=this.#wt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void _t(globalThis,c,e.resize,t);const s=i.canvas.domElement;this.#Mt&&!t?(s&&this.#Mt.unobserve(s),this.#Mt.disconnect(),this.#Mt=void 0):!this.#Mt&&t&&s&&(this.#Mt=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#St()}),this.#Mt.observe(s))}}function ms(t){if(!Pt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function ys(t,e){const i=t%e;return i<0?i+e:i}function vs(t,e,i,s){const n=$e(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=Ct(n.effect.type,t.id,a),t.shape=Ct(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=Ct(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=Ct(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===m){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor($()*i.length)]}if(t.shape===m){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor($()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return zt({close:e.close},Ct(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 zt({close:e.close},Ct(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 Ps{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;#kt={fillOpacity:1,opacity:1,strokeOpacity:1};#It=D.origin;#Dt={sin:0,cos:0};#Lt={a:1,b:0,c:0,d:1};#u;#_t=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#_t.push(t),this.#_t.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#_t.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Tt(this.#Rt(fi(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*u}getModifier(t){return this.#_t.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=Q(this.opacity?.value??1),s=this.#Rt(void 0,t=>t.opacity)??i;return this.#kt.fillOpacity=this.fillOpacity??1,this.#kt.opacity=s*e,this.#kt.strokeOpacity=this.strokeOpacity??1,this.#kt}getPosition(){return this.#It.x=this.position.x+this.offset.x,this.#It.y=this.position.y+this.offset.y,this.#It.z=this.position.z,this.#It}getRadius(){return this.#Rt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Dt.sin=Math.sin(t),this.#Dt.cos=Math.cos(t),this.#Dt}getStrokeColor(){return this.#Tt(this.#Rt(fi(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Lt.a=e.cos*(t.a??f.a),this.#Lt.b=i?e.sin*(t.b??1):t.b??f.b,this.#Lt.c=i?-e.sin*(t.c??1):t.c??f.c,this.#Lt.d=e.cos*(t.d??f.d),this.#Lt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=vs(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#Et(i),this.initialVelocity=this.#At(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Ft({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Ft({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=ys(t,v);return e>=Math.PI*u&&e<3*Math.PI*u}if(this.roll.horizontal){const e=ys(t+Math.PI*u,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ys(t,v);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#_t.findIndex(e=>e.id===t);e>=0&&this.#_t.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Rt(t,e){let i=t;for(const t of this.#_t)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Bt(t,e){let i=0,s=t?D.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 D.create(i.x,i.y,e)}const t=ct({size:l,position:s}),c=D.create(t.x,t.y,e);this.#Ut(c,r,o.left??o.default),this.#Ut(c,r,o.right??o.default),this.#Vt(c,r,o.top??o.default),this.#Vt(c,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#At(){const e=this.options.move,i=ot(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=nt(Q(e.angle.value)),n=nt(Q(e.angle.offset)),a={left:n-s*u,right:n+s*u};return e.straight||(i.angle+=Y(J(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=$()),i}#Ut(e,i,s){ms({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Vt(e,i,s){ms({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Ht(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#Nt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ft(t){const e=this.#Ht(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.#Nt(t.direction,t.outMode),l=a?this.#$t(a(r),"shape"):void 0,c=o?this.#$t(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}#Tt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?bi(t,this.roll.alter.type,this.roll.alter.value):t:t}#Et(e){const i=this.#u,s=Math.floor(Q(this.options.zIndex.value)),n=this.#Bt(e,q(s,0,i.zLayers));if(!n)throw new Error(ut(ht.particlePositionNotFound));this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...Ot(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=at(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=L.origin}#$t(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class bs{#Wt;#jt=new Map;#Gt=[];#qt;#Xt;#Yt=[];#Qt;constructor(t){this.#Wt=t,this.#qt=0,this.#Qt=0}get cellSize(){return this.#Wt}set cellSize(t){this.#Xt=t}clear(){this.#jt.clear();const t=this.#Xt;t&&(this.#Wt=t),this.#Xt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Zt(e,i);this.#jt.has(s)||this.#jt.set(s,[]),this.#jt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Kt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Wt),a=Math.floor(s.maxX/this.#Wt),o=Math.floor(s.minY/this.#Wt),r=Math.floor(s.maxY/this.#Wt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++)this.#Jt(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#te(t.x,t.y,e),a=this.query(n,i,s);return this.#ee(),a}queryRectangle(t,e,i,s=[]){const n=this.#ie(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#ee(),a}#te(t,e,i){const s=this.#qt++;let n=this.#Gt[s];return n||(n=new ie(t,e,i),this.#Gt[s]=n),n.reset(t,e,i)}#ie(t,e,i,s){const n=this.#Qt++;let a=this.#Yt[n];return a||(a=new se(t,e,i,s),this.#Yt[n]=a),a.reset(t,e,i,s)}#Zt(t,e){return`${Math.floor(t/this.#Wt)}_${Math.floor(e/this.#Wt)}`}#Kt(t){if(t instanceof ie){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 se){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(t,e,i,s,n){const a=this.#jt.get(`${t}_${e}`);if(a)for(const t of a)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}#ee(){this.#qt=0,this.#Qt=0}}class ws{checkParticlePositionPlugins;#se;#u;#ne;#ae;#oe;#re;#le;#ce;#de;#p;#he;#ue;#pe;#ge;#fe;#me;constructor(t,e){this.#p=t,this.#u=e,this.#re=0,this.#se=[],this.#he=[],this.#oe=0,this.#ae=new Map,this.#le=new Map,this.#me=this.#ye(this.#u.zLayers),this.#ne=new bs(100),this.checkParticlePositionPlugins=[],this.#ce=[],this.#de=[],this.#pe=[],this.#ue=[],this.#fe=[]}get count(){return this.#se.length}get grid(){return this.#ne}addParticle(e,i,s,a){if(!this.#ve(s,this.count))try{const n=this.#he.pop()??new Ps(this.#p,this.#u);n.init(this.#re,e,i,s);let o=!0;return a&&(o=a(n)),o?(this.#se.push(n),this.#Pe(n),this.#re++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:n}),n):void this.#he.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#se=[],this.#le.clear(),this.#be(this.#u.zLayers)}destroy(){this.#se=[],this.#he.length=0,this.#le.clear(),this.#me=[],this.checkParticlePositionPlugins=[],this.#ce=[],this.#de=[],this.#pe=[],this.#ue=[],this.#fe=[]}drawParticles(t){for(let e=this.#me.length-1;e>=0;e--){const i=this.#me[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#se.filter(t)}find(t){return this.#se.find(t)}get(t){return this.#se[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#fe=[],this.#de=[],this.#pe=[],this.#ce=[],this.#ue=[],this.#le.clear(),this.#be(t.zLayers),this.#ne=new bs(100*t.retina.pixelRatio),this.#we(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#we($e(this.#p,this.#u,i),t,i)}await this.#Me()}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.#se.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let a=0;for(let o=t;a<e&&o<this.count;o++)this.#xe(o,i,s,n)&&(o--,a++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=$e(this.#p,this.#u,s);this.#ze(n,i,t)}this.#ze(t.particles,i)}setResizeFactor(t){this.#ge=t}update(t){this.#ne.clear();for(const e of this.#fe)e.update?.(t);const e=this.#Se(t);for(const e of this.#pe)e.postUpdate?.(t);if(this.#Ce(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#ge=void 0}#Oe(...t){this.#he.push(...t)}#ze(e,i,s,n){const a=e.number;if(!a.density.enable)return void this.#we(e,s,n);const o=this.#ke(a.density),r=a.value,l=a.limit.value>0?a.limit.value:r,c=Math.min(r,l)*o+i,d=Math.min(this.count,this.filter(t=>t.group===s).length);void 0===s?this.#oe=a.limit.value*o:this.#ae.set(s,{limit:a.limit.value*o,mode:A(t.LimitMode,a.limit.mode,t.LimitMode.delete)}),d<c?this.push(Math.abs(c-d),void 0,e,s):d>c&&this.removeQuantity(d-c,s)}#we(e,i,s){if(void 0===i){this.#oe=e.number.limit.value;const t=this.#u.actualOptions.particles.groups;for(const e of this.#ae.keys())e in t||this.#ae.delete(e)}else{const n=s?.number?.limit?.value??e.number.limit.value;n>0?this.#ae.set(i,{limit:n,mode:A(t.LimitMode,s?.number?.limit?.mode??e.number.limit.mode,t.LimitMode.delete)}):this.#ae.delete(i)}}#ve(e,i){const s=this.#oe,n=this.#u.actualOptions.particles.number.limit.mode;if(s>0&&n===t.LimitMode.wait&&i>=s)return!0;const a=void 0===e?void 0:this.#ae.get(e);if(a&&a.limit>0&&a.mode===t.LimitMode.wait){if(this.filter(t=>t.group===e).length>=a.limit)return!0}if(a&&a.limit>0&&a.mode===t.LimitMode.delete){const t=this.filter(t=>t.group===e).length+1-a.limit;t>0&&this.removeQuantity(t,e)}if(s>0&&n===t.LimitMode.delete){const t=this.count+1-s;t>0&&this.#Ie(t)}return!1}#ye(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#De(t){const e=this.#me.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ke(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}async#Le(){const t=this.#u;await t.initDrawersAndUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#Me(){await this.#_e(),await this.#Le();let t=!1;const e=this.#u;for(const i of e.plugins)if(t=i.particlesInitialization?.()??t,t)break;if(t)return;const i=e.actualOptions.particles,s=i.groups;for(const t in s){const e=s[t];if(e)for(let s=this.count,n=0;n<e.number.value&&s<i.number.value;s++,n++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#_e(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#fe.push(e),e.particleUpdate&&this.#de.push(e),e.postUpdate&&this.#pe.push(e),e.particleReset&&this.#ce.push(e),e.postParticleUpdate&&this.#ue.push(e)}#Pe(t){const e=this.#De(t.position.z),i=this.#me[e];i&&(i.push(t),this.#le.set(t.id,e))}#Ie(t){this.removeAt(0,t,void 0,void 0,!1)}#xe(e,i,s,n=!0){const a=this.#se[e];return!!a&&((!n||a.group===i)&&(this.#se.splice(e,1),this.#Te(a),a.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:a}),this.#Oe(a),!0))}#Te(t){const e=this.#le.get(t.id)??this.#De(t.position.z),i=this.#me[e];if(!i)return void this.#le.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#le.delete(t.id)}#be(t){const e=Math.max(Math.floor(t),1);if(this.#me.length===e)for(const t of this.#me)t.length=0;else this.#me=this.#ye(e)}#Re(t){const e=this.#De(t.position.z),i=this.#le.get(t.id);if(void 0===i)return void this.#Pe(t);if(i===e)return;const s=this.#me[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#me[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.#le.set(t.id,e)}else this.#le.set(t.id,e)}#Se(t){const e=new Set,i=this.#ge;for(const s of this.#se){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.#ce)t.particleReset?.(s);for(const e of this.#de){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#ne.insert(s)}return e}#Ce(t,e){for(const i of this.#se)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.#ue)e.postParticleUpdate?.(i,t);this.#Re(i)}}}class Ms{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=Q(s.gravity.maxSpeed)*i,a.moveDrift=Q(s.drift)*i,a.moveSpeed=Q(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function xs(t){return!t.destroyed}function zs(t,e,...i){const s=new We(t,e);return de(s,...i),s}var Ss=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#Ee;#Ae;#Fe={value:0,factor:0};#Be;#Ue;#Ve;#He;#Ne;#$e;#We;#je;#Ge;#qe;#Xe;#p;#Ye;#Qe;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#Be=i,this.#Ge=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#Ye=!1,this.#Ee=0,this.#Ve=0,this.#je=0,this.#Ne=!0,this.started=!1,this.destroyed=!1,this.#Xe=!0,this.#We=0,this.zLayers=100,this.pageHidden=!1,this.#Qe=o,this.#$e=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Ms(this),this.canvas=new gs(this.#p,this),this.particles=new ws(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#qe=zs(this.#p,this),this.actualOptions=zs(this.#p,this),this.#He=new fs(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Xe&&!this.pageHidden&&xs(this)}get options(){return this.#qe}get sourceOptions(){return this.#Qe}addLifeTime(t){this.#je+=t}alive(){return!this.#Ve||this.#je<=this.#Ve}destroy(e=!0){if(xs(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.destroyed=!0,this.#Ge(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Be(t,{container:this,data:e})}draw(t){if(!xs(this))return;let e=t;this.#Ue=j(t=>{e&&(this.#We=void 0,e=!1),this.#Ze(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}n().error(`Export plugin with type ${t} not found`)}async init(){if(!xs(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#qe=zs(this.#p,this,this.#$e,this.sourceOptions),this.actualOptions=zs(this.#p,this,this.#qe),this.#Me(e),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,smooth:a,zLayers:o}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=A(t.HdrMode,r.mode,t.HdrMode.standard),this.peakNits=r.peakNits,this.zLayers=o,this.#Ve=Q(s)*p,this.#Ee=Q(i)*p,this.#je=0,this.fpsLimit=n>0?n:120,this.#Ye=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await Rt(this,t.initializers.effects),this.shapeDrawers=await Rt(this,t.initializers.shapes),this.particleUpdaters=await Tt(this,t.initializers.updaters)}pause(){if(xs(this)&&(void 0!==this.#Ue&&(G(this.#Ue),this.#Ue=void 0),!this.#Xe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Xe=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!xs(this))return;const i=this.#Xe||e;if(!this.#Ne||this.actualOptions.autoPlay){if(this.#Xe&&(this.#Xe=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Ne=!1}async refresh(){if(xs(this))return this.stop(),this.start()}async reset(t){if(xs(this))return this.#$e=t,this.#Qe=t,this.#qe=zs(this.#p,this,this.#$e,this.sourceOptions),this.actualOptions=zs(this.#p,this,this.#qe),this.refresh()}async start(){xs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#He.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Ae=setTimeout(()=>{i()},this.#Ee)}))}stop(){if(xs(this)&&this.started){this.#Ae&&(clearTimeout(this.#Ae),this.#Ae=void 0),this.#Ne=!0,this.started=!1,this.#He.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.#Qe=this.#qe,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Me(t){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))}#Ze(t){try{if(!this.#Ye&&void 0!==this.#We&&t<this.#We+p/this.fpsLimit)return void this.draw(!1);if(this.#We??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/p}(this.#Fe,t-this.#We,this.fpsLimit,this.#Ye),this.addLifeTime(this.#Fe.value),this.#We=t,this.#Fe.value>p)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Fe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});var Cs=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#Ke;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??l,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ke&&(t.globalCompositeOperation=this.#Ke)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ke=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Os(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=q(t.velocity.x,-1,1),t.velocity.y=q(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var ks=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-Q(i.decay),e.pathDelay=Q(n.delay.value)*p,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:Q(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=it(i.getPosition(),a),r=Q(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:$()*v,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),o=n.retina.reduceFactor,r=e.retina.moveSpeed,l=e.retina.moveDrift,c=e.size.max,d=r*(s.size?e.getRadius()/c:1)*a*(i.factor||1)*u,h=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*o.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*o.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const r=Math.max(e.canvas.size.width,e.canvas.size.height),l=r*u;i.spin.radius>l?(i.spin.radius=l,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/r)}(n,e,d,o):Os(e,s,d,h,l,o,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=tt(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:o}=t.retina,r=o.horizontal,l=o.vertical;if(!r&&!l)return;if((r&&n>=r||l&&a>=l)&&!t.misplaced)t.misplaced=!!r&&n>r||!!l&&a>l,r&&(t.velocity.x=t.velocity.y*u-t.velocity.x),l&&(t.velocity.y=t.velocity.x*u-t.velocity.y);else if((!r||n<r)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;r&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-$()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-$())}}(e)}preInit(){return this.#Je()}redrawInit(){return this.#Je()}update(){for(const t of this.pathGenerators.values())t.update()}async#Je(){const t=this.#p;if(t.initializers.pathGenerators){this.availablePathGenerators=await Rt(this.#u,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});t.AnimatableColor=me,t.AnimationOptions=he,t.AnimationValueWithRandom=Oe,t.Background=ye,t.BaseRange=ee,t.Circle=ie,t.ColorAnimation=pe,t.ErrorCodes=ht,t.Fill=Me,t.FullScreen=ve,t.HDROptions=Pe,t.HslAnimation=ge,t.Move=_e,t.MoveAngle=xe,t.MoveCenter=ze,t.MoveGravity=Se,t.MovePath=Ie,t.OptionLoader=ce,t.Options=We,t.OptionsColor=fe,t.OutModes=De,t.Paint=Re,t.ParticlesBounce=Ae,t.ParticlesBounceFactor=Ee,t.ParticlesDensity=Fe,t.ParticlesNumber=Ue,t.ParticlesNumberLimit=Be,t.ParticlesOptions=Ne,t.RangedAnimationOptions=ue,t.RangedAnimationValueWithRandom=ke,t.Rectangle=se,t.ResizeEvent=be,t.Shape=Ve,t.Spin=Le,t.Stroke=Te,t.ValueWithRandom=Ce,t.Vector=L,t.Vector3d=D,t.ZIndex=He,t.addErrorMessages=function(t){},t.alterHsl=bi,t.animate=j,t.areBoundsInside=Mt,t.calcExactPositionOrRandomFromSize=ct,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/h,y:t.position.y*t.size.height/h}:void 0},t.calcPositionOrRandomFromSize=lt,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?Q(t.position.x):void 0,y:void 0!==t.position?.y?Q(t.position.y):void 0};return lt({size:t.size,position:e})},t.calculateBounds=xt,t.cancelAnimation=G,t.canvasFirstIndex=0,t.canvasTag=w,t.checkDistance=st,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=tt(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=rt(h,u,c,d),g=rt(u,h,c,d),f=p.rotate(-l),m=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:L.create(Q(t.options.bounce.horizontal.value),Q(t.options.bounce.vertical.value))}},t.clamp=q,t.cloneStyle=kt,t.collisionVelocity=rt,t.colorMix=gi,t.colorToRgb=si,t.countOffset=1,t.decayOffset=1,t.deepExtend=zt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=l,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=f,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=nt,t.deleteCount=1,t.double=2,t.doublePI=v,t.empty=0,t.executeOnSingleOrMultiple=St,t.fullPercent=r,t.generatedAttribute=o,t.generatedFalse=b,t.generatedTrue=P,t.getCanvasFromContainer=At,t.getDataFromUrl=Et,t.getDistance=it,t.getDistanceSq=et,t.getDistances=tt,t.getDomContainer=Ft,t.getErrorMessage=ut,t.getFullScreenStyle=Lt,t.getHslAnimationFromHsl=mi,t.getHslFromAnimation=fi,t.getItemMapFromInitializer=Rt,t.getItemsFromInitializer=Tt,t.getLinkColor=function(t,e,i,s){if(i===m)return hi();if(i!==y)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return gi(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return li(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=T(e)?e:e.value;return n===m?s?ii(t,{value:n}):i?m:y:n===y?y:ii(t,{value:n})},t.getLogger=n,t.getParticleBaseVelocity=ot,t.getParticleDirectionAngle=at,t.getPosition=Ot,t.getRandom=$,t.getRandomFn=function(){return H},t.getRandomInRange=W,t.getRandomRgbColor=hi,t.getRangeMax=K,t.getRangeMin=Z,t.getRangeValue=Q,t.getStyleFromHsl=pi,t.getStyleFromRgb=ui,t.hMax=x,t.hMin=0,t.hPhase=60,t.half=u,t.hslToRgb=li,t.hslToRgbFloat=ci,t.hslaToRgba=di,t.identity=1,t.inverseFactorNumerator=1,t.isArray=B,t.isBoolean=_,t.isEnumValue=E,t.isFunction=function(t){return"function"==typeof t},t.isInArray=Pt,t.isNull=U,t.isNumber=R,t.isObject=F,t.isPointInside=wt,t.isString=T,t.itemFromArray=bt,t.itemFromSingleOrMultiple=Ct,t.lFactor=1,t.lMax=S,t.lMin=0,t.lengthOffset=1,t.loadBasic=ls,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,a=Object.hasOwn(n,s)?n[s]:{};n[s]=zt(a,i)}},t.loadLazyProperty=re,t.loadMinIndex=0,t.loadNestedProperty=oe,t.loadOptionProperty=le,t.loadOptions=de,t.loadParticlesOptions=$e,t.loadProperty=ne,t.loadRandomFactor=1e4,t.loadRangeProperty=ae,t.manageListener=_t,t.maxNits=k,t.midColorValue=y,t.millisecondsToSeconds=p,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=X,t.none=0,t.one=1,t.originPoint=g,t.parseAlpha=dt,t.percentDenominator=h,t.phaseNumerator=1,t.quarter=C,t.randomColorValue=m,t.randomInRangeValue=Y,t.rangeColorToHsl=ni,t.rangeColorToRgb=ii,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=c,t.rgbMax=M,t.rgbToHsl=ai,t.sMax=z,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=mt,t.safeMatchMedia=yt,t.safeMutationObserver=vt,t.setAnimationFunctions=function(t,e){N.nextFrame=t,N.cancel=e},t.setLogger=function(t){t.debug&&(s.debug=i(t.debug)),t.error&&(s.error=i(t.error)),t.info&&(s.info=i(t.info)),t.log&&(s.log=i(t.log)),t.trace&&(s.trace=i(t.trace)),t.verbose&&(s.verbose=i(t.verbose)),t.warning&&(s.warning=i(t.warning))},t.setRandom=function(t=Math.random){H=t},t.setRangeValue=J,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return ei(t,e)?.a},t.stringToRgb=oi,t.threeQuarter=O,t.toEnumValue=A,t.triple=3,t.tryCountIncrement=1,t.tsParticles=wi,t.updateColor=Pi,t.updateColorValue=vi,t.visibilityChangeEvent=d,t.zIndexFactorOffset=1}(t.__tsParticlesInternals.bundles.basic=t.__tsParticlesInternals.bundles.basic||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadBasic:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadBasic,loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.basic||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.basic||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.basic||{});