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