tsparticles
Version:
Full-featured tsParticles bundle — create stunning particle, confetti and fireworks animations with all official plugins and presets included. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inf
2 lines • 211 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 o;t.MoveDirection=void 0,(o=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",o.bottomLeft="bottom-left",o.bottomRight="bottom-right",o.left="left",o.none="none",o.right="right",o.top="top",o.topLeft="top-left",o.topRight="top-right",o.outside="outside",o.inside="inside";const a="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,b="true",w="false",x="canvas",M=255,P=360,k=100,C=100,O=.25,z=.75,S=1e4,D=400;function I(t){return"z"in t?t.z:g.z}class T{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 T.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 T.create(t.x,t.y,I(t))}static create(t,e,i){return"number"==typeof t?new T(t,e??g.y,i??g.z):new T(t.x,t.y,I(t))}add(t){return T.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 T.clone(this)}div(t){return T.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x*this.x+this.y*this.y}mult(t){return T.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 T.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 T.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 E extends T{constructor(t=g.x,e=g.y){super(t,e,g.z)}static get origin(){return E.create(g.x,g.y)}static clone(t){return E.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new E(t,e??g.y):new E(t.x,t.y)}}function R(t){return"boolean"==typeof t}function L(t){return"string"==typeof t}function A(t){return"number"==typeof t}function F(t,e){return Object.values(t).some(t=>t===e)}function _(t,e,i){return F(t,e)?e:i}function V(t){return"object"==typeof t&&null!==t}function B(t){return Array.isArray(t)}function H(t){return null==t}const q=Math.PI/180;let N=Math.random;const U={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function j(){return X(N(),0,1-Number.EPSILON)}function W(t,e){return j()*(e-t)+t}function $(t){return U.nextFrame(t)}function G(t){U.cancel(t)}function X(t,e,i){return Math.min(Math.max(t,e),i)}function Y(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function Z(t){const e=J(t);let i=Q(t);return e===i&&(i=0),W(i,e)}function K(t){return A(t)?t:Z(t)}function Q(t){return A(t)?t:t.min}function J(t){return A(t)?t:t.max}function tt(t,e){if(t===e||void 0===e&&A(t))return t;const i=Q(t),s=J(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:tt(i,s)}function et(t,e){return Math.sqrt(t*t+e*e)}function it(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function st(t,e){return Math.sqrt(it(t,e))}function nt(t,e,i){return it(t,e)<=i*i}function ot(t){return t*q}function at(e,i,s){if(A(e))return ot(e);switch(e){case t.MoveDirection.top:return-Math.PI*u;case t.MoveDirection.topRight:return-Math.PI*O;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*O;case t.MoveDirection.bottom:return Math.PI*u;case t.MoveDirection.bottomLeft:return Math.PI*z;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*z;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 j()*v}}function rt(t){const e=E.origin;return e.length=1,e.angle=t,e}function lt(t,e,i,s){return E.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function ct(t){return{x:(t.position?.x??j()*h)*t.size.width/h,y:(t.position?.y??j()*h)*t.size.height/h}}function dt(t){const e={x:void 0!==t.position?.x?K(t.position.x):void 0,y:void 0!==t.position?.y?K(t.position.y):void 0};return ct({size:t.size,position:e})}function ht(t){const{position:e,size:i}=t;return{x:e?.x??j()*i.width,y:e?.y??j()*i.height}}function ut(t){return t?t.endsWith("%")?Number.parseFloat(t)/h:Number.parseFloat(t):1}const pt={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 gt(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var ft,mt;function yt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function vt(){return globalThis.document}function bt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function wt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function xt(t,e){return t===e||B(e)&&e.includes(t)}function Mt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(j()*t.length)]}function Pt(t,e,i,s,n){return kt(Ct(t,s??0),e,i,n)}function kt(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function Ct(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Ot(t,...e){for(const i of e){if(H(i))continue;if(!V(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):V(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return V(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(yt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(yt(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>Ot(void 0,t)):Ot(e[s],n)}}return t}function zt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:E.create(K(t.options.bounce.horizontal.value),K(t.options.bounce.vertical.value))}}function St(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],a=o.x-n.x,r=o.y-n.y;if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=lt(h,u,c,d),g=lt(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}function Dt(t,e){return B(t)?t.map((t,i)=>e(t,i)):e(t,0)}function It(t,e,i){return B(t)?Mt(t,e,i):t}function Tt(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 Et(t){const e=vt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||H(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}let Rt,Lt;function At(t){if(Rt!==t||!Lt){Rt=t;const e=vt().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)}Lt=e}return Lt}function Ft(t,e,i,s,n){if(s){let s={passive:!0};R(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 _t(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}async function Vt(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function Bt(t){const e=It(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=>V(t)&&!B(t));return V(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 Ht(t){let e;const i=vt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===x)e=t,e.dataset[a]??=w,e.dataset[a]===b&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(x).item(0);s?(e=s,e.dataset[a]=w):(e=i.createElement(x),e.dataset[a]=b,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}function qt(t,e){const i=vt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[a]=b,i.body.append(s),s)}t.OutModeDirection=void 0,(ft=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ft.left="left",ft.right="right",ft.top="top",t.PixelMode=void 0,(mt=t.PixelMode||(t.PixelMode={})).precise="precise",mt.percent="percent";class Nt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);const i=this.#e.get(t);this.#e.set(t,i?[...i,e]:[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):this.#e.set(t,[...i.slice(0,n),...i.slice(n+1)]))}}var Ut,jt,Wt,$t,Gt,Xt,Yt,Zt,Kt,Qt,Jt,te,ee,ie;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 se{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;presets=new Map;#i=0;#s=new Set;#n=new Map;#o;#a=new Set;#r=new Set;#l=!1;#c;#d=!1;#h;#u=new Set;#p=[];#g;constructor(t){this.#o=t;const e=new WeakMap,i=()=>this.#i>0?Promise.resolve():t.init();this.#h=new Proxy(t,{get:(t,s)=>{if("init"===s)return i;const n=Reflect.get(t,s,t);if("function"!=typeof n)return n;let o=e.get(n);return o||(o=(...e)=>Reflect.apply(n,t,e),e.set(n,o)),o}})}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}get initialized(){return this.#l}get plugins(){return this.#g??=Object.freeze([...this.#p])}addColorManager(t,e){this.#f(),this.colorManagers.set(t,e)}addConfig(e){this.#f();const i=e.key??e.name??"default";this.#n.set(i,e),this.#o.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.#f(),this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#f(),this.initializers.effects.set(t,e)}addPalette(t,e){this.#f(),this.palettes.set(t,e)}addParticleUpdater(t,e){this.#f(),this.initializers.updaters.set(t,e)}addPlugin(t){if(!this.#d)throw new Error(gt(pt.pluginRegisterAfterLoad));this.getPlugin(t.id)||(this.#p.push(t),this.#g=void 0)}addPreset(t,e,i=!1){this.#f(),!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){this.#f();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.#p.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async init(){if(!this.#l)return this.#c||(this.#c=Promise.resolve().then(async()=>{this.#d=!0,this.#s=new Set(this.#u);try{for(;this.#r.size>0||[...this.#s].some(t=>!this.#a.has(t));){for(const t of this.#s)await this.#m(t,this.#a,this.#s);const t=[...this.#r];t.length&&await Promise.all(t)}this.#u.clear(),this.#l=!0}finally{this.#d=!1,this.#c=void 0}})),this.#c}async register(...t){this.#f();for(const e of t)this.#d?(this.#u.add(e),await this.#m(e,this.#a,this.#s)):this.#u.add(e)}#f(){if(this.#l)throw new Error(gt(pt.pluginRegisterAfterLoad))}async#m(t,e,i){if(e.has(t))return;e.add(t),i.add(t),this.#i++;const s=(async()=>t(this.#h))();this.#r.add(s);try{await s}catch(i){throw e.delete(t),i}finally{this.#i--,this.#r.delete(s)}}}class ne{pluginManager=new se(this);#y=0;#v=new WeakMap;#b=[];#w=new Nt;#l=!1;#x=0;#M=new Map;get items(){return this.#b}get version(){return"4.6.0"}addEventListener(t,e){this.#w.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(gt(pt.engineVersionMismatch,this.version))}dispatchEvent(t,e){this.#w.dispatchEvent(t,e)}async init(){this.#l||(await this.pluginManager.init(),this.#l=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const i=t.id??(e?this.#P(e):void 0)??`tsparticles${Math.floor(j()*S).toString()}`,s=++this.#x;this.#M.set(i,s);try{await this.init();const{Container:n}=await Promise.resolve().then(function(){return bl}),{index:o,url:a}=t,r=a?await Bt({fallback:t.options,url:a,index:o}):t.options;if(this.#M.get(i)!==s)return;const l=It(r,o),{items:c}=this,d=c.findIndex(t=>t.id.description===i),h=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:i,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:Ht(qt(i,e));h.canvas.loadCanvas(u);try{await h.start()}catch(t){h.destroy(!1);const e=c.indexOf(h);throw e>=0&&c.splice(e,1),t}if(h.destroyed)return;return h}finally{this.#M.get(i)===s&&this.#M.delete(i)}}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#w.removeEventListener(t,e)}#k(t){let e=this.#v.get(t);return e||(e=`tsparticles${Math.floor(j()*S).toString()}_${this.#y++}`,this.#v.set(t,e)),e}#P(t){return t.id.length?t.id:this.#k(t)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(jt||(jt={}));class oe{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 ae extends oe{radius;constructor(t,e,i){super(t,e,jt.circle),this.radius=i}contains(t){return nt(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=i.x-e.x,o=i.y-e.y;if(t instanceof ae||t.type===jt.circle){const e=s+t.radius;return e>0&&n*n+o*o<e*e}if(t instanceof re||t.type===jt.rectangle){const e=t,{width:i,height:a}=e.size,r=Math.abs(n),l=Math.abs(o),c=r-i,d=l-a;return c*c+d*d<=s*s||r<=s+i&&l<=s+a||r<=i||l<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class re extends oe{size;constructor(t,e,i,s){super(t,e,jt.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 ae)return t.intersects(this);if(!(t instanceof re))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>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 le(t,e,i){void 0!==i&&(t[e]=i)}function ce(t,e,i){void 0!==i&&(t[e]=tt(i))}function de(t,e,i){void 0!==i&&t[e].load(i)}function he(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function ue(t,e,i,...s){const n=t;n[e]??=new i;const o=n[e];for(const t of s)o.load(t?.[e])}t.RotateDirection=void 0,(Wt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Wt.counterClockwise="counter-clockwise",Wt.random="random",t.AnimationMode=void 0,($t=t.AnimationMode||(t.AnimationMode={})).auto="auto",$t.increase="increase",$t.decrease="decrease",$t.random="random",t.HdrMode=void 0,(Gt=t.HdrMode||(t.HdrMode={})).standard="standard",Gt.natural="natural",Gt.vivid="vivid",Gt.cinematic="cinematic",Gt.dynamic="dynamic",t.LimitMode=void 0,(Xt=t.LimitMode||(t.LimitMode={})).delete="delete",Xt.wait="wait",t.OutMode=void 0,(Yt=t.OutMode||(t.OutMode={})).bounce="bounce",Yt.none="none",Yt.out="out",Yt.destroy="destroy",Yt.split="split",t.AlterType=void 0,(Zt=t.AlterType||(t.AlterType={})).darken="darken",Zt.enlighten="enlighten",t.DestroyType=void 0,(Kt=t.DestroyType||(t.DestroyType={})).none="none",Kt.max="max",Kt.min="min",t.GradientType=void 0,(Qt=t.GradientType||(t.GradientType={})).linear="linear",Qt.radial="radial",Qt.random="random",t.ParticleOutType=void 0,(Jt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Jt.inside="inside",Jt.outside="outside",t.StartValueType=void 0,(te=t.StartValueType||(t.StartValueType={})).max="max",te.min="min",te.random="random",t.AnimationStatus=void 0,(ee=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",ee.decreasing="decreasing",t.DrawLayer=void 0,(ie=t.DrawLayer||(t.DrawLayer={}))[ie.BackgroundElement=0]="BackgroundElement",ie[ie.BackgroundDraw=1]="BackgroundDraw",ie[ie.BackgroundMask=2]="BackgroundMask",ie[ie.CanvasSetup=3]="CanvasSetup",ie[ie.PluginContent=4]="PluginContent",ie[ie.Particles=5]="Particles",ie[ie.CanvasCleanup=6]="CanvasCleanup",ie[ie.Foreground=7]="Foreground";class pe{load(t){H(t)||this.doLoad(t)}}function ge(t,...e){for(const i of e)t.load(i)}class fe extends pe{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ce(this,"count",t.count),le(this,"enable",t.enable),ce(this,"speed",t.speed),ce(this,"decay",t.decay),ce(this,"delay",t.delay),le(this,"sync",t.sync)}}class me extends fe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),le(this,"mode",t.mode),le(this,"startValue",t.startValue)}}class ye extends fe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),le(this,"max",t.max),le(this,"min",t.min),ce(this,"offset",t.offset)}}class ve extends pe{h=new ye(0,P);l=new ye(0,C);s=new ye(0,k);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class be extends pe{value="";static create(t,e){const i=new be;return i.load(t),void 0!==e&&(L(e)||B(e)?i.load({value:e}):i.load(e)),i}doLoad(t){H(t.value)||(this.value=t.value)}}class we extends be{animation=new ve;static create(t,e){const i=new we;return i.load(t),void 0!==e&&(L(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 xe extends pe{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new be,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=be.create(this.color,t.color)),le(this,"element",t.element),le(this,"draw",t.draw),le(this,"image",t.image),le(this,"position",t.position),le(this,"repeat",t.repeat),le(this,"size",t.size),le(this,"opacity",t.opacity)}}class Me extends pe{enable=!0;zIndex=0;doLoad(t){le(this,"enable",t.enable),le(this,"zIndex",t.zIndex)}}class Pe extends pe{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!R(e.enable))throw new Error(gt(pt.hdrEnableInvalid,String(e.enable)));if(void 0!==e.mode&&!F(t.HdrMode,e.mode))throw new Error(gt(pt.hdrModeInvalid,Object.values(t.HdrMode).join(", "),(i=e.mode,String(i))));var i;if(void 0!==e.peakNits&&(!A(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(gt(pt.hdrPeakNitsInvalid,String(e.peakNits)));le(this,"enable",e.enable),le(this,"mode",e.mode),le(this,"peakNits",e.peakNits)}}class ke extends pe{delay=.5;enable=!0;doLoad(t){le(this,"delay",t.delay),le(this,"enable",t.enable)}}class Ce extends pe{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]=Ot(this.options[t]??{},i))}le(this,"close",t.close),le(this,"type",t.type)}}class Oe extends pe{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=we.create(this.color,t.color)),le(this,"enable",t.enable),ce(this,"opacity",t.opacity)}}class ze extends pe{offset=0;value=90;doLoad(t){ce(this,"offset",t.offset),ce(this,"value",t.value)}}class Se extends pe{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){le(this,"x",t.x),le(this,"y",t.y),le(this,"mode",t.mode),le(this,"radius",t.radius)}}class De extends pe{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ce(this,"acceleration",t.acceleration),le(this,"enable",t.enable),le(this,"inverse",t.inverse),ce(this,"maxSpeed",t.maxSpeed)}}class Ie extends pe{value=0;doLoad(t){H(t.value)||(this.value=tt(t.value))}}class Te extends Ie{animation=new fe;doLoad(t){super.doLoad(t),de(this,"animation",t.animation)}}class Ee extends Te{animation=new me}class Re extends pe{clamp=!0;delay=new Ie;enable=!1;generator;options={};doLoad(t){le(this,"clamp",t.clamp),this.delay.load(t.delay),le(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=Ot(this.options,t.options))}}class Le extends pe{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 Ae extends pe{acceleration=0;enable=!1;position;doLoad(t){ce(this,"acceleration",t.acceleration),le(this,"enable",t.enable),t.position&&(this.position=Ot({},t.position))}}class Fe extends pe{angle=new ze;center=new Se;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new De;outModes=new Le;path=new Re;random=!1;size=!1;speed=2;spin=new Ae;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(A(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ce(this,"decay",t.decay),le(this,"direction",t.direction),void 0!==t.distance&&(this.distance=A(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ce(this,"drift",t.drift),le(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(V(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),le(this,"random",t.random),le(this,"size",t.size),ce(this,"speed",t.speed),this.spin.load(t.spin),le(this,"straight",t.straight),le(this,"vibrate",t.vibrate),le(this,"warp",t.warp)}}class _e extends pe{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=we.create(this.color,t.color)),ce(this,"width",t.width),ce(this,"opacity",t.opacity)}}class Ve extends pe{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=we.create(this.color,t.color)),he(this,"fill",t.fill,()=>new Oe),he(this,"stroke",t.stroke,()=>new _e)}}class Be extends Ie{value=1}class He extends pe{horizontal=new Be;vertical=new Be;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class qe extends pe{enable=!1;height=1080;width=1920;doLoad(t){le(this,"enable",t.enable),le(this,"width",t.width),le(this,"height",t.height)}}class Ne extends pe{mode=t.LimitMode.delete;value=0;doLoad(t){le(this,"mode",t.mode),le(this,"value",t.value)}}class Ue extends pe{density=new qe;limit=new Ne;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),le(this,"value",t.value)}}class je extends pe{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]=Ot(this.options[t]??{},i))}le(this,"close",t.close),le(this,"type",t.type)}}class We extends Ie{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),le(this,"opacityRate",t.opacityRate),le(this,"sizeRate",t.sizeRate),le(this,"velocityRate",t.velocityRate)}}class $e extends pe{bounce=new He;effect=new Ce;groups={};move=new Fe;number=new Ue;paint;palette;reduceDuplicates=!1;shape=new je;zIndex=new We;#C;#O;constructor(t,e){super(),this.#O=t,this.#C=e,this.paint=new Ve,this.paint.color=new we,this.paint.color.value="#fff",this.paint.fill=new Oe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#z(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]=Ot(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=Dt(e,t=>{const e=new Ve;return e.load(t),e}):B(this.paint)?(this.paint=new Ve,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#C){for(const e of this.#O.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#C,this,t);const e=this.#C.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#z(t){const e=this.#O.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 Ge(t,e,...i){const s=new $e(t,e);return ge(s,...i),s}class Xe extends pe{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;#C;#O;constructor(t,e){super(),this.#O=t,this.#C=e,this.background=new xe,this.fullScreen=new Me,this.hdr=new Pe,this.particles=Ge(this.#O,this.#C),this.resize=new ke}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,Dt(this.preset,t=>{this.#S(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#z(this.palette)),le(this,"autoPlay",e.autoPlay),le(this,"clear",e.clear),le(this,"key",e.key),le(this,"name",e.name),ce(this,"delay",e.delay),le(this,"detectRetina",e.detectRetina),ce(this,"duration",e.duration),le(this,"fpsLimit",e.fpsLimit);const i=e.hdr;R(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),le(this,"pauseOnBlur",e.pauseOnBlur),le(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),le(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;R(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=Ot(this.style,e.style),le(this,"smooth",e.smooth),this.#O.plugins.forEach(t=>{t.loadOptions(this.#C,this,e)})}#z(t){const e=this.#O.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#S(t){this.load(this.#O.getPreset(t))}}const Ye=new Map,Ze=1.15,Ke=1.05,Qe=.2126,Je=.7152,ti=.0722;function ei(t,e){let i=Ye.get(t);return i||(i=e(),Ye.size>2e3&&Ye.clear(),Ye.set(t,i)),i}function ii(t){return X(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function si(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ni(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function oi(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function ai(t,e,i,s=!0){if(!e)return;const n=L(e)?{value:e}:e;if(L(n.value))return ri(t,n.value,i,s);if(B(n.value)){const e=Mt(n.value,i,s);if(!e)return;return ai(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function ri(t,e,i,s=!0){if(!e)return;const n=L(e)?{value:e}:e;if(L(n.value))return n.value===m?fi():di(t,n.value);if(B(n.value)){const e=Mt(n.value,i,s);if(!e)return;return ri(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function li(t,e,i,s=!0){const n=ai(t,e,i,s);return n?ci(n):void 0}function ci(t){const e=t.r/M,i=t.g/M,s=t.b/M,n=Math.max(e,i,s),o=Math.min(e,i,s),a={h:0,l:(n+o)*u,s:0};return n!==o&&(a.s=a.l<u?(n-o)/(n+o):(n-o)/(2-n-o),a.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),a.l*=C,a.s*=k,a.h*=60,a.h<0&&(a.h+=P),a.h>=P&&(a.h-=P),a}function di(t,e){return oi(t,e)}function hi(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 ui(t){const e=(t.h%P+P)%P,i=Math.max(0,Math.min(k,t.s)),s=Math.max(0,Math.min(C,t.l)),n=e/P,o=i/k,a=s/C;if(0===i){const t=Math.round(a*M);return{r:t,g:t,b:t}}const r=a<u?a*(1+o):a+o-a*o,l=2*a-r,c=1/3,d=Math.min(M,M*hi(l,r,n+c)),h=Math.min(M,M*hi(l,r,n)),p=Math.min(M,M*hi(l,r,n-c));return{r:Math.round(d),g:Math.round(h),b:Math.round(p)}}function pi(t){const e=(t.h%P+P)%P,i=Math.max(0,Math.min(k,t.s)),s=Math.max(0,Math.min(C,t.l)),n=e/P,o=i/k,a=s/C;if(0===i){const t=a*M;return{r:t,g:t,b:t}}const r=a<u?a*(1+o):a+o-a*o,l=2*a-r,c=1/3;return{r:Math.min(M,M*hi(l,r,n+c)),g:Math.min(M,M*hi(l,r,n)),b:Math.min(M,M*hi(l,r,n-c))}}function gi(t){const e=ui(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function fi(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 mi(e,i,s,n,o){const a=i?4:2,r=s??1;return ei(i?`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-hdr-${r.toString()}-${(n??D).toString()}-${o??t.HdrMode.standard}`:`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const o=s/203,a=function(e,i,s,n){const o=e.r/M,a=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:a,r:o};const l=Math.max(1,i),c=Qe*o+Je*a+ti*r,d=function(t,e,i){if(t<=i)return ii(t);const s=t+(t-i)*(e-1);return ii(s)}(c,i,s),h=c>0?d/c:1;return function(e,i,s,n,o){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:X(X(t+(s-t)*Ze,0,o)*Ke,0,o),g:X(X(t+(i-t)*Ze,0,o)*Ke,0,o),r:X(X(t+(e-t)*Ze,0,o)*Ke,0,o)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,a=(t+i+n)/3;return{b:X(a+1.1*(n-a),0,o),g:X(a+1.1*(i-a),0,o),r:X(a+1.1*(t-a),0,o)}}case t.HdrMode.dynamic:{const t=Qe*e+Je*i+ti*s,n=Math.min(1,2*t),a=1-n,r=(e+i+s)/3,l=X(r+(e-r)*Ze,0,o)*Ke,c=X(r+(i-r)*Ze,0,o)*Ke,d=X(r+(s-r)*Ze,0,o)*Ke;return{b:X(s*a+d*n,0,o),g:X(i*a+c*n,0,o),r:X(e*a+l*n,0,o)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(X(o*h,0,l),X(a*h,0,l),X(r*h,0,l),n,l)}(e,o,.18,n);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(i??1).toString()})`}(e,s,n,o):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function yi(e,i,s,n,o){const a=i?4:2,r=s??1;return ei(i?`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-hdr-${r.toString()}-${(n??D).toString()}-${o??t.HdrMode.standard}`:`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-sdr-${r.toString()}`,()=>i?mi(pi(e),!0,s,n,o):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function vi(t,e,i,s,n){let o=t,a=e;if("r"in o||(o=n?pi(t):ui(t)),"r"in a||(a=n?pi(e):ui(e)),n){const t={b:si(o.b/M),g:si(o.g/M),r:si(o.r/M)},e={b:si(a.b/M),g:si(a.g/M),r:si(a.r/M)},n=i+s;return{b:ni((t.b*i+e.b*s)/n)*M,g:ni((t.g*i+e.g*s)/n)*M,r:ni((t.r*i+e.r*s)/n)*M}}return{b:Y(o.b,a.b,i,s),g:Y(o.g,a.g,i,s),r:Y(o.r,a.r,i,s)}}function bi(t,e,i,s){if(i===m)return fi();if(i!==y)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return vi(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return ui(t)}}}function wi(t,e,i,s){const n=L(e)?e:e.value;return n===m?s?ai(t,{value:n}):i?m:y:n===y?y:ai(t,{value:n})}function xi(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:P},s:{enable:!1,value:t.s,min:0,max:k},l:{enable:!1,value:t.l,min:0,max:C}};return e&&(Pi(s.h,e.h,i),Pi(s.s,e.s,i),Pi(s.l,e.l,i)),s}function Pi(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=K(i.speed)/h*s,e.decay=1-K(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=K(i.count),e.time=0,e.delayTime=K(i.delay)*p,i.sync||(e.velocity*=j(),e.value*=j()),e.initialValue=e.value,e.offset=tt(i.offset)):e.velocity=0}function ki(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 o=e.offset?Z(e.offset):0,a=(e.velocity??0)*s.factor+3.6*o,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,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=X(e.value,c,l)}function Ci(t,e,i){if(!t)return;const{h:s,s:n,l:o}=t;ki(s,!1,e),ki(n,!0,e),ki(o,!0,e)}function Oi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const zi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new ne}(),Si="TSP-3201",Di="TSP-3202";class Ii{enable=!1;mode=[];load(t){H(t)||(le(this,"enable",t.enable),le(this,"mode",t.mode))}}var Ti,Ei,Ri;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ti||(Ti={}));class Li{enable=!1;mode=[];selectors=[];type=Ti.circle;load(t){H(t)||(le(this,"selectors",t.selectors),le(this,"enable",t.enable),le(this,"mode",t.mode),le(this,"type",t.type))}}class Ai{enable=!1;mode=[];load(t){H(t)||(le(this,"enable",t.enable),le(this,"mode",t.mode))}}class Fi{onClick=new Ii;onDiv=new Li;onHover=new Ai;load(t){if(H(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=Dt(e,t=>{const e=new Li;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Ei||(Ei={}));class _i{#C;constructor(t){this.#C=t}load(t){if(H(t))return;if(!this.#C)return;const e=this.#C.interactionManager?.interactors??[];for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class Vi{detectsOn=Ei.window;events=new Fi;modes;constructor(t){this.modes=new _i(t)}load(t){if(H(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Bi{id="interactivity";#O;constructor(t){this.#O=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Ml});return new e(this.#O,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Vi(t)),s.load(i?.interactivity);const n=t.interactionManager?.interactors;if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=Ot({},i.interactivity));const s=t.interactionManager?.interactors;if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(Ri||(Ri={}));class Hi{type=Ri.external;container;constructor(t){this.container=t}}class qi{type=Ri.particles;container;constructor(t){this.container=t}}const Ni="pointerleave",Ui="pointermove",ji="touchstart",Wi="touchend",$i="touchmove",Gi="touchcancel";function Xi(t,e){if(B(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Yi(t,e){return!!Xi(e,e=>e.enable&&xt(t,e.mode))}function Zi(t,e,i){Dt(e,e=>{const s=e.mode;e.enable&&xt(t,s)&&function(t,e){const i=t.selectors;Dt(i,i=>{e(i,t)})}(e,i)})}function Ki(t,e){if(e&&t)return Xi(t,t=>function(t,e){const i=Dt(e,e=>t.matches(e));return B(i)?i.some(t=>t):i}(e,t.selectors))}function Qi(t){if(!t.pluginManager.addInteractor)throw new Error(gt(Si))}class Ji{count;delay;duration;wait=!1;load(t){H(t)||(le(this,"count",t.count),ce(this,"delay",t.delay),ce(this,"duration",t.duration),le(this,"wait",t.wait))}}class ts{mass=0;radius=0;load(t){H(t)||(le(this,"mass",t.mass),le(this,"radius",t.radius))}}class es extends Ie{density=5;limit=new ts;value=50;load(t){H(t)||(super.load(t),le(this,"density",t.density),A(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class is{enable=!1;quantity=4;load(t){if(H(t))return;le(this,"enable",t.enable);const e=t.quantity;A(e)&&Number.isFinite(e)&&(this.quantity=Math.min(Math.max(Math.trunc(e),0),1e3))}}class ss{color;destroy;draggable;life;name;opacity;orbits;position;size;split;constructor(){this.color=new be,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ji,this.size=new es,this.split=new is}load(t){H(t)||(void 0!==t.color&&(this.color=be.create(this.color,t.color)),le(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,le(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=tt(t.position.x)),void 0!==t.position.y&&(this.position.y=tt(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.split&&this.split.load(t.split),le(this,"destroy",t.destroy),le(this,"orbits",t.orbits))}}const ns="absorbers",os="absorber-split";class as extends Hi{handleClickMode;maxDistance;#D=!1;#I;#T;constructor(t,e){super(t),this.maxDistance=0,this.#T=e,this.#T.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers,{clickPosition:o}=i.mouse;if(t===os){if(!o)return;let t,i=1/0;for(const n of e.getArray(s)){const e=it(n.position,o);n.size>0&&e<n.size*n.size&&e<i&&(t=n,i=e)}return void(t?.options.split.enable&&this.#T.splitAbsorber(s,t))}if(t!==ns||!n)return;if(o){if(e.getArray(s).some(t=>t.size>0&&it(t.position,o)<t.size*t.size))return}const a=Mt(n)??new ss;this.#T.addAbsorber(s,a,o)}}clear(){}init(){}interact(t,e){const i=this.#T.getArray(this.container),s=t.mouse;for(const t of i)t.options.draggable&&(s.clicking&&s.downPosition?this.#D||t.size>=0&&it(t.position,s.downPosition)<=t.size*t.size&&(this.#D=!0,this.#I=t):(this.#D=!1,this.#I=void 0),this.#D&&this.#I===t&&s.position&&(t.position.x=s.position.x,t.position.y=s.position.y))}isEnabled(t,e){const i=this.container,s=i.actualOptions,n=t.mouse,o=(e?.interactivity??s.interactivity).events;return!n.clicking&&this.#D&&(this.#D=!1,this.#I=void 0),!(e||!n.clicking||!this.#T.getArray(i).some(t=>t.options.draggable))||!(!n.clickPosition||!o.onClick.enable)&&(xt(ns,o.onClick.mode)||xt(os,o.onClick.mode))}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(B(i.absorbers))for(const e of i.absorbers){const i=new ss;i.load(e),t.absorbers.push(i)}else{const e=new ss;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const rs=new WeakMap;function ls(t){const e=t.pluginManager;let i=rs.get(e);return i||(i=Promise.resolve().then(function(){return Pl}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw rs.delete(e),t}),rs.set(e,i)),i}class cs{id="absorbers";#T;constructor(t){this.#T=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return kl});return new e(t,this.#T)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=Dt(i.absorbers,t=>{const e=new ss;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return B(e)?!!e.length:!!e}}async function ds(t){await async function(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await ls(t);e.addPlugin(new cs(i))})}(t),await async function(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await ls(t);Qi(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new as(t,i)))})}(t)}class hs{bottom;left;right;top;load(t){H(t)||(ce(this,"bottom",t.bottom),ce(this,"left",t.left),ce(this,"right",t.right),ce(this,"top",t.top))}}var us;!function(t){t.explode="explode",t.none="none",t.split="split"}(us||(us={}));class ps{maxSizeFactor=3;speed=2;load(t){H(t)||(le(this,"maxSizeFactor",t.maxSizeFactor),le(this,"speed",t.speed))}}class gs extends Ie{value=3}class fs extends Ie{value={min:4,max:9}}class ms{count=1;factor=new gs;fillColor;fillColorOffset;particles;rate=new fs;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){H(t)||(void 0!==t.fillColor&&(this.fillColor=be.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=be.create(this.strokeColor,t.strokeColor)),le(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=Dt(t.particles,t=>Ot({},t)),le(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let ys=class{bounds=new hs;explode=new ps;mode=us.none;split=new ms;load(t){H(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function vs(t,e,i,s){return t&&s?function(t,e){const i=K(e.h??0),s=K(e.s??0),n=K(e.l??0),o=(t.h+i)%360,a=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return we.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?we.create(void 0,e):i?we.create(void 0,i):s?function(t){return we.create(void 0,{value:{hsl:t}})}(s):void 0}function bs(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=Ge(e,i,s.options),l=It(a.fillColor),c=It(a.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/K(a.factor.value),p=r.size;p&&(A(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=It(r.paint),f=g?.fill,m=g?.stroke,y=vs(a.fillColorOffset,l,f?.color,d),v=vs(a.strokeColorOffset,c,m?.color,h);y&&f&&(f.color=y),v&&m&&(m.color=v);const b=a.sizeOffset?tt(-s.size.value,s.size.value):0,w={x:s.position.x+Z(b),y:s.position.y+Z(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=Z(tt(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class ws{#C;#O;constructor(t,e){this.#C=e,this.#O=t}init(t){const e=this.#C,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:a,top:r}=s,{destroyBounds:l}=t,c=e.canvas.size;n&&(l.bottom=K(n)*c.height/h),o&&(l.left=K(o)*c.width/h),a&&(l.right=K(a)*c.width/h),r&&(l.top=K(r)*c.height/h)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ue(t,"destroy",ys,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case us.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const o=K(n.rate.value),a=It(n.particles);for(let s=0;s<o;s++)bs(t,e,i,a)}(this.#O,this.#C,t);break;case us.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,o=t.getOpacity();t.exploding={initialFillOpacity:o.fillOpacity,initialSize:s,initialStrokeOpacity:o.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=o.fillOpacity,t.strokeOpacity=o.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function xs(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new ws(t.pluginManager,e)))})}class Ms{count;delay;duration;wait=!1;load(t){H(t)||(le(this,"count",t.count),ce(this,"delay",t.delay),ce(this,"duration",t.duration),le(this,"wait",t.wait))}}class Ps{delay=.1;quantity=1;load(t){H(t)||(ce(this,"quantity",t.quantity),ce(this,"delay",t.delay))}}class ks{color=!1;opacity=!1;load(t){H(t)||(le(this,"color",t.color),le(this,"opacity",t.opacity))}}class Cs{options={};replace=new ks;type="square";load(t){H(t)||(void 0!==t.options&&(this.options=Ot({},t.options??{})),this.replace.load(t.replace),le(this,"type",t.type))}}class Os{height=0;mode=t.PixelMode.percent;width=0;load(t){H(t)||(le(this,"mode",t.mode),le(this,"height",t.height),le(this,"width",t.width))}}class zs{fill;stroke;load(t){H(t)||(t.fill&&(this.fill??=new Oe,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new _e,this.stroke.load(t.stroke)))}}class Ss{autoPlay=!0;direction;domId;draggable=!1;draw=!1;fill=!0;life=new Ms;name;particles;position;rate=new Ps;shape=new Cs;size;spawn=new zs;spawnFillColor;spawnStrokeColor;startCount=0;load(t){H(t)||(le(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Os,this.size.load(t.size)),le(this,"direction",t.direction),le(this,"domId",t.domId),le(this,"draggable",t.draggable),le(this,"draw",t.draw),le(this,"fill",t.fill),this.life.load(t.life),le(this,"name",t.name),this.particles=Dt(t.particles,t=>Ot({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=tt(t.position.x)),void 0!==t.position.y&&(this.position.y=tt(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new we,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new we,this.spawnStrokeColor.load(t.spawnStrokeColor)),le(this,"startCount",t.startCount))}}var Ds;!function(t){t.emitter="emitter"}(Ds||(Ds={}));class Is{#C;#T;constructor(t,e){this.#T=t,this.#C=e,this.#T.initContainer(e)}draw(t,e){for(const e of this.#T.getArray(this.#C))e.draw(t)}async init(){const t=this.#C.actualOptions.emitters;if(B(t))for(const e of t)await this.#T.addEmitter(this.#C,e);else await this.#T.addEmitter(this.#C,t)}pause(){for(const t of this.#T.getArray(this.#C))t.pause()}play(){for(const t of this.#T.getArray(this.#C))t.play()}resize(){for(const t of this.#T.getArray(this.#C))t.resize()}stop(){this.#T.clear(this.#C)}update(t){this.#T.getArray(this.#C).forEach(e=>{e.update(t)})}}var Ts=Object.freeze({__proto__:null,EmittersPluginInstance:Is});const Es={count:1,enable:!0},Rs=Ds.emitter;class Ls extends Hi{handleClickMode;maxDistance;#D=!1;#E;#T;constructor(t,e){super(e),this.#T=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==Rs)return;let s;if(B(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const o=Math.floor(j()*i.value.length);if(t.has(o)&&t.size<e){n--;continue}t.add(o);const a=Mt(i.value,o);a&&s.push(a)}}else s=i.value}else s=i.value;const n=s,o=e.mouse.clickPosition;Dt(n,async t=>{await this.#T.addEmitter(this.container,t,o)})}}clear(){}init(){}interact(t,e){const i=this.container,s=this.#T.getArray(i),n=!i.plugins.some(t=>t instanceof Is);t.mouse.clicking||(this.#D=!1,this.#E=void 0);for(const i of s){if(i.options.draggable&&!i.options.domId){const e=t.mouse;if(e.clicking&&e.downPosition&&!this.#D){Math.abs(e.downPosition.x-i.position.x)<=i.size.width*u&&Math.abs(e.downPosition.y-i.position.y)<=i.size.height*u&&(this.#D=!0,this.#E=i)}this.#D&&this.#E===i&&e.position&&i.setPosition(e.position)}n&&i.update(e)}}isEnabled(t,e){const i=this.container,s=i.actualOptions,n=t.mouse,o=(e?.interactivity??s.interactivity).events;return!n.clicking&&this.#D&&(this.#D=!1,this.#E=void 0),!!this.#D||(!(!n.clicking||!this.#T.getArray(i).some(t=>t.options.draggable&&!t.options.domId))||!(!n.clickPosition||!o.onClick.enable)&&xt(Rs,o.onClick.mode))}loadModeOptions(t,...e){t.emitters={random:Es,value:[]};for(const i of e)if(i?.emitters)if(B(i.emitters))for(const e of i.emitters){const i=new Ss;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,B(e.value))for(const i of e.value){const e=new Ss;e.load(i),t.emitters.value.push(e)}else{const i=new Ss;i.load(e.value),t.emitters.value.push(i)}}else{const e=new Ss;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#T.getArray(this.container).indexOf(t);e>=0&&this.#T.getArray(this.container).splice(e,1)}reset(){}}async function As(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Ol}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const Fs=new WeakMap;function _s(t){const e=t.pluginManager;let i=Fs.get(e);return i||(i=Promise.resolve().then(function(){return zl}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Fs.delete(e),t}),Fs.set(e,i)),i}class Vs{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}draw(t){}resize(t,e){this.position=t,this.size=e}}class Bs{id="emitters";#T;constructor(t){this.#T=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Ts});return new e(this.#T,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=Dt(i.emitters,t=>{const e=new Ss;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return B(e)&&!!e.length||void 0!==e}}const Hs="TSP-3101";function qs(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error(gt(Hs))}async function Ns(t){await async function(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{const e=await _s(t);await As(t),t.pluginManager.addPlugin(new Bs(e))})}(t),await async function(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{const e=await _s(t);Qi(t),await As(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new Ls(e,t)))})}(t)}class Us extends Vs{constructor(t,e,i,s){super(t,e,i,s)}draw(t){const e=this.position,i=this.size,s=v;t.ellipse(e.x,e.y,i.width*u,i.height*u,0,0,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*u,t.height*u],o=((t,e)=>{const i=j()*O,s=Math.atan(e/t*Math.tan(v*i)),n=j();return n<O?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),a=(d=o,(l=s)*(c=n)/Math.sqrt((c*Math.cos(d))**2+(l*Math.sin(d))**2)),r=e?a*Math.sqrt(j()):a;var l,c,d;return{position:{x:i.x+r*Math.cos(o),y:i.y+r*Math.sin(o)}}}}class js{generate(t,e,i,s,n){return new Us(e,i,s,n)}}async function Ws(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{qs(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new js)})}var $s;function Gs(t,e){return t+e*(j()-u)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}($s||($s={}));class Xs extends Vs{constructor(t,e,i,s){super(t,e,i,s)}draw(t){const e=this.position,i=this.size,s=i.width*u,n=i.height*u;t.rect(e.x-s,e.y-n,i.width,i.height)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Gs(e.x,i.width),y:Gs(e.y,i.height)}};{const t=i.width*u,s=i.height*u,n=function(t){return _($s,Math.floor(j()*t),$s.BottomLeft)}(4),o=2*(j()-u);switch(n){case $s.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case $s.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case $s.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case $s.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Ys{generate(t,e,i,s,n){return new Xs(e,i,s,n)}}async function Zs(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{qs(t),t.pluginManager.addEmitterShapeGenerator?.("square",new Ys)})}class Ks{momentumFactor=.03;preserveMomentum=false;load(t){H(t)||(le(this,"momentumFactor",t.momentumFactor),le(this,"preserveMomentum",t.preserveMomentum))}}const Qs=16.666666666666668;class Js extends Hi{maxDistance=0;#R;#L;#A;#F;#_;#V=[];#B=!1;#H;constructor(t){super(t)}clear(t,e){}init(){}interact(t,e){const i=t.mouse,s=i.position;if(s&&(this.#_=s),this.#R){const t=performance.now();i.clicking?this.#L=void 0:this.#L??=t;const e=void 0===this.#A&&void 0!==this.#L&&t-this.#L>=50;if(!i.inside||this.#q(i)||e)return this.#N(),void(this.#B=!1);const n=s??this.#_;if(!n)return;this.#V.push({x:n.x,y:n.y,t:t}),this.#V.length>5&&this.#V.shift();const o=n.x+(this.#F?.x??0),a=n.y+(this.#F?.y??0);return this.#R.position.x=o-this.#R.offset.x,this.#R.position.y=a-this.#R.offset.y,this.#R.velocity.x=0,this.#R.velocity.y=0,this.#R.initialPosition.x=this.#R.position.x,this.#R.initialPosition.y=this.#R.position.y,void(this.#R.misplaced=!1)}if(!i.clicking)return this.#N(),void(this.#B=!1);if(this.#B)return;this.#B=!0;const n=i.downPosition??s??this.#_,o=this.#U(t,n);if(!o||!s)return void(o||(this.#B=!1));const a=o.getPosition();this.#R=o,this.#A=i.clickTime,this.#F={x:a.x-s.x,y:a.y-s.y},this.#H={x:o.velocity.x,y:o.velocity.y},this.#L=void 0,this.#V=[{x:s.x,y:s.y,t:performance.now()}],o.velocity.x=0,o.velocity.y=0,o.position.x=a.x-o.offset.x,o.position.y=a.y-o.offset.y,o.initialPosition.x=o.position.x,o.initialPosition.y=o.position.y,o.misplaced=!1}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!this.#R&&!this.#B)||!!n?.onClick.enable&&s.clicking&&!!s.position&&xt("drag",n.onClick.mode)}loadModeOptions(t,...e){ue(t,"drag",Ks,...e)}reset(t,e){}#U(t,e){if(!e)return;const i=this.container.particles.filter(e=>this.isEnabled(t,e));let s,n=1/0;for(const t of i){const i=it(t.getPosition(),e),o=t.getRadius();!Number.isFinite(i)||!Number.isFinite(o)||o<0||i>o*o||i>=n||(s=t,n=i)}return s}#q(t){return void 0!==this.#A&&void 0!==t.clickTime&&t.clickTime!==this.#A}#N(){if(this.#R){const t=this.container.actualOptions.interactivity?.modes.drag;if((t?.preserveMomentum??!1)&&this.#V.length>=2){const e=this.#V[0],i=this.#V[this.#V.length-1];if(e&&i){const s=i.t-e.t;if(s>0){const n=t?.momentumFactor??.03;this.#R.velocity.x=(i.x-e.x)/s*Qs*n,this.#R.velocity.y=(i.y-e.y)/s*Qs*n}else this.#H&&(this.#R.velocity.x=this.#H.x,this.#R.velocity.y=this.#H.y)}else this.#H&&(this.#R.velocity.x=this.#H.x,this.#R.velocity.y=this.#H.y)}else this.#H&&(this.#R.velocity.x=this.#H.x,this.#R.velocity.y=this.#H.y)}this.#R=void 0,this.#A=void 0,this.#L=void 0,this.#F=void 0,this.#_=void 0,this.#V=[],this.#H=void 0}}async function tn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalDrag",t=>Promise.resolve(new Js(t)))})}class en{x=0;y=0;load(t){t&&(le(this,"x",t.x),le(this,"y",t.y))}}class sn{value;weights=new en;load(t){t&&(t.weights&&(this.weights??=new en,this.weights.load(t.weights)),H(t.value)||(this.value=tt(t.value)))}}class nn{h=new sn;l=new sn;s=new sn;load(t){t&&(t.h&&(this.h??=new sn,this.h.load(t.h)),t.s&&(this.s??=new sn,this.s.load(t.s)),t.l&&(this.l??=new sn,this.l.load(t.l)))}}class on{colorCoords=new nn;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){H(t)||(le(this,"delay",t.delay),le(this,"quantity",t.quantity),le(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=Ot({},t.particles)),t.colorCoords&&(this.colorCoords??=new nn,this.colorCoords.load(t.colorCoords)))}}const an="trail";class rn extends Hi{maxDistance=0;#j;#W;#O;constructor(t,e){super(e),this.#O=t,this.#j=0}clear(){}init(){}interact(t,e){const i=this.container;if(!i.retina.reduceFactor)return;const s=i.actualOptions,n=s.interactivity?.modes.trail;if(!n)return;const o=n.delay*p/this.container.retina.reduceFactor;if(this.#j<o&&(this.#j+=e.value),this.#j<o)return;const a=t.mouse.position,r=!(n.pauseOnStop&&(a===this.#W||a?.x===this.#W?.x&&a?.y===this.#W?.y));if(this.#W=a?{...a}:void 0,r&&a){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:o}=i.canvas.size,r={x:a.x/s,y:a.y/o},l=t=>!!(t?.weights?.x??t?.weights?.y),c=(t,e,i)=>{if(!l(t))return;const s=t?.weights,n=r.x*(s?.x??0)+r.y*(s?.y??0),o=t?.value??e,a=Q(o??0),c=J(o??i),d=a+n*(c-a);return Math.min(c,Math.max(a,d))},d=n.particles?.paint?It(n.particles.paint):void 0,h=d?.fill,u=h?li(this.#O,we.create(void 0,h.color)):void 0,p=c(e.h,u?.h,P),g=c(e.s,u?.s,k),f=c(e.l,u?.l,C);void 0===p&&void 0===g&&void 0===f||(t=Ot({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:g??u?.s,l:f??u?.l}}}}}))}i.particles.push(n.quantity,a,t)}this.#j-=o}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&(s.clicking&&s.inside&&!!s.position&&xt(an,n.onClick.mode)||s.inside&&!!s.position&&xt(an,n.onHover.mode))}loadModeOptions(t,...e){ue(t,"trail",on,...e)}reset(){}}async function ln(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new rn(t.pluginManager,e)))})}var cn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(cn||(cn={}));class dn{enable=!1;value=0;load(t){H(t)||(le(this,"enable",t.enable),ce(this,"value",t.value))}}class hn{backColor;darken=new dn;enable=!1;enlighten=new dn;mode=cn.vertical;speed=25;load(t){H(t)||(void 0!==t.backColor&&(this.backColor=be.create(this.backColor,t.backColor)),this.darken.load(t.darken),le(this,"enable",t.enable),this.enlighten.load(t.enlighten),le(this,"mode",t.mode),ce(this,"speed",t.speed))}}class un{#O;constructor(t){this.#O=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(e){!function(e,i){const s=i.options.roll;if(s?.enable)if(i.roll={enable:s.enable,horizontal:s.mode===cn.horizontal||s.mode===cn.both,vertical:s.mode===cn.vertical||s.mode===cn.both,angle:j()*v,speed:K(s.speed)/360},s.backColor)i.backColor=li(e,s.backColor);else if(s.darken.enable&&s.enlighten.enable){const e=j()>=u?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:K(e===t.AlterType.darken?s.darken.value:s.enlighten.value)}}else s.darken.enable?i.roll.alter={type:t.AlterType.darken,value:K(s.darken.value)}:s.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:K(s.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#O,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ue(t,"roll",hn,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,o=v;s.angle+=n,s.angle>o&&(s.angle-=o)}(t,e)}}async function pn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new un(t.pluginManager)))})}class gn{enable=!1;mode="destination-out";load(t){H(t)||(le(this,"mode",t.mode),le(this,"enable",t.enable))}}function fn(t){if(!t||"object"!=typeof t||!("blend"in t))return!1;const e=t.blend;return!!e&&"object"==typeof e&&"enable"in e&&!!e.enable}class mn{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Sl});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 gn),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new gn,e.blend.load(i?.blend)}needsPlugin(t){if(t?.blend?.enable||t?.particles?.blend?.enable||Object.values(t?.particles?.groups??{}).some(fn))return!0;const e=t?.emitters;let i=[];return Array.isArray(e)?i=e:e&&(i=[e]),i.some(t=>{if(!t||"object"!=typeof t||!("particles"in t))return!1;const e=t.particles;return Array.isArray(e)?e.some(fn):fn(e)})}}async function yn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new mn)})}class vn{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=V(s)?{min:ot(s.min),max:ot(s.max)}:{min:0,max:ot(s)}}}async function bn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new vn))})}var wn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(wn||(wn={}));const xn=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Mn=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Pn{accepts(t){return t.startsWith("#")}handleColor(t){return this.#$(t.value)}handleRangeColor(t){return this.#$(t.value)}parseString(t){return this.#$(t)}#$(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(xn,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Mn.exec(e);return i?{a:i[wn.a]?Number.parseInt(i[wn.a],16)/255:1,b:Number.parseInt(i[wn.b]??"0",16),g:Number.parseInt(i[wn.g]??"0",16),r:Number.parseInt(i[wn.r]??"0",16)}:void 0}}async function kn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Pn)})}var Cn;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Cn||(Cn={}));const On=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class zn{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 ui(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ui({h:K(e.h),l:K(e.l),s:K(e.s)})}parseString(t){if(!this.accepts(t))return;const e=On.exec(t);return e?gi({a:e.length>4?ut(e[Cn.a]):1,h:Number.parseInt(e[Cn.h]??"0",10),l:Number.parseInt(e[Cn.l]??"0",10),s:Number.parseInt(e[Cn.s]??"0",10)}):void 0}}async function Sn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new zn)})}class Dn{id="move";#O;constructor(t){this.#O=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Il});return new e(this.#O,t)}loadOptions(){}needsPlugin(){return!0}}async function In(t){t.checkVersion("4.6.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 Dn(t.pluginManager))})}function Tn(e,i){const s=e.value,n=e.animation,o={delayTime:K(n.delay)*p,enable:n.enable,value:K(e.value)*i,max:J(s)*i,min:Q(s)*i,loops:0,maxLoops:K(n.count),time:0};if(n.enable){switch(o.decay=1-K(n.decay),n.mode){case t.AnimationMode.increase:o.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:o.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:o.status=j()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=Z(o),e&&(o.status=j()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function En(e,i,s,n,o){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const a=(i.velocity??0)*o.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+=o.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=a;break;case t.AnimationStatus.decreasing:i.value-=a}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,o){switch(i){case t.DestroyType.max:s>=o&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=X(i.value,r,l))}}class Rn extends me{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||le(this,"destroy",t.destroy)}}class Ln extends Ee{animation=new Rn;value=1;load(t){if(H(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class An{#C;constructor(t){this.#C=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Tn(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=K(i.speed)/h*this.#C.retina.reduceFactor,i.sync||(t.opacity.velocity*=j()))}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){ue(t,"opacity",Ln,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&En(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Fn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new An(t)))})}const _n={[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 Vn{modes;#C;#G;constructor(e){this.#C=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#G=e.plugins.filter(t=>!!t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;for(const t of this.#G)if(t.particleBounce?.(e,s,i))return;const o=e.getPosition(),a=e.offset,r=e.getRadius(),l=Ct(o,r),c=this.#C.canvas.size,d=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||!(e.direction in _n))return;const i=_n[e.direction],s=e.bounds,n=e.canvasSize[i.canvas],o=e.particle.position,a=e.particle.velocity[i.axis];if(i.negative&&s[i.negativeEdge]<0?o[i.axis]=e.size+e.offset[i.axis]:!i.negative&&s[i.positiveEdge]>n&&(o[i.axis]=n-e.size-e.offset[i.axis]),!e.outOfCanvas||!(i.negative&&a<0||!i.negative&&a>0))return;e.particle.velocity[i.axis]*=-K(e.particle.options.bounce[i.bounce].value);const r=e.offset[i.axis]+e.size;o[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:a,outOfCanvas:d,size:r})}}class Bn{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 t=e.position.x-e.moveCenter.x,i=e.position.y-e.moveCenter.y,{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 Hn{modes;#C;constructor(e){this.#C=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 o=e.options.move.gravity,a=this.#C,r=a.canvas.size,l=e.getRadius();if(o.enable){const s=e.position;(!o.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||o.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;Pt(e.position,a.canvas.size,g,l,i)||e.destroy()}}}const qn=E.origin;class Nn{modes;#C;constructor(e){this.#C=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#C;if(e.outType===t.ParticleOutType.inside)this.#X(e,o);else{if(e.isInsideCanvasForOutMode(n,i))return;e.outType===t.ParticleOutType.outside?this.#Y(e):this.#Z(e,o,i)}}#X(t,e){const{x:i,y:s}=t.velocity;qn.setTo(g),qn.length=t.moveCenter.radius,qn.angle=t.velocity.angle+Math.PI,qn.addTo(t.moveCenter);const n=t.position.x-qn.x,o=t.position.y-qn.y;if(i<=0&&n>=0||s<=0&&o>=0||i>=0&&n<=0||s>=0&&o<=0)return;t.position.x=Math.floor(Z({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(Z({min:0,max:e.canvas.size.height}));const a=t.position.x-t.moveCenter.x,r=t.position.y-t.moveCenter.y;t.direction=Math.atan2(-r,-a),t.velocity.angle=t.direction,t.justWarped=!0}#Z(e,i,s){const n=e.options.move.warp,o=i.canvas.size,a=e.getRadius(),r={bottom:o.height+a+e.offset.y,left:-a-e.offset.x,right:o.width+a+e.offset.x,top:-a-e.offset.y},l=Ct(e.position,a);s===t.OutModeDirection.right&&l.left>o.width+e.offset.x?(e.position.x=r.left,e.initialPosition.x=e.position.x,n||(e.position.y=j()*o.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=j()*o.height,e.initialPosition.y=e.position.y),e.justWarped=!0),s===t.OutModeDirection.bottom&&l.top>o.height+e.offset.y?(n||(e.position.x=j()*o.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=j()*o.width,e.initialPosition.x=e.position.x),e.position.y=r.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0)}#Y(t){t.position.x=Math.floor(Z({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(Z({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const e=t.position.x-t.moveCenter.x,i=t.position.y-t.moveCenter.y;t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class Un{updaters;#C;constructor(t){this.#C=t,this.updaters=new Map}init(e){this.#K(e,t.OutMode.bounce,t=>new Vn(t)),this.#K(e,t.OutMode.out,t=>new Nn(t)),this.#K(e,t.OutMode.destroy,t=>new Bn(t)),this.#K(e,t.OutMode.none,t=>new Hn(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#Q(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#Q(e,i,s.left??s.default,t.OutModeDirection.left),this.#Q(e,i,s.right??s.default,t.OutModeDirection.right),this.#Q(e,i,s.top??s.default,t.OutModeDirection.top)}#K(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.#C))}#Q(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function jn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Un(t)))})}class Wn{#C;#O;constructor(t,e){this.#C=e,this.#O=t}init(t){const e=this.#C,i=t.options,s=It(i.paint,t.id,i.reduceDuplicates);this.#J(s,t,e),this.#tt(s,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,o=!!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),a=!!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&&(o||a)}update(t,e){this.isEnabled(t)&&(Ci(t.fillColor,e,this.#C.hdr),Ci(t.strokeColor,e,this.#C.hdr))}#J(t,e,i){const s=t?.fill,n=t?.color,o=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const a=we.create(void 0===o?void 0:we.create(void 0,o),s.color);e.fillEnabled=s.enable,e.fillOpacity=K(s.opacity),e.fillAnimation=a.animation;const r=li(this.#O,a);r&&(e.fillColor=Mi(r,e.fillAnimation,i.retina.reduceFactor))}#tt(t,e,i){const s=t?.stroke,n=t?.color,o=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const a=we.create(void 0===o?void 0:we.create(void 0,o),s.color);e.strokeWidth=K(s.width)*i.retina.pixelRatio,e.strokeOpacity=K(s.opacity??1),e.strokeAnimation=a.animation;const r=li(this.#O,a)??e.getFillColor();r&&(e.strokeColor=Mi(r,e.strokeAnimation,i.retina.reduceFactor))}}async function $n(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Wn(t.pluginManager,e)))})}var Gn;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Gn||(Gn={}));const Xn=/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 Yn{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:K(e.r),g:K(e.g),b:K(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Xn.exec(t);return e?{a:e.length>4?ut(e[Gn.a]):1,b:parseInt(e[Gn.b]??"0",10),g:parseInt(e[Gn.g]??"0",10),r:parseInt(e[Gn.r]??"0",10)}:void 0}}async function Zn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Yn)})}class Kn extends me{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||le(this,"destroy",t.destroy)}}class Qn extends Ee{animation=new Kn;value=3;load(t){if(super.load(t),H(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Jn{#C;constructor(t){this.#C=t}init(t){const e=this.#C,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*=j()))}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){ue(t,"size",Qn,...e)}preInit(t){const e=this.#C.retina.pixelRatio,i=t.options.size;i&&(t.size=Tn(i,e),t.retina.sizeAnimationSpeed=K(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&En(t,t.size,!0,t.options.size.animation.destroy,e)}}async function to(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Jn(t)))})}async function eo(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{await Promise.all([yn(t),kn(t),Sn(t),Zn(t),In(t),bn(t),$n(t),Fn(t),jn(t),to(t)])})}const io=new Map;async function so(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{for(const[e,i]of io)t.pluginManager.addEasing(e,i)})}io.set("ease-in-quad",t=>t**2),io.set("ease-out-quad",t=>1-(1-t)**2),io.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const no=["emoji"];function oo(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function ao(t,e){try{await vt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const ro='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class lo{#et=new Map;destroy(){for(const[t,e]of this.#et)e instanceof ImageBitmap&&e.close(),this.#et.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#et.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,o=e.width,a=o*u;i.globalAlpha=s,i.drawImage(e,-a,-a,o,o),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!no.some(t=>xt(t,e.type)))return;const i=[ao(ro)];Dt(no.map(t=>e.options[t])[0],t=>{t.font&&i.push(ao(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=It(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??ro,padding:i.padding??0,value:s}:{font:ro,padding:0,...i,...s},o=n.font,a=n.value,r=`${a}_${o}`;if(this.#et.has(r))return void(e.emojiDataKey=r);const l=2*n.padding,c=J(e.size.value),d=c+l,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*c).toString()}px ${o}`,p.textBaseline="middle",p.textAlign="center",p.fillText(a,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#et.set(r,g),e.emojiDataKey=r}}async function co(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(no,()=>Promise.resolve(new lo))})}const ho=E.origin;function uo(t,e,i,s,n,o,a){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const l=e.particles.grid.query(n,o);for(const e of l){const n=e.position.x-i.x,o=e.position.y-i.y,l=et(n,o),c=r.speed*r.factor,d=X(t.getEasing(r.easing)(1-l/s)*c,1,r.maxSpeed);ho.x=l?n/l*d:c,ho.y=l?o/l*d:c,a?.(e),e.position.subFrom(ho)}}let po=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){H(t)||(le(this,"distance",t.distance),le(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),le(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),le(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const go="attract";let fo=class extends Hi{handleClickMode;#it;#st;#O;#nt;constructor(t,e){super(e),this.#O=t,this.#st=0,this.#it=new Set,this.#nt=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.attract;if(n&&t===go){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},n.duration*p)}}}get maxDistance(){return this.#st}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#st=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#it.clear();const e=this.container.actualOptions,i=t.status===Ui,s=e.interactivity?.events;if(!s)return;const{enable:n,mode:o}=s.onHover,{enable:a,mode:r}=s.onClick;i&&n&&xt(go,o)?function(t,e,i,s,n){const o=i.mouse.position,a=e.retina.attractModeDistance;!a||a<0||!o||uo(t,e,o,a,new ae(o.x,o.y,a),t=>s(t),n)}(this.#O,this.container,t,e=>this.isEnabled(t,e),t=>{this.#ot(t)}):a&&xt(go,r)&&function(t,e,i,s,n){e.attract??={particles:[]};const{attract:o}=e;if(o.finish||(o.count??=0,o.count++,o.count===e.particles.count&&(o.finish=!0)),o.clicking){const o=i.mouse.clickPosition,a=e.retina.attractModeDistance;if(!a||a<0||!o)return;uo(t,e,o,a,new ae(o.x,o.y,a),t=>s(t),n)}else!1===o.clicking&&(o.particles=[])}(this.#O,this.container,t,e=>this.isEnabled(t,e),t=>{this.#ot(t)}),this.#at()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!(s.position&&n?.onHover.enable||s.clickPosition&&n?.onClick.enable))return!1;const o=n.onHover.mode,a=n.onClick.mode;return xt(go,o)||xt(go,a)}loadModeOptions(t,...e){ue(t,"attract",po,...e)}reset(){}#at(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#nt.size)return;const e=Date.now(),i=t.delay*p,s=Math.max(.001,Math.min(1,t.speed));for(const[n,o]of this.#nt){if(this.#it.has(n))continue;if(n.destroyed){this.#nt.delete(n);continue}const a=o.target;if(e-o.lastInteractionTime<i)continue;let r=a.x-n.position.x,l=a.y-n.position.y,c=a.z-n.position.z;if(t.follow&&n.options.move.enable){const{x:t,y:e,z:i}=n.velocity,s=t*t+e*e+i*i;if(s>0){const n=(r*t+l*e+c*i)/s;r-=t*n,l-=e*n,c-=i*n}}n.position.x+=r*s,n.position.y+=l*s,n.position.z+=c*s,Math.abs(r)<=.5&&Math.abs(l)<=.5&&(n.position.x=a.x,n.position.y=a.y,n.position.z=a.z,this.#nt.delete(n))}}#ot(t){this.#it.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#nt.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#nt.set(t,s)),s.lastInteractionTime=i}};async function mo(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new fo(t.pluginManager,e)))})}const yo=Math.PI*u;function vo(t,e,i,s,n){const o=t.particles.grid.query(s,n);for(const t of o)s instanceof ae?St(zt(t),{position:e,mass:i**2*yo,velocity:E.origin,factor:E.origin}):s instanceof re&&xo(t,Ct(e,i))}function bo(t,e,i,s){Zi(i,e,(e,i)=>{!function(t,e,i,s){const n=vt().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,o=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*u)*o,y:(n.offsetTop+n.offsetHeight*u)*o},r=n.offsetWidth*u*o,l=10*o,c=i.type===Ti.circle?new ae(a.x,a.y,r+l):new re(n.offsetLeft*o-l,n.offsetTop*o-l,n.offsetWidth*o+2*l,n.offsetHeight*o+2*l);s(a,r,c)})}(t,e,i,(e,i,n)=>{vo(t,e,i,n,s)})})}function wo(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:o,velocity:a,factor:r}=t;return s.min<o.min||s.min>o.max||s.max<o.min||s.max>o.max||(i.max>=n.min&&i.max<=(n.max+n.min)*u&&a>0||i.min<=n.max&&i.min>(n.max+n.min)*u&&a<0)&&(e.velocity=a*-r,e.bounced=!0),e}function xo(t,e){const i=Ct(t.getPosition(),t.getRadius()),s=t.options.bounce,n=wo({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:K(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const o=wo({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:K(s.vertical.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}class Mo{distance=200;load(t){H(t)||le(this,"distance",t.distance)}}const Po="bounce";class ko extends Hi{#st;constructor(t){super(t),this.#st=0}get maxDistance(){return this.#st}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#st=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Ui;if(!i)return;const n=i.onHover.enable,o=i.onHover.mode,a=i.onDiv;s&&n&&xt(Po,o)?function(t,e,i){const s=10*t.retina.pixelRatio,n=e.mouse.position,o=t.retina.bounceModeDistance;!o||o<0||!n||vo(t,n,o,new ae(n.x,n.y,o+s),i)}(this.container,t,e=>this.isEnabled(t,e)):bo(this.container,a,Po,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const o=n.onDiv;return!!s.position&&n.onHover.enable&&xt(Po,n.onHover.mode)||Yi(Po,o)}loadModeOptions(t,...e){ue(t,"bounce",Mo,...e)}reset(){}}async function Co(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new ko(t)))})}class Oo{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!H(t)){if(le(this,"distance",t.distance),le(this,"duration",t.duration),le(this,"mix",t.mix),ce(this,"opacity",t.opacity),void 0!==t.color){const e=B(this.color)?void 0:this.color;this.color=Dt(t.color,t=>be.create(e,t))}le(this,"size",t.size)}}}class zo extends Oo{selectors=[];load(t){super.load(t),H(t)||le(this,"selectors",t.selectors)}}class So extends Oo{divs;load(t){super.load(t),H(t)||(this.divs=Dt(t.divs,t=>{const e=new zo;return e.load(t),e}))}}class Do{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var Io;function To(t,e,i,s){if(e>=i){return X(t+(e-i)*s,t,e)}if(e<i){return X(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Io||(Io={}));const Eo="bubble";class Ro extends Hi{handleClickMode;#st;#rt=new WeakMap;#O;constructor(t,e){super(e),this.#O=t,this.#st=0,e.bubble??={},this.handleClickMode=t=>{t===Eo&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#st}clear(t,e,i){const s=this.#rt.get(t);s?.inRange&&!i||(t.removeModifier(Eo),this.#rt.delete(t))}getOrCreateModifier(t){let e=this.#rt.get(t);return e||(e=new Do,this.#rt.set(t,e)),t.getModifier(e.id)!==e&&t.addModifier(e),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#st=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,s=i.interactivity?.events;if(!s)return;const n=s.onHover,o=s.onClick,a=n.enable,r=n.mode,l=o.enable,c=o.mode,d=s.onDiv;a&&xt(Eo,r)?this.#lt(t):l&&xt(Eo,c)?this.#ct(t):Zi(Eo,d,(i,s)=>{this.#dt(t,e,i,s)})}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const{onClick:o,onDiv:a,onHover:r}=n,l=Yi(Eo,a);return!!(l||r.enable&&s.position||o.enable&&s.clickPosition)&&(xt(Eo,r.mode)||xt(Eo,o.mode)||l)}loadModeOptions(t,...e){ue(t,"bubble",So,...e)}reset(t,e){const i=this.#rt.get(e);i&&(i.enabled=!1,i.inRange=!1)}#ct(t){const e=this.container,i=e.actualOptions,s=t.mouse.clickPosition,n=i.interactivity?.modes.bubble;if(!n||!s)return;e.bubble??={};const o=e.retina.bubbleModeDistance;if(!o||o<0)return;const a=o*o,r=e.particles.grid.queryCircle(s,o,e=>this.isEnabled(t,e)),{bubble:l}=e;for(const i of r){if(!l.clicking)continue;const o=this.getOrCreateModifier(i);o.enabled=!l.durationEnd,o.inRange=!l.durationEnd;const r=it(i.getPosition(),s),c=(performance.now()-(t.mouse.clickTime??0))/p;c>n.duration&&(l.durationEnd=!0),c>2*n.duration&&(l.clicking=!1,l.durationEnd=!1);const d={bubbleObj:{optValue:e.retina.bubbleModeSize,value:o.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:Io.size};this.#ht(i,r,c,d);const h={bubbleObj:{optValue:n.opacity,value:o.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:Io.opacity};this.#ht(i,r,c,h),!l.durationEnd&&r<=a?this.#ut(i,Math.sqrt(r)):(o.fillColor=void 0,o.strokeColor=void 0)}}#lt(t){const e=this.container,i=t.mouse.position,s=e.retina.bubbleModeDistance;if(!s||s<0||!i)return;const n=e.particles.grid.queryCircle(i,s,e=>this.isEnabled(t,e));for(const e of n){const n=this.getOrCreateModifier(e);n.enabled=!0,n.inRange=!0;const o=st(e.getPosition(),i),a=1-o/s;o<=s?a>=0&&t.status===Ui&&(this.#pt(e,a),this.#gt(e,a),this.#ut(e,a)):this.reset(t,e),t.status===Ni&&this.reset(t,e)}}#ut(t,e,i){const s=this.container.actualOptions,n=i??s.interactivity?.modes.bubble,o=this.getOrCreateModifier(t);if(n){if(!o.finalColor){const t=n.color;if(!t)return;const e=It(t);o.finalColor=li(this.#O,e)}if(o.finalColor)if(n.mix){o.fillColor=void 0,o.strokeColor=void 0;const i=t.getFillColor();if(i){const t=ci(vi(i,o.finalColor,1-e,e,this.container.hdr));o.fillColor=t,o.strokeColor=t}else o.fillColor=o.finalColor,o.strokeColor=o.finalColor}else o.fillColor=o.finalColor,o.strokeColor=o.finalColor}}#gt(t,e,i){const s=this.container.actualOptions,n=i?.opacity??s.interactivity?.modes.bubble?.opacity;if(!n)return;const o=To(t.opacity?.value??1,n,t.opacity?.max??1,e);if(void 0!==o){this.getOrCreateModifier(t).opacity=o}}#pt(t,e,i){const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const o=To(t.size.value,n,t.size.max,e);if(void 0!==o){this.getOrCreateModifier(t).radius=o}}#ht(t,e,i,s){const n=this.container,o=s.bubbleObj.optValue,a=n.actualOptions,r=a.interactivity?.modes.bubble;if(!r||void 0===o)return;const l=r.duration,c=n.retina.bubbleModeDistance,d=s.particlesObj.optValue,h=s.bubbleObj.value,u=s.particlesObj.value??0,p=s.type;if(!c||c<0||o===d)return;n.bubble??={};const g=this.getOrCreateModifier(t);if(n.bubble.durationEnd)h&&(p===Io.size&&(g.radius=void 0),p===Io.opacity&&(g.opacity=void 0));else if(e<=c*c){if((h??u)!==o){const t=u-i*(u-o)/l;p===Io.size&&(g.radius=t),p===Io.opacity&&(g.opacity=t)}}else p===Io.size&&(g.radius=void 0),p===Io.opacity&&(g.opacity=void 0)}#dt(t,e,i,s){const n=this.container,o=vt().querySelectorAll(i),a=n.actualOptions.interactivity?.modes.bubble;a&&o.length&&o.forEach(i=>{const o=i,r=n.retina.pixelRatio,l={x:(o.offsetLeft+o.offsetWidth*u)*r,y:(o.offsetTop+o.offsetHeight*u)*r},c=o.offsetWidth*u*r,d=s.type===Ti.circle?new ae(l.x,l.y,c):new re(o.offsetLeft*r,o.offsetTop*r,o.offsetWidth*r,o.offsetHeight*r),h=n.particles.grid.query(d,e=>this.isEnabled(t,e));for(const t of h){if(!d.contains(t.getPosition()))continue;let i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const s=Ki(a.divs,o);i.div&&i.div===o||(this.clear(t,e,!0),i=this.getOrCreateModifier(t),i.enabled=!0,i.inRange=!0,i.div=o),this.#pt(t,1,s),this.#gt(t,1,s),this.#ut(t,1,s)}})}}async function Lo(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new Ro(t.pluginManager,e)))})}class Ao{opacity=.5;load(t){H(t)||ce(this,"opacity",t.opacity)}}class Fo{distance=80;links=new Ao;radius=60;load(t){H(t)||(le(this,"distance",t.distance),this.links.load(t.links),le(this,"radius",t.radius))}}function _o(t,e,i,s){const n=t.actualOptions,o=n.interactivity?.modes.connect;if(o)return function(t,e,i,s,n){const o=Math.floor(s.getRadius()/i.getRadius()),a=i.getFillColor(),r=s.getFillColor();if(!a||!r)return;const l=i.getPosition(),c=s.getPosition(),d=vi(a,r,i.getRadius(),s.getRadius(),t.hdr),h=e.createLinearGradient(l.x,l.y,c.x,c.y);return h.addColorStop(0,yi(a,t.hdr,n,t.peakNits,t.hdrMode)),h.addColorStop(X(o,0,1),mi(d,t.hdr,n,t.peakNits,t.hdrMode)),h.addColorStop(1,yi(r,t.hdr,n,t.peakNits,t.hdrMode)),h}(t,e,i,s,o.links.opacity)}function Vo(t,e,i){t.canvas.render.draw(s=>{const n=_o(t,s,e,i);if(!n)return;const o=e.getPosition(),a=i.getPosition();!function(t,e,i,s,n){oo(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,o,a)})}class Bo extends Hi{#st;constructor(t){super(t),this.#st=0}get maxDistance(){return this.#st}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#st=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:s,connectModeRadius:n}=e.retina;if(!s||s<0||!n||n<0||!i)return;const o=Math.abs(n),a=e.particles.grid.queryCircle(i,o,e=>this.isEnabled(t,e));a.forEach((t,i)=>{const n=t.getPosition();for(const o of a.slice(i+1)){const i=o.getPosition(),a=Math.abs(s),r=Math.abs(n.x-i.x),l=Math.abs(n.y-i.y);r<a&&l<a&&Vo(e,t,o)}})}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!n?.onHover.enable||!s.position)&&xt("connect",n.onHover.mode)}loadModeOptions(t,...e){ue(t,"connect",Fo,...e)}reset(){}}async function Ho(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new Bo(t)))})}function qo(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function No(t,e,i){Zi(i,e,(e,i)=>{!function(t,e,i){const s=vt().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,n=t.retina.pixelRatio,o={x:(s.offsetLeft+s.offsetWidth*u)*n,y:(s.offsetTop+s.offsetHeight*u)*n},a=s.offsetWidth*u*n,r=10*n,l=i.type===Ti.circle?new ae(o.x,o.y,a+r):new re(s.offsetLeft*n-r,s.offsetTop*n-r,s.offsetWidth*n+2*r,s.offsetHeight*n+2*r);qo(t,l)})}(t,e,i)})}class Uo{distance=200;load(t){H(t)||le(this,"distance",t.distance)}}const jo="destroy";class Wo extends Hi{#st;constructor(t){super(t),this.#st=0}get maxDistance(){return this.#st}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#st=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Ui;if(!i)return;const n=i.onHover.enable,o=i.onHover.mode,a=i.onDiv;s&&n&&xt(jo,o)?function(t,e){const i=10*t.retina.pixelRatio,s=e.mouse.position,n=t.retina.destroyModeDistance;!n||n<0||!s||qo(t,new ae(s.x,s.y,n+i))}(this.container,t):No(this.container,a,jo)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const o=n.onDiv;return!!s.position&&n.onHover.enable&&xt(jo,n.onHover.mode)||Yi(jo,o)}loadModeOptions(t,...e){ue(t,"destroy",Uo,...e)}reset(){}}async function $o(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new Wo(t)))})}class Go{blink=!1;color;consent=!1;opacity=1;load(t){H(t)||(le(this,"blink",t.blink),void 0!==t.color&&(this.color=be.create(this.color,t.color)),le(this,"consent",t.consent),ce(this,"opacity",t.opacity))}}class Xo{distance=100;links=new Go;load(t){H(t)||(le(this,"distance",t.distance),this.links.load(t.links))}}function Yo(t,e,i,s,n){t.canvas.render.draw(o=>{const a=e.getPosition();!function(t,e,i,s,n,o,a=!1,r,l){oo(t,i,s),t.strokeStyle=mi(n,a,o,r,l),t.lineWidth=e,t.stroke()}(o,e.retina.linksWidth??0,a,n,i,s,t.hdr,t.peakNits,t.hdrMode)})}class Zo extends Hi{#st;#O;constructor(t,e){super(e),this.#O=t,this.#st=0}get maxDistance(){return this.#st}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#st=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==Ui)return;const s=t.mouse.position;if(!s)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const o=e.particles.grid.queryCircle(s,n,e=>this.isEnabled(t,e));for(const t of o){const o=st(t.getPosition(),s);if(o>n)continue;const a=i.modes.grab.links,r=a.opacity,l=r-o*r/n;if(l<=0)continue;const c=a.color??t.options.links?.color;if(!e.particles.grabLineColor&&c){const t=i.modes.grab.links;e.particles.grabLineColor=wi(this.#O,c,t.blink,t.consent)}const d=bi(t,void 0,e.particles.grabLineColor,e.hdr);d&&Yo(e,t,d,l,s)}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&xt("grab",n.onHover.mode)}loadModeOptions(t,...e){ue(t,"grab",Xo,...e)}reset(){}}async function Ko(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new Zo(t.pluginManager,e)))})}class Qo{force=2;smooth=10;load(t){H(t)||(le(this,"force",t.force),le(this,"smooth",t.smooth))}}class Jo extends Hi{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#ft(t,e)}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&xt("parallax",n.onHover.mode)}loadModeOptions(t,...e){ue(t,"parallax",Qo,...e)}reset(){}#ft(t,e){if(!this.isEnabled(t,e))return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.parallax;if(!n)return;const o=n.force,a=t.mouse.position;if(!a)return;const r=i.canvas.size,l=r.width*u,c=r.height*u,d=n.smooth,h=e.getRadius()/o,p=(a.x-l)*h,g=(a.y-c)*h,{offset:f}=e;f.x+=(p-f.x)/d,f.y+=(g-f.y)/d}}async function ta(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new Jo(t)))})}const ea="pause";class ia extends Hi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==ea)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=(e?.interactivity??i.interactivity)?.events;return!!s&&xt(ea,s.onClick.mode)}reset(){}}async function sa(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new ia(t)))})}class na{default=!0;groups=[];particles;quantity=4;load(t){H(t)||(le(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),ce(this,"quantity",t.quantity),this.particles=Dt(t.particles,t=>Ot({},t)))}}const oa="push";class aa extends Hi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==oa)return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.push;if(!n)return;const o=K(n.quantity);if(o<=0)return;const a=Mt([void 0,...n.groups]),r=Ot(void 0!==a?i.actualOptions.particles.groups[a]:void 0,It(n.particles));i.particles.push(o,e.mouse.position,r,a)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&xt(oa,n.onClick.mode)}loadModeOptions(t,...e){ue(t,"push",na,...e)}reset(){}}async function ra(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new aa(t)))})}class la{quantity=2;load(t){H(t)||ce(this,"quantity",t.quantity)}}const ca="remove";class da extends Hi{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==ca)return;const s=K(i.interactivity.modes.remove.quantity);for(let t=0;t<s;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&xt(ca,n.onClick.mode)}loadModeOptions(t,...e){ue(t,"remove",la,...e)}reset(){}}async function ha(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new da(t)))})}class ua{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){H(t)||(le(this,"distance",t.distance),le(this,"duration",t.duration),le(this,"easing",t.easing),le(this,"factor",t.factor),le(this,"speed",t.speed),le(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class pa extends ua{selectors=[];load(t){super.load(t),H(t)||le(this,"selectors",t.selectors)}}class ga extends ua{divs;load(t){super.load(t),H(t)||(this.divs=Dt(t.divs,t=>{const e=new pa;return e.load(t),e}))}}const fa="repulse";class ma extends Hi{handleClickMode;#mt;#it;#st;#yt;#O;#nt;constructor(t,e){super(e),this.#O=t,this.#st=0,this.#yt=E.origin,this.#it=new Set,this.#mt=E.origin,this.#nt=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.repulse;if(!n||t!==fa)return;e.repulse??={particles:[]};const o=e.repulse;o.clicking=!0,o.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);o.particles=[],o.finish=!1,setTimeout(()=>{e.destroyed||(o.clicking=!1)},n.duration*p)}}get maxDistance(){return this.#st}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#st=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#it.clear();const e=this.container.actualOptions,i=t.status===Ui,s=e.interactivity?.events;if(!s)return;const n=s.onHover,o=n.enable,a=n.mode,r=s.onClick,l=r.enable,c=r.mode,d=s.onDiv;i&&o&&xt(fa,a)?this.#vt(t):l&&xt(fa,c)?this.#bt(t):Zi(fa,d,(e,i)=>{this.#wt(t,e,i)}),this.#at()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const o=n.onDiv,a=n.onHover,r=n.onClick,l=Yi(fa,o);if(!(l||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const c=a.mode,d=r.mode;return xt(fa,c)||xt(fa,d)||l}loadModeOptions(t,...e){ue(t,"repulse",ga,...e)}reset(){}#bt(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const s=e.repulse??{particles:[]};if(s.finish||(s.count??=0,s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const n=e.retina.repulseModeDistance;if(!n||n<0)return;const o=Math.pow(n/6,3),a=t.mouse.clickPosition;if(void 0===a)return;const r=e.particles.grid.queryCircle(a,o,e=>this.isEnabled(t,e)),l=o*i.speed;for(const t of r){const e=t.position.x-a.x,i=t.position.y-a.y,n=e*e+i*i;if(n<=o){this.#ot(t),s.particles.push(t);const o=n>0?1/Math.sqrt(n):0,a=n>0?l/n:0;this.#mt.x=e*o*a,this.#mt.y=i*o*a,t.velocity.setTo(this.#mt)}}}else if(!1===s.clicking){for(const t of s.particles)t.velocity.setTo(t.initialVelocity);s.particles=[]}}#vt(t){const e=this.container,i=t.mouse.position,s=e.retina.repulseModeDistance;!s||s<0||!i||this.#xt(t,i,s,new ae(i.x,i.y,s))}#xt(t,e,i,s,n){const o=this.container,a=o.particles.grid.query(s,e=>this.isEnabled(t,e)),r=o.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:l,speed:c,factor:d,maxSpeed:h}=r,u=this.#O.getEasing(l),p=(n?.speed??c)*d;for(const t of a){const s=t.position.x-e.x,n=t.position.y-e.y,o=et(s,n),a=X(u(1-o/i)*p,0,h);this.#yt.x=o?s/o*a:p,this.#yt.y=o?n/o*a:p,this.#ot(t),t.position.addTo(this.#yt)}}#at(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#nt.size)return;const e=Date.now(),i=t.delay*p,s=Math.max(.001,Math.min(1,t.speed));for(const[n,o]of this.#nt){if(this.#it.has(n))continue;if(n.destroyed){this.#nt.delete(n);continue}const a=o.target;if(e-o.lastInteractionTime<i)continue;t.follow&&n.options.move.enable&&(a.x+=n.velocity.x,a.y+=n.velocity.y,a.z+=n.velocity.z);const r=a.x-n.position.x,l=a.y-n.position.y,c=a.z-n.position.z;n.position.x+=r*s,n.position.y+=l*s,n.position.z+=c*s,Math.abs(r)<=.5&&Math.abs(l)<=.5&&(n.position.x=a.x,n.position.y=a.y,n.position.z=a.z,this.#nt.delete(n))}}#wt(t,e,i){const s=this.container,n=s.actualOptions.interactivity?.modes.repulse;if(!n)return;const o=vt().querySelectorAll(e);o.length&&o.forEach(e=>{const o=e,a=s.retina.pixelRatio,r={x:(o.offsetLeft+o.offsetWidth*u)*a,y:(o.offsetTop+o.offsetHeight*u)*a},l=o.offsetWidth*u*a,c=i.type===Ti.circle?new ae(r.x,r.y,l):new re(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.offsetHeight*a),d=Ki(n.divs,o);this.#xt(t,r,l,c,d)})}#ot(t){this.#it.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#nt.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#nt.set(t,s)),s.lastInteractionTime=i,e.follow&&t.options.move.enable&&(s.target.x+=t.velocity.x,s.target.y+=t.velocity.y,s.target.z+=t.velocity.z)}}async function ya(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new ma(e,t)))})}class va{factor=3;radius=200;load(t){H(t)||(le(this,"factor",t.factor),le(this,"radius",t.radius))}}class ba{enabled=!1;id="slow";priority=100;speedFactor=1}const wa="slow";class xa extends Hi{#st;#rt=new WeakMap;constructor(t){super(t),this.#st=0}get maxDistance(){return this.#st}clear(t,e,i){const s=this.#rt.get(t);s?.enabled&&!i||(t.removeModifier(wa),this.#rt.delete(t))}getOrCreateModifier(t){let e=this.#rt.get(t);return e||(e=new ba,this.#rt.set(t,e)),t.getModifier(e.id)!==e&&t.addModifier(e),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#st=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&xt(wa,n.onHover.mode)}loadModeOptions(t,...e){ue(t,"slow",va,...e)}reset(t,e){const i=this.#rt.get(e);i&&(i.enabled=!1);const s=this.container,n=s.actualOptions,o=t.mouse.position,a=s.retina.slowModeRadius,r=n.interactivity?.modes.slow;if(!r||!a||a<0||!o)return;const l=st(o,e.getPosition()),c=l/a,d=r.factor;if(l>a)return;const h=this.getOrCreateModifier(e);h.enabled=!0,h.speedFactor=c/d}}async function Ma(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new xa(t)))})}const Pa=["image","images"],ka=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Ca(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,n().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Oa(t){if("svg"!==t.type)return void await Ca(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(n().error("Image not found"),t.error=!0),t.loading=!1}function za(t,e,i,s,n=!1,o,a){const r=function(t,e,i,s=!1,n,o){const{svgData:a}=t;if(!a)return"";const r=yi(e,s,i,n,o);if(a.includes("fill"))return a.replaceAll(ka,()=>r);const l=a.indexOf(">");return`${a.substring(0,l)} fill="${r}"${a.substring(l)}`}(t,i,s.opacity?.value??1,n,o,a),l={color:i,data:{...t,svgData:r},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([r],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{l.loaded=!0,l.element=n,e(l),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await Ca(i),l.loaded=!0,l.element=i.element,e(l)})()}),n.src=s})}const Sa="TSP-2001",Da="TSP-2002",Ia="TSP-2003",Ta="TSP-2004";class Ea{#C;#o;constructor(t,e){this.#o=t,this.#C=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,o=s.image,a=o?.element;if(o){if(e.globalAlpha=n,a){const t=o.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(a,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#o.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#o.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#C;if(!t.shape||!Pa.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#o.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#Mt(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#o.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),o=i?.find(t=>t.name===s.name||t.source===s.src);if(!o)return;const a=s.replaceColor;o.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=o.svgData&&n?await za(o,s,n,e,t.hdr,t.peakNits,t.hdrMode):{color:n,data:o,element:o.element,loaded:!0,ratio:s.width&&s.height?s.width/s.height:o.ratio??1,replaceColor:a,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#Mt=async(t,e)=>{if(!this.#o.loadImage)throw new Error(gt(Ta));await this.#o.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class Ra{height;name;replaceColor;src="";width;load(t){H(t)||(le(this,"height",t.height),le(this,"name",t.name),le(this,"replaceColor",t.replaceColor),le(this,"src",t.src),le(this,"width",t.width))}}class La{id="image-preloader";#o;constructor(t){this.#o=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return Tl});return new e(this.#o,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new Ra;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function Aa(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error(gt(Sa));if(!i.name&&!i.src)throw new Error(gt(Da));t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let o;s.push(n),t.images.set(e,s),o=i.replaceColor?Oa:Ca,await o(n)}catch{throw new Error(gt(Ia,i.name??i.src))}}}(t),t.pluginManager.addPlugin(new La(t)),t.pluginManager.addShape(Pa,e=>Promise.resolve(new Ea(t,e)))})}class Fa extends Ie{sync=!1;load(t){H(t)||(super.load(t),le(this,"sync",t.sync))}}class _a extends Ie{sync=!1;load(t){H(t)||(super.load(t),le(this,"sync",t.sync))}}class Va{count=0;delay=new Fa;duration=new _a;load(t){H(t)||(le(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ba{#C;constructor(t){this.#C=t}init(t){const e=this.#C,i=t.options.life;if(!i)return;const s=i.delay.sync?1:j(),n=i.duration.sync?1:j();t.life={delay:e.retina.reduceFactor?K(i.delay.value)*s/e.retina.reduceFactor*p:0,delayTime:0,duration:e.retina.reduceFactor?K(i.duration.value)*n/e.retina.reduceFactor*p:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ue(t,"life",Va,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=tt(0,i.width),a=tt(0,i.height);t.position.x=Z(o),t.position.y=Z(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=K(r.delay.value)*p,s.duration=K(r.duration.value)*p)}(t,e,this.#C.canvas.size)}}async function Ha(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ba(t)))})}class qa{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function Na(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new qa))})}class Ua{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!H(t)&&(ce(this,"distance",t.distance),le(this,"enable",t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class ja extends qi{#st;constructor(t){super(t),this.#st=0}get maxDistance(){return this.#st}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(H(t.attractDistance)){const i=K(t.options.attract.distance);i>this.#st&&(this.#st=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,s=t.getPosition(),n=e.particles.grid.queryCircle(s,i);for(const e of n){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),n=s.x-i.x,o=s.y-i.y,a=t.options.attract.rotate,r=n/(1e3*a.x),l=o/(1e3*a.y),c=e.size.value/t.size.value,d=1/c;t.velocity.x-=r*c,t.velocity.y-=l*c,e.velocity.x+=r*d,e.velocity.y+=l*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ue(t,"attract",Ua,...e)}reset(){}}async function Wa(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new ja(t)))})}var $a;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy",t.fluid="fluid"}($a||($a={}));class Ga{speed=2;load(t){H(t)||le(this,"speed",t.speed)}}class Xa{maxForce=2.5;maxNeighbors=64;nearStiffness=.5;radius=30;restDensity=3;stiffness=.5;load(t){H(t)||(ce(this,"maxForce",t.maxForce),le(this,"maxNeighbors",t.maxNeighbors),ce(this,"nearStiffness",t.nearStiffness),ce(this,"radius",t.radius),ce(this,"restDensity",t.restDensity),ce(this,"stiffness",t.stiffness))}}class Ya{enable=!0;retries=0;load(t){H(t)||(le(this,"enable",t.enable),le(this,"retries",t.retries))}}class Za{absorb=new Ga;bounce=new He;enable=!1;fluid=new Xa;maxSpeed=50;mode=$a.bounce;overlap=new Ya;load(t){H(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),le(this,"enable",t.enable),this.fluid.load(t.fluid),ce(this,"maxSpeed",t.maxSpeed),le(this,"mode",t.mode),this.overlap.load(t.overlap))}}const Ka=u,Qa=1e-4;function Ja(t,e,i,s){t.x<e?t.x+=(e-t.x)*Ka:t.x>i&&(t.x-=(t.x-i)*Ka),t.y<e?t.y+=(e-t.y)*Ka:t.y>s&&(t.y-=(t.y-s)*Ka)}function tr(t,e,i,s){t.x<e?t.x=e:t.x>i&&(t.x=i),t.y<e?t.y=e:t.y>s&&(t.y=s)}class er{#Pt=E.origin;#kt;#Ct=0;#Ot=[];#zt;#St=0;constructor(){this.#kt=t=>{const e=this.#zt,i=t;if(!e||this.#Ot.length>=this.#Ct||i===e||i.destroyed||i.spawning||!i.options.collisions?.enable||i.options.collisions.mode!==$a.fluid)return!1;const s=e.getRadius();return Math.abs(Math.round(this.#St)-Math.round(i.getPosition().z))<=s+i.getRadius()}}separateOverlaps(t,e,i,s,n){const o=this.#Ot,a=t.position;a.setTo(e);for(let e=0;e<3;e++)for(const e of o)this.#Dt(t,e);void 0!==i&&void 0!==s&&void 0!==n&&tr(a,i,s,n)}solve(t,e){const i=e.options.collisions;if(!i)return;const s=i.fluid,n=t.retina.pixelRatio,o=K(s.radius)*n,a=o*Math.abs(o),r=K(s.stiffness),l=K(s.nearStiffness),c=K(s.restDensity),d=K(s.maxForce),h=s.maxNeighbors,p=e.getRadius(),g=e.position,f=t.canvas.size,m=f.width>0&&f.height>0,y=m?.15*p:0,v=f.width-y,b=f.height-y,w=this.#Ot;this.#zt=e,this.#Ct=h,this.#St=e.getPosition().z,this.#It(t,e,o,h);for(let t=0;t<3;t++){const t=e.getPosition();let i=0,s=0;for(const e of w){const n=1-st(t,e.getPosition())/o,a=n*n;i+=a,s+=a*n}const n=(i-c)*r*u,h=s*l*u;m&&Ja(g,y,v,b);for(const i of w){const s=i.getPosition(),r=s.x-t.x,l=s.y-t.y,c=r*r+l*l;if(c>a)continue;const f=Math.sqrt(c),m=1-f/o,y=X(n+h*m,-d,d),v=p+i.getRadius(),b=Math.max(m*y*u,v-f);if(f>Qa){const t=1/f;this.#Pt.x=r*t*b,this.#Pt.y=l*t*b}else this.#Pt.x=(e.id+i.id)%2==0?1:-1,this.#Pt.y=0,this.#Pt.multTo(b);g.x-=this.#Pt.x,g.y-=this.#Pt.y}}this.#It(t,e,o,h),m&&tr(g,y,v,b),this.separateOverlaps(e,g,m?y:void 0,v,b),this.#Tt(e),m&&this.#Et(e,y,v,b)}#Et(t,e,i,s){const n=t.position,o=t.velocity;(n.x<=e||n.x>=i)&&(o.x=0),(n.y<=e||n.y>=s)&&(o.y=0)}#Tt(t){const e=this.#Ot,i=t.position,s=t.velocity;let n=0;for(const o of e){const e=o.getPosition(),a=i.x-e.x,r=i.y-e.y,l=a*a+r*r,c=t.getRadius()+o.getRadius();if(!(l>=c*c||l<=Qa)&&!(++n<5))return s.x*=.1,void(s.y*=.1)}}#Dt(t,e){const i=t.position,s=e.position,n=i.x-s.x,o=i.y-s.y,a=n*n+o*o,r=t.getRadius()+e.getRadius();if(!(a>=r*r))if(a>Qa){const t=Math.sqrt(a),e=1/t,s=r-t;i.x+=n*e*s,i.y+=o*e*s}else{const s=(t.id+e.id)%2==0?1:-1;i.x+=s*r}}#It(t,e,i,s){this.#Ot.length=0,i<=0||s<=0||t.particles.grid.queryCircle(e.getPosition(),i,this.#kt,this.#Ot)}}function ir(t,e,i,s,n,o){if(!t.options.collisions||!i.options.collisions)return;const a=X(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+a*a),i.size.value-=a,i.size.value<=o&&(i.size.value=0,i.destroy())}const sr=t=>{if(!t.options.collisions)return;t.collisionMaxSpeed??=K(t.options.collisions.maxSpeed);const e=t.collisionMaxSpeed;t.velocity.getLengthSq()>e*Math.abs(e)&&(t.velocity.length=e)};function nr(t,e){const i=t.getMass(),s=e.getMass(),n=i*t.velocity.getLengthSq()+s*e.velocity.getLengthSq();St(zt(t),zt(e));const o=t.velocity.getLengthSq(),a=e.velocity.getLengthSq(),r=i*o+s*a;if(r>1e-6*n){const i=Math.sqrt(n/r);Math.abs(i-1)>1e-4&&(t.velocity.length=Math.sqrt(o)*i,e.velocity.length=Math.sqrt(a)*i)}sr(t),sr(e)}function or(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case $a.absorb:!function(t,e,i,s){const n=t.getRadius(),o=e.getRadius();!n&&o?t.destroy():n&&!o?e.destroy():n&&o&&(n>=o?ir(t,n,e,o,i,s):ir(e,o,t,n,i,s))}(t,e,i,s);break;case $a.bounce:nr(t,e);break;case $a.destroy:!function(t,e){t.unbreakable||e.unbreakable||nr(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e);case $a.fluid:}}class ar extends qi{#Rt;#st;constructor(t){super(t),this.#Rt=new er,this.#st=0}get maxDistance(){return this.#st}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=t.options.collisions;if(!s?.enable)return;if(s.mode===$a.fluid){const e=K(s.fluid.radius);return e>this.#st&&(this.#st=e),void this.#Rt.solve(this.container,t)}const n=this.container,o=t.getPosition(),a=t.getRadius(),r=n.particles.grid.queryCircle(o,2*a);for(const e of r){if(t===e||!e.options.collisions?.enable||s.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const r=e.getPosition(),l=e.getRadius();if(a<l||a===l&&t.id>e.id)continue;const c=a+l;c<0||Math.abs(Math.round(o.z)-Math.round(r.z))>c||(it(o,r)>c*c||or(t,e,i,n.retina.pixelRatio))}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ue(t,"collisions",Za,...e)}reset(t,e){}}const rr="TSP-4001";class lr{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return El});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function cr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{Qi(t),t.pluginManager.addPlugin(new lr),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new ar(t)))})}class dr extends ae{#Lt;constructor(t,e,i,s){super(t,e,i),this.#Lt=s}contains(t){const e=this.position,i=t.x-e.x,s=t.y-e.y,n=i*i,o=s*s,a=this.radius*this.radius;if(n+o<=a)return!0;const{width:r,height:l}=this.#Lt,c=t.x-r-e.x,d=t.x+r-e.x,h=t.y-l-e.y,u=t.y+l-e.y;return Math.min(n,c*c,d*d)+Math.min(o,h*h,u*u)<=a}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#Lt,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof ae)n=new ae(i.x,i.y,t.radius);else{const e=t;n=new re(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}query(t){const{x:e,y:i}=this.position,{width:s,height:n}=this.#Lt,o=this.radius,a=e-o<=g.x,r=e+o>=s,l=i-o<=g.y,c=i+o>=n;if(!(a||r||l||c))return t.query(this);const d=[g.x],h=[g.y];a&&d.push(s),r&&d.push(-s),l&&h.push(n),c&&h.push(-n);const u=new Set;for(const s of d)for(const n of h)for(const a of t.queryCircle({x:e+s,y:i+n},o))u.add(a);return[...u]}}class hr{blur=5;color=new be;enable=!1;constructor(){this.color.value="#000"}load(t){H(t)||(le(this,"blur",t.blur),this.color=be.create(this.color,t.color),le(this,"enable",t.enable))}}class ur{color;enable=!1;frequency=1;opacity;load(t){H(t)||(void 0!==t.color&&(this.color=be.create(this.color,t.color)),le(this,"enable",t.enable),le(this,"frequency",t.frequency),le(this,"opacity",t.opacity))}}class pr{blink=!1;color=new be;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new hr;triangles=new ur;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){H(t)||(le(this,"id",t.id),le(this,"blink",t.blink),this.color=be.create(this.color,t.color),le(this,"consent",t.consent),le(this,"distance",t.distance),le(this,"enable",t.enable),le(this,"frequency",t.frequency),le(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),le(this,"width",t.width),le(this,"warp",t.warp))}}function gr(t,e,i){const s=Math.abs(t),n=Math.abs(e),o=Math.min(s,i.width-s),a=Math.min(n,i.height-n);return o*o+a*a}class fr extends qi{#st;#O;constructor(t,e){super(e),this.#O=t,this.#st=0}get maxDistance(){return this.#st}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#st&&(this.#st=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<g.x||e.y<g.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,o=n.opacity,a=t.retina.linksDistance??0,r=a*Math.abs(a),l=n.warp,c=l?new dr(e.x,e.y,a,s).query(i.particles.grid):i.particles.grid.queryCircle(e,a);for(const i of c){const c=i.options.links;if(t===i||!c?.enable||n.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<g.x||d.y<g.y||d.x>s.width||d.y>s.height)continue;const h=e.x-d.x,u=e.y-d.y,p=h*h+u*u,f=l&&c.warp?gr(h,u,s):p,m=Math.min(p,f);if(m>r)continue;const y=(1-Math.sqrt(m)/a)*o;this.#At(t),t.links.push({destination:i,opacity:y,color:this.#Ft(t,i),isWarped:f<p})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ue(t,"links",pr,...e)}reset(){}#Ft(t,e){const i=this.container,s=t.options.links;if(!s)return;return bi(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor,i.hdr)}#At(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=wi(this.#O,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class mr{id="links";#O;constructor(t){this.#O=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return Ll});return new e(this.#O,t)}loadOptions(){}needsPlugin(){return!0}}async function yr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;Qi(t),e.addPlugin(new mr(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new fr(e,t)))})}const vr=new Map;function br(t,e){const{context:i,radius:s}=t,n=function(t){const e=vr.get(t);if(e)return e;const i=v/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*u,o=[];for(let e=0;e<t;e++){const t=n+e*i;o[e]={x:Math.cos(t),y:Math.sin(t)}}return vr.set(t,o),o}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const o=e.x*s,a=e.y*s;t?i.lineTo(o,a):i.moveTo(o,a)}i.closePath()}class wr{draw(t){const{particle:e,radius:i}=t;br(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(K(e?.sides??5))}}class xr extends wr{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Mr extends wr{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Pr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new xr))})}async function kr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Mr))})}async function Cr(t){t.checkVersion("4.6.0"),await Promise.all([Pr(t),kr(t)])}class Or{decay=0;enable=!1;speed=0;sync=!1;load(t){H(t)||(le(this,"enable",t.enable),ce(this,"speed",t.speed),ce(this,"decay",t.decay),le(this,"sync",t.sync))}}class zr extends Ie{animation=new Or;direction=t.RotateDirection.clockwise;path=!1;load(t){H(t)||(super.load(t),le(this,"direction",t.direction),this.animation.load(t.animation),le(this,"path",t.path))}}class Sr{#C;constructor(t){this.#C=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:ot(K(i.value)),min:0,max:v},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*j())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-K(n.decay),e.rotate.velocity=K(n.speed)/360*this.#C.retina.reduceFactor,n.sync||(e.rotate.velocity*=j())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ue(t,"rotate",zr,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(En(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Dr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Sr(t)))})}class Ir{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Tr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Ir))})}const Er=0,Rr=0;class Lr{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,o=i.starInset??2;e.moveTo(Er,Rr-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(Er,Rr-s*o),e.rotate(Math.PI/n),e.lineTo(Er,Rr-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(K(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=K(i?.inset??2)}}async function Ar(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Lr))})}async function Fr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{await Promise.all([eo(t),(async t=>{await async function(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Bi(i)),i.initializers.interactors??=new Map,i.addInteractor=(t,e)=>{i.initialized||(i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e))},i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error(gt(Di));i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([ta(t),mo(t),Co(t),Lo(t),Ho(t),$o(t),Ko(t),sa(t),ra(t),ha(t),ya(t),Ma(t),Wa(t),cr(t),yr(t)])})(t),so(t),co(t),Aa(t),Na(t),Cr(t),Tr(t),Ar(t),Ha(t),$n(t),Dr(t)])})}const _r=["text","character","char","multiline-text"];function Vr(t,e,i,s,n,o){const a={x:-e.length*i*u,y:i*u+s*i};n&&t.fillText(e,a.x,a.y),o&&t.strokeText(e,a.x,a.y)}class Br{draw(t){!function(t){const{context:e,particle:i,fill:s,stroke:n,radius:o,opacity:a}=t,r=i.shapeData;if(!r)return;const l=r.value;if(i.textLines??=It(l,i.randomIndexData)?.split("\n")??[],i.maxTextLength??=i.textLines.length?Math.max(...i.textLines.map(t=>t.length)):i.textLines[0]?.length??0,!i.textLines.length||!i.maxTextLength)return;const c=i.textLines,d=r.style??"",h=r.weight??"400",u=r.font??"Verdana",p=2*Math.round(o)/(c.length*i.maxTextLength);e.font=`${d} ${h} ${p.toString()}px "${u}"`;const g=e.globalAlpha;e.globalAlpha=a;for(let t=0;t<c.length;t++){const i=c[t];i&&Vr(e,i,p,t,s,n)}e.globalAlpha=g}(t)}async init(t){const e=t.actualOptions;if(_r.find(t=>xt(t,e.particles.shape.type))){const t=_r.map(t=>e.particles.shape.options[t]).find(t=>!!t),i=[];Dt(t,t=>{i.push(ao(t.font,t.weight))}),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!_r.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;s&&(e.textLines=It(s,e.randomIndexData)?.split("\n")??[],e.maxTextLength=e.textLines.length?Math.max(...e.textLines.map(t=>t.length)):e.textLines[0]?.length??0)}}async function Hr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(_r,()=>Promise.resolve(new Br))})}var qr;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(qr||(qr={}));class Nr{decay=0;enable=!1;speed=0;sync=!1;load(t){H(t)||(le(this,"enable",t.enable),ce(this,"speed",t.speed),ce(this,"decay",t.decay),le(this,"sync",t.sync))}}class Ur extends Ie{animation=new Nr;direction=qr.clockwise;enable=!1;load(t){super.load(t),H(t)||(this.animation.load(t.animation),le(this,"direction",t.direction),le(this,"enable",t.enable))}}class jr{#C;constructor(t){this.#C=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:ot(K(i.value)),sinDirection:j()>=u?1:-1,cosDirection:j()>=u?1:-1,min:0,max:v};let s=i.direction;if(s===qr.random){s=Math.floor(2*j())>0?qr.counterClockwise:qr.clockwise}switch(s){case qr.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case qr.clockwise:e.tilt.status=t.AnimationStatus.increasing}const n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=1-K(n.decay),e.tilt.velocity=K(n.speed)/360*this.#C.retina.reduceFactor,n.sync||(e.tilt.velocity*=j()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ue(t,"tilt",Ur,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&En(e,e.tilt,!1,t.DestroyType.none,i)}}async function Wr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new jr(t)))})}class $r{color;enable=!1;frequency=.05;opacity=1;load(t){H(t)||(void 0!==t.color&&(this.color=be.create(this.color,t.color)),le(this,"enable",t.enable),le(this,"frequency",t.frequency),ce(this,"opacity",t.opacity))}}class Gr{enable=!1;fillColor;frequency=.05;opacity=1;strokeColor;load(t){H(t)||(void 0!==t.fillColor&&(this.fillColor=be.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=be.create(this.strokeColor,t.strokeColor)),le(this,"enable",t.enable),le(this,"frequency",t.frequency),ce(this,"opacity",t.opacity))}}class Xr{links=new $r;particles=new Gr;load(t){H(t)||(this.links.load(t.links),this.particles.load(t.particles))}}class Yr{#C;#O;constructor(t,e){this.#O=t,this.#C=e}getColorStyles(t,e,i,s){const n=t.options,o=this.#C,a=n.twinkle;if(!a)return{};const r=a.particles,l=r.enable&&j()<r.frequency,c=t.options.zIndex,d=(1-t.zIndexFactor)**c.opacityRate,h=l?K(r.opacity)*d:s,u=li(this.#O,r.fillColor),p=li(this.#O,r.strokeColor),g=(()=>{if(u)return yi(u,o.hdr,h,o.peakNits,o.hdrMode)})(),f=(()=>{if(p)return yi(p,o.hdr,h,o.peakNits,o.hdrMode)})(),m={},y=l&&(!!g||!!f);return m.fill=y?g:void 0,m.stroke=y?f:void 0,m}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){ue(t,"twinkle",Xr,...e)}update(){}}async function Zr(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("twinkle",e=>Promise.resolve(new Yr(t.pluginManager,e)))})}class Kr{angle=50;move=10;load(t){H(t)||(ce(this,"angle",t.angle),ce(this,"move",t.move))}}class Qr{distance=5;enable=!1;speed=new Kr;load(t){if(!H(t)&&(ce(this,"distance",t.distance),le(this,"enable",t.enable),void 0!==t.speed))if(A(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Jr{#C;constructor(t){this.#C=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:j()*v,angleSpeed:K(e.speed.angle)/360,moveSpeed:K(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=K(e?.distance??0)*this.#C.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){ue(t,"wobble",Qr,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const o=t.retina.reduceFactor,a=n.angleSpeed*i.factor*o,r=n.moveSpeed*i.factor*o*(e.retina.wobbleDistance??0)/16.666666666666668,l=v,{position:c}=e;n.angle+=a,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#C,t,e)}}async function tl(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Jr(t)))})}async function el(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{const e=async t=>{await Ns(t),await Promise.all([Ws(t),Zs(t)])};await Promise.all([(async t=>{await Fr(t),await Promise.all([tn(t),ln(t),ds(t),e(t)])})(t),xs(t),pn(t),Wr(t),Zr(t),tl(t),Hr(t)])})}const il=globalThis;il.loadFull=el,il.tsParticles=zi;function sl(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class nl{#_t;#Vt;#Bt;#Ht;#qt;#C;#Nt;#Ut;#jt;#Wt;#$t;#Gt;#O;#Xt;#Yt;#Zt={};#Kt=[void 0,void 0];#Qt={};constructor(t,e,i){this.#O=t,this.#C=e,this.#Ht=i,this.#Nt=null,this.#_t=null,this.#Vt=new Set,this.#Yt=[],this.#Xt=[],this.#Bt=[],this.#qt=[],this.#jt=[],this.#Wt=[],this.#$t=[],this.#Gt={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#Ut}canvasClear(){this.#C.actualOptions.clear&&this.draw(t=>{t.clearRect(g.x,g.y,this.#Ht.size.width,this.#Ht.size.height)})}clear(){const e=new Set;for(const t of this.#Bt)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.#Jt(i))if(!e.has(t)&&(e.add(t),t.canvasClear?.()))return t;this.canvasClear()}destroy(){this.stop(),this.#_t=null,this.#Vt.clear(),this.#Yt=[],this.#Xt=[],this.#Bt=[],this.#qt=[],this.#jt=[],this.#Wt=[],this.#$t=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Gt[e]=[])}draw(t){const e=this.#Nt;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[o,a]=this.#te(t);if(o??=s,a??=n,!o&&!a)return;const r=this.#C,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#Qt,g=this.#Zt,f=o?yi(o,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=a?yi(a,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.#$t)i.drawParticleSetup?.(s,t,e);this.#ee(s,t,i,h,g,p),this.#ie({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#se(t);for(const i of this.#Wt)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#jt)this.#ne(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#C;this.clear(),i.update(e),this.draw(n=>{const o=this.#Ht.size.width,a=this.#Ht.size.height;if(this.#_t)try{n.drawImage(this.#_t,g.x,g.y,o,a)}catch{this.#oe("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#oe("background-draw-error","Error in background.draw callback")}for(const e of this.#Jt(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#Jt(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#Jt(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#Jt(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#ae(),this.paint()}initPlugins(){this.#Bt=[],this.#qt=[],this.#jt=[],this.#$t=[],this.#Wt=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Gt[e]=[]);this.#re()}initUpdaters(){this.#Yt=[],this.#Xt=[];for(const t of this.#C.particleUpdaters)t.afterDraw&&this.#Xt.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#Yt.push(t)}paint(){let e=!1;for(const i of this.#Jt(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.#Ht.size.width,this.#Ht.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.#Ht.size.width,this.#Ht.size.height),i.globalAlpha=s})}setContext(t){this.#Nt=t,this.#Nt&&(this.#Nt.globalCompositeOperation=l)}setContextSettings(t){this.#Ut=t}stop(){this.draw(t=>{t.clearRect(g.x,g.y,this.#Ht.size.width,this.#Ht.size.height)})}updateBackgroundElement(){this.#ae()}#se(t){for(const e of this.#Xt)e.afterDraw?.(t)}#ee(t,e,i,s,n,o){for(const a of this.#Yt){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)sl(o,t,e)}a.beforeDraw?.(e)}}#le(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#ce(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#ie(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,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),o.fill&&(i.fillStyle=o.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,o.stroke&&(i.strokeStyle=o.stroke);const m={context:i,particle:s,radius:a,drawRadius:1*a,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.#ce(y,m),this.#de(v,m),this.#he(v,m),this.#ue(v,m),this.#le(y,m),i.resetTransform()}#ne(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#he(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:o}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),o&&i.stroke())}#ue(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#de(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#Jt(t){return this.#Gt[t]}#te(t){let e,i;for(const s of this.#qt)if(!e&&s.particleFillColor&&(e=li(this.#O,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=li(this.#O,s.particleStrokeColor(t))),e&&i)break;return this.#Kt[0]=e,this.#Kt[1]=i,this.#Kt}#pe(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.#Gt[t].push(e)}#re(){for(const t of this.#C.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#qt.push(t),t.drawParticle&&this.#jt.push(t),t.drawParticleSetup&&this.#$t.push(t),t.drawParticleCleanup&&this.#Wt.push(t),t.canvasClear&&this.#Bt.push(t),this.#pe(t)}#ge(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}#ae(){const t=this.#C.actualOptions.background;if(this.#_t=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){let e;try{e=document.querySelector(t.element)}catch{return void this.#oe("background-element-invalid-selector",`Background element selector "${t.element}" is invalid`)}e&&this.#ge(e)?this.#_t=e:e?this.#oe("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#oe("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#ge(t.element)&&(this.#_t=t.element)}#oe(t,e){this.#Vt.has(t)||(this.#Vt.add(t),n().warning(e))}}const ol=new WeakMap;function al(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 rl{domElement;render;renderCanvas;size;zoom=1;#C;#fe;#me;#ye;#ve;#O;#be;#we;#xe;#Me;constructor(t,e){this.#O=t,this.#C=e,this.render=new nl(t,e,this),this.#xe={height:0,width:0};const i=e.retina.pixelRatio,s=this.#xe;this.size={height:s.height*i,width:s.width*i},this.#fe=!1,this.#we=[],this.#be="none"}get#Pe(){return this.#C.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#fe){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ke();this.render.destroy(),this.#we=[]}getZoomCenter(){const t=this.#C.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Me?this.#Me:{x:e*u/t,y:i*u/t}}init(){this.#Ce(t=>{t.disconnect()}),this.#ye=wt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Oe()}),this.resize(),this.#ze(),this.#Ce(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Se(),this.initBackground(),this.#De(),this.render.init()}initBackground(){const e=this.#C,i=e.actualOptions.background,s=this.domElement;if(!s)return;const n=s.style,o=ai(this.#O,i.color);if(o){const s=e.actualOptions.hdr;n.backgroundColor=mi(o,e.hdr,i.opacity,s.peakNits,_(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.#we=[];for(const t of this.#C.plugins)t.resize&&this.#we.push(t)}loadCanvas(t){this.#fe&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#fe=!!e&&"true"===e.dataset[a],this.renderCanvas=e?(t=>{const e=ol.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(gt(pt.offscreenCanvasUnsupported));try{const e=t.transferControlToOffscreen();return ol.set(t,e),e}catch{throw new TypeError(gt(pt.offscreenCanvasTransferFailed))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#ve=Et(i.style));const s=this.#xe,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const o=this.#C.retina.pixelRatio,r=this.size;n.height=r.height=s.height*o,n.width=r.width=s.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#C,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#xe,n={width:t.offsetWidth,height:t.offsetHeight},o=e.retina.pixelRatio,a={width:n.width*o,height:n.height*o};if(n.height===s.height&&n.width===s.width&&a.height===i.height&&a.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=a.width,i.height=l.height=a.height,this.#C.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#be=t,this.#Oe())}setZoom(t,e){this.zoom=t,this.#Me=e}stop(){this.#Ce(t=>{t.disconnect()}),this.#ye=void 0,this.#Ie(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#C,e=t.updateActualOptions();t.particles.setDensity(),this.#Te(),e&&await t.refresh()}#Te(){for(const t of this.#we)t.resize?.()}#Se(){const e=this.#C,i=e.actualOptions.hdr.enable&&bt("(color-gamut: p3)")?.matches&&bt("(dynamic-range: high)")?.matches;e.hdrMode=_(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)}}#De(){this.#Ie();const t=bt("(color-gamut: p3)"),e=bt("(dynamic-range: high)"),i=()=>{this.#Se(),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.#me=s}#ze(){const t=this.domElement,e=this.#C.actualOptions;if(t){this.#Pe?this.#Ee():this.#ke();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")}}}#Ie(){if(this.#me){for(const{handler:t,mql:e}of this.#me)e.removeEventListener("change",t);this.#me=void 0}}#Oe(){const t=this.domElement;if(!t)return;this.#Ce(t=>{t.disconnect()}),this.#ze(),this.initBackground();const e=this.#be;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Ce(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ke(){const t=this.domElement,e=this.#ve;t&&e&&al(t,e,!0)}#Ce(t){this.#ye&&t(this.#ye)}#Ee(){const t=this.domElement;t&&al(t,At(this.#C.actualOptions.fullScreen.zIndex),!0)}}class ll{#C;#Re;#Le;#Ae;constructor(t){this.#C=t,this.#Re={visibilityChange:()=>{this.#Fe()},resize:()=>{this.#_e()}}}addListeners(){this.#Ve(!0)}removeListeners(){void 0!==this.#Ae&&(clearTimeout(this.#Ae),this.#Ae=void 0),this.#Ve(!1)}#Fe(){const t=this.#C;t.actualOptions.pauseOnBlur&&(vt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#_e(){this.#Ae&&(clearTimeout(this.#Ae),this.#Ae=void 0);const t=async()=>{await this.#C.canvas.windowResize()};this.#Ae=setTimeout(()=>{t()},this.#C.actualOptions.resize.delay*p)}#Ve(t){const e=this.#Re;this.#Be(t),"undefined"!=typeof document&&Ft(document,d,e.visibilityChange,t,!1)}#Be(t){const e=this.#Re,i=this.#C;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Ft(globalThis,c,e.resize,t);const s=i.canvas.domElement;this.#Le&&!t?(s&&this.#Le.unobserve(s),this.#Le.disconnect(),this.#Le=void 0):!this.#Le&&t&&s&&(this.#Le=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#_e()}),this.#Le.observe(s))}}function cl(t){if(!xt(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 dl(t,e){const i=t%e;return i<0?i+e:i}function hl(t,e,i,s){const n=Ge(i,e,e.actualOptions.particles),o=n.reduceDuplicates;t.effect=It(n.effect.type,t.id,o),t.shape=It(n.shape.type,t.id,o);const a=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=It(e,t.id,o);i&&(t.effect=i)}a.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=It(e,t.id,o);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===m){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(j()*i.length)]}if(t.shape===m){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(j()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return Ot({close:e.close},It(n,i,s))}(t.effect,a,t.id,o):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return Ot({close:e.close},It(n,i,s))}(t.shape,r,t.id,o):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 ul{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;#He={fillOpacity:1,opacity:1,strokeOpacity:1};#qe=T.origin;#Ne={sin:0,cos:0};#Ue={a:1,b:0,c:0,d:1};#C;#rt=[];#O;constructor(t,e){this.#O=t,this.#C=e}addModifier(t){this.#rt.push(t),this.#rt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#rt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#C,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.#C.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#C.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#je(this.#We(xi(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*u}getModifier(t){return this.#rt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=K(this.opacity?.value??1),s=this.#We(void 0,t=>t.opacity)??i;return this.#He.fillOpacity=this.fillOpacity??1,this.#He.opacity=s*e,this.#He.strokeOpacity=this.strokeOpacity??1,this.#He}getPosition(){return this.#qe.x=this.position.x+this.offset.x,this.#qe.y=this.position.y+this.offset.y,this.#qe.z=this.position.z,this.#qe}getRadius(){return this.#We(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Ne.sin=Math.sin(t),this.#Ne.cos=Math.cos(t),this.#Ne}getStrokeColor(){return this.#je(this.#We(xi(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Ue.a=e.cos*(t.a??f.a),this.#Ue.b=i?e.sin*(t.b??1):t.b??f.b,this.#Ue.c=i?-e.sin*(t.c??1):t.c??f.c,this.#Ue.d=e.cos*(t.d??f.d),this.#Ue}init(e,i,s,n){const o=this.#C;!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=hl(this,o,this.#O,s),o.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(o.particleUpdaters,this),this.#$e(i),this.initialVelocity=this.#Ge(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.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,o),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(o.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)}(o,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(o,this)}isInsideCanvas(t){return this.#Xe(t).inside}isInsideCanvasForOutMode(t,e){return this.#Xe(e,t).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=dl(t,v);return e>=Math.PI*u&&e<3*Math.PI*u}if(this.roll.horizontal){const e=dl(t+Math.PI*u,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=dl(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.#rt.findIndex(e=>e.id===t);e>=0&&this.#rt.splice(e,1)}reset(){for(const t of this.#C.particleUpdaters)t.reset?.(this)}#We(t,e){let i=t;for(const t of this.#rt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Ye(t,e){let i=0,s=t?T.create(t.x,t.y,e):void 0;const n=this.#C,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return T.create(i.x,i.y,e)}const t=ht({size:l,position:s}),c=T.create(t.x,t.y,e);this.#Ze(c,r,a.left??a.default),this.#Ze(c,r,a.right??a.default),this.#Ke(c,r,a.top??a.default),this.#Ke(c,r,a.bottom??a.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}}#Ge(){const e=this.options.move,i=rt(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=ot(K(e.angle.value)),n=ot(K(e.angle.offset)),o={left:n-s*u,right:n+s*u};return e.straight||(i.angle+=Z(tt(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=j()),i}#Ze(e,i,s){cl({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#C.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Ke(e,i,s){cl({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#C.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Qe(e,i){const s=this.getRadius(),n=this.#C.canvas.size,o=i===t.OutMode.bounce||i===t.OutMode.split,a=o?this.getPosition():this.position;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"}}#Je(t,e){return{canvasSize:this.#C.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Xe(e,i){const s=this.#Qe(e,i),n=this.#C,o=this.shape?n.shapeDrawers.get(this.shape):void 0,a=this.effect?n.effectDrawers.get(this.effect):void 0;if(!o?.isInsideCanvas&&!a?.isInsideCanvas)return s;const r=this.#Je(e,i),l=o?.isInsideCanvas?this.#ti(o.isInsideCanvas(r),"shape"):void 0,c=a?.isInsideCanvas?this.#ti(a.isInsideCanvas(r),"effect"):void 0;if(l&&c){const e=Math.max(l.margin??0,c.margin??0);return{inside:i===t.OutMode.destroy||i===t.OutMode.out?l.inside||c.inside:l.inside&&c.inside,margin:e>0?e:void 0,reason:"combined"}}return l??c??s}#je(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?Oi(t,this.roll.alter.type,this.roll.alter.value):t:t}#$e(e){const i=this.#C,s=Math.floor(K(this.options.zIndex.value)),n=this.#Ye(e,X(s,0,i.zLayers));if(!n)throw new Error(gt(pt.particlePositionNotFound));this.position=n,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...Tt(this.options.move.center,o),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=E.origin}#ti(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class pl{#ei=new Map;#ii;#si=[];#ni;#oi;#ai=[];#ri;constructor(t){this.#ii=t,this.#ni=0,this.#ri=0}get cellSize(){return this.#ii}set cellSize(t){this.#oi=t}clear(){this.#ei.clear();const t=this.#oi;t&&(this.#ii=t),this.#oi=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#li(e,i);this.#ei.has(s)||this.#ei.set(s,[]),this.#ei.get(s)?.push(t)}query(t,e,i=[]){const s=this.#ci(t);if(!s||!this.#ei.size)return i;const n=Math.floor(s.minX/this.#ii),o=Math.floor(s.maxX/this.#ii),a=Math.floor(s.minY/this.#ii),r=Math.floor(s.maxY/this.#ii);if(!Number.isSafeInteger(n)||!Number.isSafeInteger(o)||!Number.isSafeInteger(a)||!Number.isSafeInteger(r)||n>o||a>r)return i;if(!e&&(o-n+1)*(r-a+1)>Math.max(64,16*this.#ei.size)){const e=[];for(const t of this.#ei.keys()){const i=t.indexOf("_"),s=Number(t.slice(0,i)),l=Number(t.slice(i+1));s>=n&&s<=o&&l>=a&&l<=r&&e.push({x:s,y:l})}e.sort((t,e)=>t.x===e.x?t.y-e.y:t.x-e.x);for(const{x:s,y:n}of e)this.#di(s,n,t,void 0,i);return i}for(let s=n;s<=o;s++)for(let n=a;n<=r;n++)this.#di(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#hi(t.x,t.y,e);try{return this.query(n,i,s)}finally{this.#ni--}}queryRectangle(t,e,i,s=[]){const n=this.#ui(t.x,t.y,e.width,e.height);try{return this.query(n,i,s)}finally{this.#ri--}}#hi(t,e,i){const s=this.#ni++;let n=this.#si[s];return n||(n=new ae(t,e,i),this.#si[s]=n),n.reset(t,e,i)}#ui(t,e,i,s){const n=this.#ri++;let o=this.#ai[n];return o||(o=new re(t,e,i,s),this.#ai[n]=o),o.reset(t,e,i,s)}#li(t,e){return`${Math.floor(t/this.#ii)}_${Math.floor(e/this.#ii)}`}#ci(t){if(t instanceof ae){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 re){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}#di(t,e,i,s,n){const o=this.#ei.get(`${t}_${e}`);if(o)for(const t of o)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}}class gl{checkParticlePositionPlugins;#pi;#C;#gi;#fi;#mi;#yi;#vi;#bi;#wi;#O;#xi;#Mi;#Pi;#ki;#Ci;#Oi;constructor(t,e){this.#O=t,this.#C=e,this.#yi=0,this.#pi=[],this.#xi=[],this.#mi=0,this.#fi=new Map,this.#vi=new Map,this.#Oi=this.#zi(this.#C.zLayers),this.#gi=new pl(100),this.checkParticlePositionPlugins=[],this.#bi=[],this.#wi=[],this.#Pi=[],this.#Mi=[],this.#Ci=[]}get count(){return this.#pi.length}get grid(){return this.#gi}addParticle(e,i,s,o){if(!this.#Si(s,this.count))try{const n=this.#xi.pop()??new ul(this.#O,this.#C);n.init(this.#yi,e,i,s);let a=!0;return o&&(a=o(n)),a?(this.#pi.push(n),this.#Di(n),this.#yi++,this.#C.dispatchEvent(t.EventType.particleAdded,{particle:n}),n):void this.#xi.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#pi=[],this.#vi.clear(),this.#Ii(this.#C.zLayers)}destroy(){this.#pi=[],this.#xi.length=0,this.#vi.clear(),this.#Oi=[],this.checkParticlePositionPlugins=[],this.#bi=[],this.#wi=[],this.#Pi=[],this.#Mi=[],this.#Ci=[]}drawParticles(t){for(let e=this.#Oi.length-1;e>=0;e--){const i=this.#Oi[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#pi.filter(t)}find(t){return this.#pi.find(t)}get(t){return this.#pi[t]}async init(){const t=this.#C;this.checkParticlePositionPlugins=[],this.#Ci=[],this.#wi=[],this.#Pi=[],this.#bi=[],this.#Mi=[],this.#vi.clear(),this.#Ii(t.zLayers),this.#gi=new pl(100*t.retina.pixelRatio),this.#Ti(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#Ti(Ge(this.#O,this.#C,i),t,i)}await this.#Ei()}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.#C.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#pi.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let o=0;for(let a=t;o<e&&a<this.count;a++)this.#Ri(a,i,s,n)&&(a--,o++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#C.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#C.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ge(this.#O,this.#C,s);this.#Li(n,i,t)}this.#Li(t.particles,i)}setResizeFactor(t){this.#ki=t}update(t){this.#gi.clear();for(const e of this.#Ci)e.update?.(t);const e=this.#Ai(t);for(const e of this.#Pi)e.postUpdate?.(t);if(this.#Fi(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#ki=void 0}#_i(...t){this.#xi.push(...t)}#Li(e,i,s,n){const o=e.number;if(!o.density.enable)return void this.#Ti(e,s,n);const a=this.#Vi(o.density),r=o.value,l=o.limit.value>0?o.limit.value:r,c=Math.round(Math.min(r,l)*a+i),d=this.#Bi(s);void 0===s?this.#mi=o.limit.value*a:this.#fi.set(s,{limit:o.limit.value*a,mode:_(t.LimitMode,o.limit.mode,t.LimitMode.delete)}),d<c?this.push(Math.abs(c-d),void 0,e,s):d>c&&this.removeQuantity(d-c,s)}#Ti(e,i,s){if(void 0===i){this.#mi=e.number.limit.value;const t=this.#C.actualOptions.particles.groups;for(const e of this.#fi.keys())e in t||this.#fi.delete(e)}else{const n=s?.number?.limit?.value??e.number.limit.value;n>0?this.#fi.set(i,{limit:n,mode:_(t.LimitMode,s?.number?.limit?.mode??e.number.limit.mode,t.LimitMode.delete)}):this.#fi.delete(i)}}#Si(e,i){const s=this.#mi,n=this.#C.actualOptions.particles.number.limit.mode;if(s>0&&n===t.LimitMode.wait&&i>=s)return!0;const o=void 0===e?void 0:this.#fi.get(e);if(o&&o.limit>0&&o.mode===t.LimitMode.wait){if(this.#Bi(e)>=o.limit)return!0}if(o&&o.limit>0&&o.mode===t.LimitMode.delete){const t=this.#Bi(e)+1-o.limit;t>0&&this.removeQuantity(t,e)}if(s>0&&n===t.LimitMode.delete){const t=this.count+1-s;t>0&&this.#Hi(t)}return!1}#Bi(t){let e=0;for(const i of this.#pi)i.group===t&&e++;return e}#zi(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#qi(t){const e=this.#Oi.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Vi(t){const e=this.#C;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;if(!Number.isFinite(i.width)||!Number.isFinite(i.height)||i.width<=0||i.height<=0||!Number.isFinite(t.width)||!Number.isFinite(t.height)||t.width<=0||t.height<=0||!Number.isFinite(s)||s<=0)return 1;const n=i.width*i.height/(t.height*t.width*s**2);return Number.isFinite(n)&&n>=0?n:1}async#Ni(){const t=this.#C;await t.initDrawersAndUpdaters(),t.canvas.render.initUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#Ei(){await this.#Ui(),await this.#Ni();let t=!1;const e=this.#C;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#Ui(){const t=this.#C;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ci.push(e),e.particleUpdate&&this.#wi.push(e),e.postUpdate&&this.#Pi.push(e),e.particleReset&&this.#bi.push(e),e.postParticleUpdate&&this.#Mi.push(e)}#Di(t){const e=this.#qi(t.position.z),i=this.#Oi[e];i&&(i.push(t),this.#vi.set(t.id,e))}#Hi(t){this.removeAt(0,t,void 0,void 0,!1)}#Ri(e,i,s,n=!0){const o=this.#pi[e];return!!o&&((!n||o.group===i)&&(this.#pi.splice(e,1),this.#ji(o),o.destroy(s),this.#C.dispatchEvent(t.EventType.particleRemoved,{particle:o}),this.#_i(o),!0))}#ji(t){const e=this.#vi.get(t.id)??this.#qi(t.position.z),i=this.#Oi[e];if(!i)return void this.#vi.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#vi.delete(t.id)}#Ii(t){const e=Math.max(Math.floor(t),1);if(this.#Oi.length===e)for(const t of this.#Oi)t.length=0;else this.#Oi=this.#zi(e)}#Wi(t){const e=this.#qi(t.position.z),i=this.#vi.get(t.id);if(void 0===i)return void this.#Di(t);if(i===e)return;const s=this.#Oi[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#Oi[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.#vi.set(t.id,e)}else this.#vi.set(t.id,e)}#Ai(t){const e=new Set,i=this.#ki;for(const s of this.#pi){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.#bi)t.particleReset?.(s);for(const e of this.#wi){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#gi.insert(s)}return e}#Fi(t,e){for(const i of this.#pi)if(i.destroyed)e.add(i);else{for(const e of this.#C.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Mi)e.postParticleUpdate?.(i,t);this.#Wi(i)}}}class fl{pixelRatio;reduceFactor;#C;constructor(t){this.#C=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#C,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,o=t.retina;o.maxSpeed=K(s.gravity.maxSpeed)*i,o.moveDrift=K(s.drift)*i,o.moveSpeed=K(s.speed)*i;const a=o.maxDistance;a.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,a.vertical=void 0===n.vertical?void 0:n.vertical*i}}function ml(t){return!t.destroyed}function yl(t,e,...i){const s=new Xe(t,e);return ge(s,...i),s}const vl=Object.freeze([]);var bl=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particles;particleUpdaters;peakNits;retina;shapeDrawers;started;zLayers;#j;#$i;#Gi;#Xi={value:0,factor:0};#Yi;#Zi;#Ki;#Qi;#Ji;#ts;#es;#is;#ss;#ns;#os=vl;#as=vl;#rs=vl;#ls;#O;#p=vl;#cs;#ds;#hs;#us=0;#ps;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this.#O=s,this.#Yi=i,this.#ss=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#cs=!1,this.#j=0,this.#Ki=0,this.#is=0,this.#Ji=!0,this.started=!1,this.destroyed=!1,this.#ls=!0,this.#es=0,this.zLayers=100,this.pageHidden=!1,this.#ds=a,this.#ts=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new fl(this),this.canvas=new rl(this.#O,this),this.particles=new gl(this.#O,this),this.#ns=yl(this.#O,this),this.actualOptions=yl(this.#O,this),this.#Qi=new ll(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#ls&&!this.pageHidden&&ml(this)}get options(){return this.#ns}get particleCreatedPlugins(){return this.#os}get particleDestroyedPlugins(){return this.#as}get particlePositionPlugins(){return this.#rs}get plugins(){return this.#p}get sourceOptions(){return this.#ds}addLifeTime(t){this.#is+=t}alive(){return!this.#Ki||this.#is<=this.#Ki}destroy(e=!0){if(ml(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.#p=vl,this.destroyed=!0,this.#ss(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Yi(t,{container:this,data:e})}draw(t){if(!ml(this))return;if(void 0!==this.#Zi){if(!t)return;G(this.#Zi),this.#Zi=void 0}let e=t;this.#Zi=$(t=>{this.#Zi=void 0,e&&(this.#es=void 0,e=!1),this.#gs(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(!ml(this))return;const e=this.#us,i=new Map;for(const t of this.#O.plugins){const s=await t.getPlugin(this);if(e!==this.#us||this.destroyed)return;if(s.preInit&&(await s.preInit(),e!==this.#us))return;i.set(t,s)}if(await this.initDrawersAndUpdaters(),e!==this.#us)return;this.#ns=yl(this.#O,this,this.#ts,this.sourceOptions),this.actualOptions=yl(this.#O,this,this.#ns),this.#Ei(i),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:s,duration:n,fpsLimit:o,smooth:a,zLayers:r}=this.actualOptions,l=this.actualOptions.hdr;this.hdrMode=_(t.HdrMode,l.mode,t.HdrMode.standard),this.peakNits=l.peakNits,this.zLayers=r,this.#Ki=K(n)*p,this.#j=K(s)*p,this.#is=0,this.fpsLimit=o>0?o:120,this.#cs=a;for(const t of this.plugins)if(await(t.init?.()),e!==this.#us)return;if(await this.particles.init(),e===this.#us){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.#O;this.effectDrawers=await Vt(this,t.initializers.effects),this.shapeDrawers=await Vt(this,t.initializers.shapes),this.particleUpdaters=await _t(this,t.initializers.updaters)}pause(){if(ml(this)&&(void 0!==this.#Zi&&(G(this.#Zi),this.#Zi=void 0),!this.#ls)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ls=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!ml(this))return;const i=this.#ls||e;if(!this.#Ji||this.actualOptions.autoPlay){if(this.#ls&&(this.#ls=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Ji=!1}async refresh(){if(ml(this))return this.stop(),this.start()}async reset(t){if(ml(this))return this.#ts=t,this.#ds=t,this.#ns=yl(this.#O,this,this.#ts,this.sourceOptions),this.actualOptions=yl(this.#O,this,this.#ns),this.refresh()}async start(){if(!ml(this)||this.started)return;if(this.#ps)return this.#ps;const e=++this.#us;let i;const s=new Promise(t=>{i=t});return this.#hs=i,this.#ps=(async()=>{try{if(await Promise.race([this.init(),s]),e!==this.#us)return;if(this.started=!0,await Promise.race([new Promise(t=>{this.#$i=t,this.#Gi=setTimeout(()=>{this.#Gi=void 0,this.#$i=void 0,t()},this.#j)}),s]),e!==this.#us||this.destroyed)return;this.#Qi.addListeners();const i=async()=>{for(const t of this.plugins){if(e!==this.#us)return;await(t.start?.())}};if(await Promise.race([i(),s]),e!==this.#us)return;this.dispatchEvent(t.EventType.containerStarted),this.play()}catch(t){throw e!==this.#us||this.destroyed||this.stop(),t}finally{e===this.#us&&(this.#ps=void 0,this.#hs=void 0)}})(),this.#ps}stop(){if(ml(this)&&(this.#us++,this.#hs?.(),this.#hs=void 0,this.#ps=void 0,this.started)){void 0!==this.#Gi&&(clearTimeout(this.#Gi),this.#Gi=void 0,this.#$i?.(),this.#$i=void 0),this.#Ji=!0,this.started=!1,this.#Qi.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.#os=vl,this.#as=vl,this.#rs=vl,this.#ds=this.#ns,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return this.canvas.render.updateBackgroundElement(),t}#Ei(t){const e=[],i=[],s=[],n=[];for(const[o,a]of t)o.needsPlugin(this.actualOptions)&&(e.push(a),a.particleCreated&&i.push(a),a.particleDestroyed&&s.push(a),a.particlePosition&&n.push(a));this.#p=Object.freeze(e),this.#os=Object.freeze(i),this.#as=Object.freeze(s),this.#rs=Object.freeze(n)}#gs(t){try{if(!this.#cs&&void 0!==this.#es&&t<this.#es+p/this.fpsLimit)return void this.draw(!1);if(this.#es??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/p}(this.#Xi,t-this.#es,this.fpsLimit,this.#cs),this.addLifeTime(this.#Xi.value),this.#es=t,this.#Xi.value>p)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Xi),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});class wl{#fs=!0;#ms;#C;#Re;#ys;#vs;constructor(t,e){this.#C=t,this.#ms=[],this.#ys=e,this.#vs=new Map,this.#Re={mouseDown:()=>{this.#bs()},mouseLeave:()=>{this.#ws()},mouseMove:t=>{this.#xs(t)},mouseUp:t=>{this.#Ms(t)},touchStart:t=>{this.#Ps(t)},touchMove:t=>{this.#xs(t)},touchEnd:t=>{this.#ks(t)},touchCancel:t=>{this.#ks(t)},touchEndClick:t=>{this.#Cs(t)},visibilityChange:()=>{this.#Fe()}}}addListeners(){this.#Ve(!0)}init(){this.#ms.length=0;for(const t of this.#C.plugins.filter(t=>!!t.clickPositionValid))this.#ms.push(t)}removeListeners(){this.#Ve(!1)}#Os(t){const e=this.#C,i=this.#ys,s=e.actualOptions;if(this.#fs){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;Dt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#ws()},500)}#Fe(){this.#ws()}#zs(t){const e=this.#Re,i=this.#C,s=this.#ys,n=i.actualOptions,o=s.interactivityData.element;if(!o)return;const a=o,r=i.canvas;r.setPointerEvents(a===r.domElement?"initial":"none"),Ft(o,Ui,e.mouseMove,t),Ft(o,ji,e.touchStart,t),Ft(o,$i,e.touchMove,t);const l=!!n.interactivity?.events.onClick.enable;Ft(o,Wi,e.touchEndClick,t&&l),Ft(o,Wi,e.touchEnd,t&&!l),Ft(o,"pointerup",e.mouseUp,t),Ft(o,"pointerdown",e.mouseDown,t),Ft(o,Ni,e.mouseLeave,t),Ft(o,Gi,e.touchCancel,t)}#Ve(t){const e=this.#Re,i=this.#C,s=this.#ys,n=i.actualOptions,o=n.interactivity?.detectsOn,a=i.canvas.domElement;o===Ei.window?s.interactivityData.element=vt():o===Ei.parent&&a?s.interactivityData.element=a.parentElement??a.parentNode:s.interactivityData.element=a,this.#zs(t),Ft(document,d,e.visibilityChange,t,!1)}#bs(){const{interactivityData:t}=this.#ys,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#Ms(t){const e=this.#C,i=this.#ys,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){let e=!1;for(const t of this.#ms)if(e=t.clickPositionValid?.(o)??!1,e)break;e||this.#Os(t)}n.clicking=!1}#ws(){const{interactivityData:t}=this.#ys,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Ni,e.inside=!1,e.clicking=!1}#xs(t){const e=this.#C,i=this.#ys,s=e.actualOptions,n=i.interactivityData,o=e.canvas.domElement;if(!n.element)return;let a;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#fs=!0;const e=t;if(n.element===vt()){if(o){const t=o.getBoundingClientRect();a={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Ei.parent){const t=e.target,i=e.currentTarget;if(o){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=o.getBoundingClientRect();a={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else a={x:e.offsetX,y:e.offsetY}}else e.target===o&&(a={x:e.offsetX,y:e.offsetY})}else if(this.#fs="touchmove"!==t.type,o){const e=t,i=e.touches[e.touches.length-1],s=o.getBoundingClientRect();if(!i)return;a={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;a&&(a.x*=r,a.y*=r),n.mouse.position=a,n.status=Ui}#ks(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#vs.delete(t.identifier);this.#ws()}#Cs(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#vs.delete(t.identifier);this.#Ms(t)}#Ps(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#vs.set(t.identifier,performance.now());this.#xs(t);const{mouse:s}=this.#ys.interactivityData;s.clicking=!0,s.downPosition=s.position}}class xl{interactivityData;interactors;#Ss;#C;#Qi;#Ds;#Is;#Ts;#O;constructor(t,e){this.#C=e,this.#O=t,this.interactors=[],this.#Ds=[],this.#Ts=[],this.#Ss=new Map,this.#Qi=new wl(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Is=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Es(t)})}addClickHandler(t){const e=this.#C,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const o=e.retina.pixelRatio,a={x:s.x*o,y:s.y*o},r=e.particles.grid.queryCircle(a,n*o);t(i,r)};let o=!1,a=!1;this.#Ss.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Ss.set(ji,()=>{e.destroyed||(o=!0,a=!1)}),this.#Ss.set($i,()=>{e.destroyed||(a=!0)}),this.#Ss.set(Wi,t=>{if(!e.destroyed){if(o&&!a){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const o=e.canvas.domElement,a=o?o.getBoundingClientRect():void 0,r={x:s.clientX-(a?a.left:0),y:s.clientY-(a?a.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}o=!1,a=!1}}),this.#Ss.set(Gi,()=>{e.destroyed||(o=!1,a=!1)});for(const[t,e]of this.#Ss)s.addEventListener(t,e)}addListeners(){this.#Qi.addListeners()}clearClickHandlers(){const t=this.#C,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Ss)e.element?.removeEventListener(t,i);this.#Ss.clear()}}externalInteract(t){for(const e of this.#Ds){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#C.destroyed)return;const e=this.interactivityData;for(const i of this.#Ds)i.handleClickMode?.(t,e)}init(){this.#Qi.init();for(const t of this.interactors){switch(t.type){case Ri.external:this.#Ds.push(t);break;case Ri.particles:this.#Ts.push(t)}t.init()}}async initInteractors(){const t=this.#O;t.initializers.interactors&&(this.interactors=await _t(this.#C,t.initializers.interactors),this.#Ds=[],this.#Ts=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Ds)i.clear(t,e);for(const s of this.#Ts)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#Qi.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Ds)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Ts)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Is&&this.#Is.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Is&&this.#Is.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.#C;e.particles.grid.cellSize=t*e.retina.pixelRatio}#Es(t){const e=this.#C;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var Ml=Object.freeze({__proto__:null,InteractivityPluginInstance:class{#C;constructor(t,e){e.addClickHandler=t=>{e.interactionManager?.addClickHandler(t)},e.interactionManager=new xl(t,e),this.#C=e}addClickHandler(t){this.#C.interactionManager?.addClickHandler(t)}clearClickHandlers(){this.#C.interactionManager?.clearClickHandlers()}destroy(){this.clearClickHandlers()}particleCreated(t){const e=t,i=this.#C,s=new Vi(i);s.load(i.actualOptions.interactivity),s.load(e.options.interactivity),e.interactivity=s}particleReset(t){this.#C.interactionManager?.reset(t)}postParticleUpdate(t,e){this.#C.interactionManager?.particlesInteract(t,e)}postUpdate(t){const e=this.#C;e.interactionManager?.externalInteract(t),e.interactionManager?.updateMaxDistance()}async preInit(){const t=this.#C;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}async redrawInit(){const t=this.#C;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}start(){const t=this.#C;return t.interactionManager?.addListeners(),t.interactionManager?.startObserving(),Promise.resolve()}stop(){this.#C.interactionManager?.removeListeners(),this.#C.interactionManager?.stopObserving()}}});var Pl=Object.freeze({__proto__:null,AbsorbersInstancesManager:class{#Rs;#O;constructor(t){this.#O=t,this.#Rs=new Map}async addAbsorber(t,e,i){return this.addAbsorbers(t,[{options:e,position:i}]).then(t=>t[0])}async addAbsorbers(t,e){const{AbsorberInstance:i}=await Promise.resolve().then(function(){return Fl}),s=[];for(const{options:n,position:o}of e){const e=new i(this.#O,t,n,o);this.getArray(t).push(e),s.push(e)}return s}clear(t){this.initContainer(t),this.#Rs.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Rs.get(t);return e||(e=[],this.#Rs.set(t,e)),e}initContainer(t){this.#Rs.has(t)||(this.#Rs.set(t,[]),t.getAbsorber??=e=>{const i=this.getArray(t);return void 0===e||A(e)?i[e??0]:i.find(t=>t.name===e)},t.addAbsorber??=(e,i)=>this.addAbsorber(t,e,i),t.addAbsorbers??=e=>this.addAbsorbers(t,e))}removeAbsorber(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}splitAbsorber(t,e){if(!e.options.split.enable)return;const{size:i}=e,s=e.options.split.quantity,n=e.position.x,o=e.position.y;if(this.removeAbsorber(t,e),s<=0)return;const a=.9*i/s/t.retina.pixelRatio;for(let e=0;e<s;e++){const e=j()*v;t.particles.addParticle({x:n+Math.cos(e)*i,y:o+Math.sin(e)*i},{size:{value:a}})}}}});var kl=Object.freeze({__proto__:null,AbsorbersPluginInstance:class{#C;#T;constructor(t,e){this.#C=t,this.#T=e,this.#T.initContainer(t)}draw(t){for(const e of this.#T.getArray(this.#C))e.draw(t)}async init(){const t=Dt(this.#C.actualOptions.absorbers,async t=>{await this.#T.addAbsorber(this.#C,t)});B(t)?await Promise.all(t):await t}particleUpdate(t,e){const i=this.#T.getArray(this.#C),s=t;if(!i.length)return;const n=s.getPosition(),o=E.origin,a=i.some(t=>t.orbits);for(const t of i)o.addTo(t.getForce(n));const r=a?this.#Ls(i,n):void 0;for(const n of i)if(n.attract(s,e),t.destroyed)return;s.needsNewPosition?this.#As(s):r?this.#Fs(s,e,r,o):s.velocity.addTo(o)}resize(){for(const t of this.#T.getArray(this.#C))t.resize()}stop(){this.#T.clear(this.#C)}update(t){const e=this.#T.getArray(this.#C);for(const i of e)i.update(t);for(const t of e)if(t.shouldSplit()){this.#T.splitAbsorber(this.#C,t);break}}#Ls(t,e){const i=E.origin;let s=0,n=0;for(const o of t){if(!o.orbits)continue;const t=o.position,a=o.getAttraction(e);s+=a,i.x+=t.x*a,i.y+=t.y*a,n+=o.size*a}return s<=0?{center:i,size:0}:(i.x/=s,i.y/=s,{center:i,size:n/s})}#As(t){t.position.setTo(ct({size:this.#C.canvas.size})),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.absorberOrbitDirection=void 0,t.needsNewPosition=!1}#Fs(e,i,s,n){const o=this.#C,{width:a,height:r}=o.canvas.size;e.absorberOrbitDirection??=e.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise;const l=e.absorberOrbitDirection===t.RotateDirection.clockwise?1:-1;if(void 0===e.absorberOrbit){const t=e.getPosition(),i=t.x-s.center.x,n=t.y-s.center.y;e.absorberOrbit=E.create(i,l*n)}else if(e.absorberOrbit.length<=s.size)return void this.#As(e);const c=e.absorberOrbit.length,d=e.absorberOrbit.angle,h=Math.cos(d),p=l*Math.sin(d);e.velocity.setTo(E.origin);const g=e.options.move.size?e.getRadius()/e.size.max:1,f=e.retina.moveSpeed*g*(i.factor||1)*u,m=s.center.x+c*h,y=s.center.y+c*p;e.position.setTo({x:X(m,0,a),y:X(y,0,r),z:e.position.z});const v=n.x*h+n.y*p,b=n.x*-p+n.y*h;e.absorberOrbit.length=Math.max(0,c+v),e.absorberOrbit.angle+=(f+b*l)*o.retina.reduceFactor*(1/360)}}});const Cl=new Map;var Ol=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Cl.set(t,e)}getShapeGenerator(t){return Cl.get(t)}getSupportedShapeGenerators(){return Cl.keys()}}});var zl=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Rs;#O;constructor(t){this.#Rs=new Map,this.#O=t}async addEmitter(t,e,i){return this.addEmitters(t,[{options:e,position:i}]).then(t=>t[0])}async addEmitters(t,e){const{EmitterInstance:i}=await Promise.resolve().then(function(){return Bl}),s=[];for(const{options:n,position:o}of e){const e=new Ss;e.load(n);const a=new i(this.#O,t,e=>{this.removeEmitter(t,e)},e,o);await a.init(),this.getArray(t).push(a),s.push(a)}return s}clear(t){this.initContainer(t),this.#Rs.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Rs.get(t);return e||(e=[],this.#Rs.set(t,e)),e}initContainer(t){this.#Rs.has(t)||(this.#Rs.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||A(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.addEmitters=async e=>this.addEmitters(t,e),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Sl=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#C;#_s;constructor(t){this.#C=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.#_s&&(t.globalCompositeOperation=this.#_s)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#C.actualOptions.blend;this.#_s=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Dl(t,e,i,s,n,o,a){!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 o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=X(t.velocity.x,-1,1),t.velocity.y=X(t.velocity.y,-1,1));t.lastPathTime-=n}(t,a);const r=t.gravity,l=r?.enable&&r.inverse?-1:1,c=t.velocity.x,d=t.velocity.y,h=a.factor||1,u=t.moveDecay??1,p=u<0?u:u**h,g=n&&i?n/(60*i):0,f=r?.enable&&i?l*r.acceleration/(60*i):0,m=t=>u<=0||1===u?t*h:t*(1-p)/-Math.log(u);u>0&&t.velocity.multTo(p),t.velocity.x+=m(g),t.velocity.y+=m(f),u<=0&&t.velocity.multTo(p);const y=t.velocity.mult(i);let v=!1;r?.enable&&s>0&&(!r.inverse&&y.y>=0&&y.y>=s||r.inverse&&y.y<=0&&y.y<=-s)&&(y.y=l*s,v=!0,i&&(t.velocity.y=y.y/i));const b=u>0&&u<1;if(b){const e=-Math.log(u),s=(1-p)/e,n=(h-s)/e;y.x=(c*s+g*n)*i,y.y=v?t.velocity.y*i*h:(d*s+f*n)*i}const w=t.options.zIndex,x=(1-t.zIndexFactor)**w.velocityRate;y.multTo(x),y.multTo(o),b||y.multTo(h);const{position:M}=t;M.addTo(y),e.vibrate&&(M.x+=Math.sin(M.x*Math.cos(M.y))*o,M.y+=Math.cos(M.y*Math.sin(M.x))*o)}var Il=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#C;#O;constructor(t,e){this.#O=t,this.#C=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-K(i.decay),e.pathDelay=K(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:K(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},o={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},a=st(i.getPosition(),o),r=K(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:o,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:j()*v,radius:a,acceleration:i.retina.spinAcceleration}}(this.#C,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.#C,o=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),a=n.retina.reduceFactor,r=e.retina.moveSpeed,l=e.retina.moveDrift,c=e.size.max,d=r*(s.size?e.getRadius()/c:1)*o*u,h=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,a={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*a.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*a.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*(i.factor||1),a):Dl(e,s,d,h,l,a,i),function(t){const e=t.initialPosition,i=e.x-t.position.x,s=e.y-t.position.y,n=Math.abs(i),o=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,l=a.vertical;if(!r&&!l)return;if((r&&n>=r||l&&o>=l)&&!t.misplaced)t.misplaced=!!r&&n>r||!!l&&o>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||o<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*=-j()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-j())}}(e)}preInit(){return this.#Vs()}redrawInit(){return this.#Vs()}update(){for(const t of this.pathGenerators.values())t.update()}async#Vs(){const t=this.#O;if(t.initializers.pathGenerators){this.availablePathGenerators=await Vt(this.#C,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var Tl=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#C;#o;constructor(t,e){this.#o=t,this.#C=e}destroy(){this.#o.images?.delete(this.#C)}}});var El=Object.freeze({__proto__:null,OverlapPluginInstance:class{#C;constructor(t){this.#C=t}checkParticlePosition(t,e,i){return!this.#Bs(t,e,i)}#Bs(t,e,i){const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const o=n.retries;if(o>=0&&i>o)throw new Error(gt(rr));return!!this.#C.particles.find(i=>{const s=t.getRadius()+i.getRadius();return s>0&&it(e,i.position)<s*s})}}});function Rl(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=j(),e.set(i,n)),n}var Ll=Object.freeze({__proto__:null,LinkInstance:class{#Hs=new Map;#C;#qs;#O;constructor(t,e){this.#O=t,this.#C=e,this.#qs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,o=e.retina.linksWidth??0,a=e.getPosition(),r=e.options.twinkle?.links,l=n.triangles.enable,c=l?new Set(i.map(t=>t.destination.id)):null,d=t.globalAlpha;let h="",p=-1,f=-1,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const d of i){if(n.frequency<1&&this.#Ns(e,d.destination)>n.frequency)continue;const i=d.destination.getPosition();if(l&&!d.isWarped&&c&&(y(),this.#Us(s,e,d,c,a,i,t)),d.opacity<=0||o<=0)continue;if(!n.enable)continue;let v=d.opacity,b=d.color;const w=r?.enable&&j()<r.frequency?ai(this.#O,r.color):void 0;if(r&&w&&(b=w,v=K(r.opacity)),!b){const t=void 0!==n.id?this.#C.particles.linksColors.get(n.id):this.#C.particles.linksColor;b=bi(e,d.destination,t)}if(!b)continue;const x=this.#js(b);if(x===h&&o===p&&v===f||(y(),t.strokeStyle=x,t.lineWidth=o,t.globalAlpha=v,h=x,p=o,f=v,t.beginPath(),m=!0),d.isWarped){const e=this.#C.canvas.size,s=i.x-a.x,n=i.y-a.y;let o=g.x,r=g.y;Math.abs(s)>e.width*u&&(o=s>0?-e.width:e.width),Math.abs(n)>e.height*u&&(r=n>0?-e.height:e.height),t.moveTo(a.x,a.y),t.lineTo(i.x+o,i.y+r),t.moveTo(a.x-o,a.y-r),t.lineTo(i.x,i.y)}else t.moveTo(a.x,a.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=d}init(){return this.#qs.links.clear(),this.#qs.triangles.clear(),this.#Hs.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#C.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#Us(t,e,i,s,n,o,a){const r=i.destination,l=t.links?.triangles;if(!l?.enable||!r.options.links?.triangles.enable)return;const c=r.links;if(c?.length)for(const d of c){if(d.isWarped||this.#Ns(r,d.destination)>r.options.links.frequency||!s.has(d.destination.id))continue;const c=d.destination;if(this.#Ws(e,r,c)>(t.links?.triangles.frequency??0))continue;const h=l.opacity??(i.opacity+d.opacity)*u,p=ai(this.#O,l.color)??i.color;if(!p||h<=0)continue;const g=c.getPosition();a.save(),a.fillStyle=this.#js(p),a.globalAlpha=h,a.beginPath(),a.moveTo(n.x,n.y),a.lineTo(o.x,o.y),a.lineTo(g.x,g.y),a.closePath(),a.fill(),a.restore()}}#js(t){const e=`${t.r},${t.g},${t.b}-${this.#C.hdr}-${this.#C.peakNits}-${this.#C.hdrMode}`;let i=this.#Hs.get(e);return i||(i=mi(t,this.#C.hdr,void 0,this.#C.peakNits,this.#C.hdrMode),this.#Hs.set(e,i)),i}#Ns(t,e){return Rl([t,e],this.#qs.links)}#Ws(t,e,i){return Rl([t,e,i],this.#qs.triangles)}}});const Al=v;var Fl=Object.freeze({__proto__:null,AbsorberInstance:class{color;limit;mass;name;opacity;options;orbits;position;size;#C;#$s;#Gs;#Ki;#Xs;#Ys;#Zs;#Ks;#Qs;#Js;#O;#tn;constructor(t,e,i,s){this.#C=e,this.#O=t,this.#$s=0,this.#Gs=0,this.#Ks=s?E.create(s.x,s.y):void 0,i instanceof ss?this.options=i:(this.options=new ss,this.options.load(i)),this.name=this.options.name,this.opacity=this.options.opacity,this.orbits=this.options.orbits,this.size=K(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor,this.#Qs=this.size,this.#Zs=this.mass;const n=this.options.size.limit;this.limit={radius:n.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:n.mass},this.color=ai(this.#O,this.options.color)??{b:0,g:0,r:0},this.position=this.#Ks?.copy()??this.#Ye(),this.#Xs=!this.options.life.wait,this.#Js=this.options.life.count??-1,this.#Ys=this.#Js<=0,this.#tn=e.retina.reduceFactor?K(this.options.life.delay??0)*p/e.retina.reduceFactor:1/0}attract(t,e){const i=this.#C,s=this.options,n=t.getPosition(),o=t.getRadius(),a=it(this.position,n),r=this.size+o;if(r>0&&a<r*r){const n=.033*o*i.retina.pixelRatio*e.factor,r=this.size-o;r>0&&a<r*r||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?s.destroy?t.destroy():t.needsNewPosition=!0:s.destroy&&(t.size.value-=n),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=n),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=n*this.options.size.density*i.retina.reduceFactor)}}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(g.x,g.y,this.size,0,Al,!1),t.closePath(),t.fillStyle=mi(this.color,this.#C.hdr,this.opacity,this.#C.peakNits,this.#C.hdrMode),t.fill()}getAttraction(t){const e=Math.max(it(this.position,t),this.size*this.size,0);return Math.min(this.mass/e*this.#C.retina.reduceFactor,100)}getForce(t){const e=E.create(this.position.x-t.x,this.position.y-t.y);return e.length=this.getAttraction(t),e}resize(){const t=this.#Ks;this.position=t&&Pt(t,this.#C.canvas.size,E.origin)?t:this.#Ye()}shouldSplit(){if(!this.options.split.enable)return!1;const t=this.size>this.#Qs||this.mass>this.#Zs,e=this.limit.radius>0&&this.size>=this.limit.radius,i=this.limit.mass>0&&this.mass>=this.limit.mass;return t&&(e||i)}update(t){this.#Xs&&(this.#Xs=!1,this.#Gs=this.#tn??0),void 0!==this.#Ki&&(this.#$s+=t.value,this.#$s>=this.#Ki&&(this.#Ys||this.#Js--,(this.#Js>0||this.#Ys)&&(this.position=this.#Ye(),this.#tn=this.#C.retina.reduceFactor?K(this.options.life.delay??0)*p/this.#C.retina.reduceFactor:1/0),this.#$s-=this.#Ki,this.#Ki=void 0)),void 0!==this.#tn&&(this.#Gs+=t.value,this.#Gs>=this.#tn&&(this.#en(),this.#Gs-=this.#tn,this.#tn=void 0))}#Ye(){const t=dt({size:this.#C.canvas.size,position:this.options.position});return E.create(t.x,t.y)}#en(){(this.#Js>0||this.#Ys||!this.options.life.count)&&(this.#Xs||this.#Gs>=(this.#tn??0))&&(this.#Js>0||this.#Ys)&&this.#in()}#in(){const t=void 0!==this.options.life.duration?K(this.options.life.duration):void 0;(this.#Js>0||this.#Ys)&&void 0!==t&&t>0&&(this.#Ki=t*p)}}});function _l(t,e,i,s){(t.paint??=new Ve).fill={color:we.create(void 0,{value:e}),enable:s,opacity:i}}function Vl(t,e,i,s){(t.paint??=new Ve).stroke={color:we.create(void 0,{value:e}),opacity:i,width:s}}var Bl=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#C;#$s;#sn;#Gs;#Ki;#nn;#Xs;#Ys;#Ks;#Js;#ye;#on;#ls;#O;#an=!1;#rn;#Le;#ln;#cn;#tn;#dn;constructor(e,i,s,n,o){this.#O=e,this.#C=i,this.#rn=s,this.#$s=0,this.#sn=0,this.#Gs=0,this.#Ks=o,n instanceof Ss?this.options=n:(this.options=new Ss,this.options.load(n)),this.#tn=i.retina.reduceFactor?K(this.options.life.delay??0)*p/i.retina.reduceFactor:1/0,this.position=this.#Ks??this.#Ye(),this.name=this.options.name,this.fill=this.options.fill,this.#Xs=!this.options.life.wait,this.#dn=!1;const a=Ot({},this.options.particles);a.move??={},a.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=li(this.#O,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=li(this.#O,this.options.spawn.stroke.color));const r=this.options.spawn.fill,l=this.options.spawn.stroke;if(this.spawnFillOpacity=void 0===r?.opacity?1:K(r.opacity),this.spawnStrokeOpacity=void 0===l?.opacity?1:K(l.opacity),this.spawnStrokeWidth=void 0===l?.width?1:K(l.width),this.#ls=!this.options.autoPlay,this.#on=a,this.#cn=this.#hn(),this.size=this.#cn.mode===t.PixelMode.percent?{width:this.#cn.width/h*this.#C.canvas.size.width,height:this.#cn.height/h*this.#C.canvas.size.height}:{width:this.#cn.width,height:this.#cn.height},this.#Js=this.options.life.count??-1,this.#Ys=this.#Js<=0,this.options.domId){const t=vt().getElementById(this.options.domId);t&&(this.#ye=new MutationObserver(()=>{this.resize()}),this.#Le=new ResizeObserver(()=>{this.resize()}),this.#ye.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#Le.observe(t))}const c=this.options.shape,d=this.#O.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#ln=d.generate(this.#C,this.position,this.size,this.fill,c.options)),this.#C.dispatchEvent("emitterCreated",{emitter:this}),this.play()}draw(t){if(!this.options.draw||!this.#ln)return;const e=this.#C,i=this.options.spawn.fill?.enable??!0;t.save(),t.beginPath(),i&&(t.fillStyle=this.spawnFillColor?yi(this.spawnFillColor,e.hdr,this.spawnFillOpacity??1,e.peakNits,e.hdrMode):mi({r:0,g:0,b:0},e.hdr,1,e.peakNits,e.hdrMode)),this.spawnStrokeColor&&(t.strokeStyle=yi(this.spawnStrokeColor,e.hdr,this.spawnStrokeOpacity??1,e.peakNits,e.hdrMode),t.lineWidth=this.spawnStrokeWidth??1),this.#ln.draw?.(t),i&&t.fill(),this.spawnStrokeColor&&t.stroke(),t.restore()}externalPause(){this.#ls=!0,this.pause()}externalPlay(){this.#ls=!1,this.play()}async init(){await(this.#ln?.init())}pause(){this.#ls||(this.#nn=void 0)}play(){if(this.#ls)return;if(!(this.#Js>0||this.#Ys)&&this.options.life.count||!(this.#Xs||this.#Gs>=(this.#tn??0)))return;const t=this.#C;if(void 0===this.#nn){const e=K(this.options.rate.delay);this.#nn=t.retina.reduceFactor?e*p/t.retina.reduceFactor:1/0}(this.#Js>0||this.#Ys)&&this.#in()}resize(){const e=this.#C;if(!this.#an){const t=this.#Ks;this.position=t&&Pt(t,e.canvas.size,E.origin)?t:this.#Ye()}this.#cn=this.#hn(),this.size=this.#cn.mode===t.PixelMode.percent?{width:this.#cn.width/h*e.canvas.size.width,height:this.#cn.height/h*e.canvas.size.height}:{width:this.#cn.width,height:this.#cn.height},this.#ln?.resize(this.position,this.size)}setPosition(t){this.#an=!0,this.position={...t},this.#ln?.resize(this.position,this.size)}update(t){if(this.#ls)return;const e=this.#C;this.#Xs&&(this.#Xs=!1,this.#Gs=this.#tn??0,this.#sn=this.#nn??0),this.#dn||(this.#dn=!0,this.#un(this.options.startCount)),void 0!==this.#Ki&&(this.#$s+=t.value,this.#$s>=this.#Ki&&(this.pause(),void 0!==this.#tn&&(this.#tn=void 0),this.#Ys||this.#Js--,this.#Js>0||this.#Ys?(this.#an||(this.position=this.#Ye(),this.#ln?.resize(this.position,this.size)),this.#tn=e.retina.reduceFactor?K(this.options.life.delay??0)*p/e.retina.reduceFactor:1/0):this.#pn(),this.#$s-=this.#Ki,this.#Ki=void 0)),void 0!==this.#tn&&(this.#Gs+=t.value,this.#Gs>=this.#tn&&(this.#C.dispatchEvent("emitterPlay"),this.play(),this.#Gs-=this.#tn,this.#tn=void 0)),void 0!==this.#nn&&(this.#sn+=t.value,this.#sn>=this.#nn&&(this.#gn(),this.#sn-=this.#nn))}#Ye(){const t=this.#C;if(this.options.domId){const e=vt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*u)*s,y:(i.y+i.height*u)*s}}}return dt({size:t.canvas.size,position:this.options.position})}#hn(){const e=this.#C;if(this.options.domId){const i=vt().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new Os;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#pn(){this.#ye?.disconnect(),this.#ye=void 0,this.#Le?.disconnect(),this.#Le=void 0,this.#rn(this),this.#C.dispatchEvent("emitterDestroyed",{emitter:this})}#gn(){if(this.#ls)return;const t=K(this.options.rate.quantity);this.#un(t)}#un(t){const e=It(this.#on)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:K(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:K(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:K(this.options.spawn.stroke.width),l=this.#C.retina.reduceFactor,c=!!i,d=!!o,h=!!this.#ln,u=c||d,p=u||h,g=u?{h:P,s:k,l:C}:null,f=this.options.shape;for(let c=0;c<t*l;c++){const t=p?Ot({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#fn(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#fn(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#fn(i.l,this.spawnFillColor.l,g.l)),_l(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&g&&(this.spawnStrokeColor.h=this.#fn(o.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#fn(o.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#fn(o.l,this.spawnStrokeColor.l,g.l)),Vl(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#ln){const e=this.#ln.randomPosition();if(e){l=e.position;const i=f.replace;i.color&&e.color&&_l(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#C.particles.addParticle(l,t)}}#in(){if(this.#ls)return;const t=void 0!==this.options.life.duration?K(this.options.life.duration):void 0;(this.#Js>0||this.#Ys)&&void 0!==t&&t>0&&(this.#Ki=t*p)}#fn(t,e,i,s=1){const n=this.#C;if(!t.enable)return e;const o=Z(t.offset),a=K(this.options.rate.delay),r=n.retina.reduceFactor?a*p/n.retina.reduceFactor:1/0;return(e+K(t.speed)*n.fpsLimit/r+o*s)%i}}});t.AnimatableColor=we,t.AnimationOptions=fe,t.AnimationValueWithRandom=Te,t.Background=xe,t.BaseRange=oe,t.Circle=ae,t.ColorAnimation=ye,t.ErrorCodes=pt,t.Fill=Oe,t.FullScreen=Me,t.HDROptions=Pe,t.HslAnimation=ve,t.Move=Fe,t.MoveAngle=ze,t.MoveCenter=Se,t.MoveGravity=De,t.MovePath=Re,t.OptionLoader=pe,t.Options=Xe,t.OptionsColor=be,t.OutModes=Le,t.Paint=Ve,t.ParticlesBounce=He,t.ParticlesBounceFactor=Be,t.ParticlesDensity=qe,t.ParticlesNumber=Ue,t.ParticlesNumberLimit=Ne,t.ParticlesOptions=$e,t.RangedAnimationOptions=me,t.RangedAnimationValueWithRandom=Ee,t.Rectangle=re,t.ResizeEvent=ke,t.Shape=je,t.Spin=Ae,t.Stroke=_e,t.ValueWithRandom=Ie,t.Vector=E,t.Vector3d=T,t.ZIndex=We,t.addErrorMessages=function(t){},t.alterHsl=Oi,t.animate=$,t.areBoundsInside=kt,t.calcExactPositionOrRandomFromSize=ht,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=ct,t.calcPositionOrRandomFromSizeRanged=dt,t.calculateBounds=Ct,t.cancelAnimation=G,t.canvasFirstIndex=0,t.canvasTag=x,t.checkDistance=nt,t.circleBounce=St,t.circleBounceDataFromParticle=zt,t.clamp=X,t.cloneStyle=Et,t.collisionVelocity=lt,t.colorMix=vi,t.colorToRgb=ri,t.countOffset=1,t.decayOffset=1,t.deepExtend=Ot,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=ot,t.deleteCount=1,t.double=2,t.doublePI=v,t.empty=0,t.executeOnSingleOrMultiple=Dt,t.fullPercent=r,t.generatedAttribute=a,t.generatedFalse=w,t.generatedTrue=b,t.getCanvasFromContainer=Ht,t.getDataFromUrl=Bt,t.getDistance=st,t.getDistanceSq=it,t.getDistances=function(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}},t.getDomContainer=qt,t.getErrorMessage=gt,t.getFullScreenStyle=At,t.getHslAnimationFromHsl=Mi,t.getHslFromAnimation=xi,t.getItemMapFromInitializer=Vt,t.getItemsFromInitializer=_t,t.getLinkColor=bi,t.getLinkRandomColor=wi,t.getLogger=n,t.getParticleBaseVelocity=rt,t.getParticleDirectionAngle=at,t.getPosition=Tt,t.getRandom=j,t.getRandomFn=function(){return N},t.getRandomInRange=W,t.getRandomRgbColor=fi,t.getRangeMax=J,t.getRangeMin=Q,t.getRangeValue=K,t.getStyleFromHsl=yi,t.getStyleFromRgb=mi,t.hMax=P,t.hMin=0,t.hPhase=60,t.half=u,t.hslToRgb=ui,t.hslToRgbFloat=pi,t.hslaToRgba=gi,t.hypot=et,t.identity=1,t.inverseFactorNumerator=1,t.isArray=B,t.isBoolean=R,t.isEnumValue=F,t.isFunction=function(t){return"function"==typeof t},t.isInArray=xt,t.isNull=H,t.isNumber=A,t.isObject=V,t.isPointInside=Pt,t.isString=L,t.itemFromArray=Mt,t.itemFromSingleOrMultiple=It,t.lFactor=1,t.lMax=C,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,o=Object.hasOwn(n,s)?n[s]:{};n[s]=Ot(o,i)}},t.loadFull=el,t.loadLazyProperty=he,t.loadMinIndex=0,t.loadNestedProperty=de,t.loadOptionProperty=ue,t.loadOptions=ge,t.loadParticlesOptions=Ge,t.loadProperty=le,t.loadRandomFactor=S,t.loadRangeProperty=ce,t.manageListener=Ft,t.maxNits=D,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=Y,t.none=0,t.one=1,t.originPoint=g,t.parseAlpha=ut,t.percentDenominator=h,t.phaseNumerator=1,t.quarter=O,t.randomColorValue=m,t.randomInRangeValue=Z,t.rangeColorToHsl=li,t.rangeColorToRgb=ai,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=c,t.rgbMax=M,t.rgbToHsl=ci,t.sMax=k,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=vt,t.safeMatchMedia=bt,t.safeMutationObserver=wt,t.setAnimationFunctions=function(t,e){U.nextFrame=t,U.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){N=t},t.setRangeValue=tt,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return oi(t,e)?.a},t.stringToRgb=di,t.threeQuarter=z,t.toEnumValue=_,t.triple=3,t.tryCountIncrement=1,t.tsParticles=zi,t.updateColor=Ci,t.updateColorValue=ki,t.visibilityChangeEvent=d,t.zIndexFactorOffset=1}(t.__tsParticlesInternals.bundles.full=t.__tsParticlesInternals.bundles.full||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadExtendProperty,loadFull:(globalThis.__tsParticlesInternals.bundles.full||{}).loadFull,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.full||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.full||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.full||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.full||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.full||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.full||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.full||{});