@tsparticles/preset-firefly 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.firefly=t.__tsParticlesInternals.presets.firefly||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="visibilitychange",n=100,a=.5,o=1e3,r={x:0,y:0,z:0},c=1,l=0,h=0,d=1,u="random",p=2*Math.PI,f="true",g="false",m="canvas",y=255,v=360,w=100,P=100,b=.25,x=400;var M;function k(t){return"z"in t?t.z:r.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(M||(M={}));class z{x;y;z;constructor(t=r.x,e=r.y,i=r.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(r.x,r.y,r.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??r.y,i??r.z):new z(t.x,t.y,k(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),r.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends z{constructor(t=r.x,e=r.y){super(t,e,r.z)}static get origin(){return C.create(r.x,r.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??r.y):new C(t.x,t.y)}}function I(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function O(t){return"number"==typeof t}function L(t){return"object"==typeof t&&null!==t}function D(t){return Array.isArray(t)}function _(t){return null==t}const E=Math.PI/180;let R=Math.random;const T=t=>requestAnimationFrame(t),B=t=>{cancelAnimationFrame(t)};function F(){return A(R(),0,1-Number.EPSILON)}function U(t,e){return F()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function H(t){const e=N(t);let i=$(t);return e===i&&(i=0),U(i,e)}function V(t){return O(t)?t:H(t)}function $(t){return O(t)?t:t.min}function N(t){return O(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&O(t))return t;const i=$(t),s=N(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function q(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function j(t){return t*E}function X(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function Y(t){return t?t.endsWith("%")?parseFloat(t)/n:parseFloat(t):1}var Q,K;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Q||(Q={})),function(t){t.precise="precise",t.percent="percent"}(K||(K={}));function Z(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function J(){return globalThis.document}function tt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function et(t,e){return t===e||D(e)&&e.includes(t)}function it(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function st(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Q.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Q.left||(n=t.right>i.x);!n||s&&s!==Q.right||(n=t.left<e.width+i.y);!n||s&&s!==Q.top||(n=t.bottom>i.y);return n}(nt(t,s??0),e,i,n)}function nt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function at(t,...e){for(const i of e){if(_(i))continue;if(!L(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):L(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return L(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(Z(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(Z(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>at(void 0,t)):at(e[s],n)}}return t}function ot(t,e){return D(t)?t.map((t,i)=>e(t,i)):e(t,0)}function rt(t,e,i){return D(t)?it(t,e,i):t}function ct(t,e){return function(t,e){if(t.mode!==K.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/n*e.width,y:t.y/n*e.height}:{width:t.width/n*e.width,height:t.height/n*e.height}}(t,e)}let lt,ht;function dt(t,e,i,s,n){if(s){let s={passive:!0};I(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ut(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function pt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class ft{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var gt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(gt||(gt={}));class mt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(gt.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return pt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return pt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return ut(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const yt=t=>(...e)=>{t(...e)},vt={debug:yt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:yt(console.info),log:yt(console.log),trace:yt(console.trace),verbose:yt(console.log),warning:yt(console.warn)};function wt(){return vt}const Pt="100%";class bt{pluginManager=new mt(this);#h=[];#d=new ft;#o=!1;get items(){return this.#h}get version(){return"4.4.0"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Cs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=rt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(wt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=rt(r,a),{items:l}=this,h=l.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(h,e,d)}else l.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=J();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===m)s=t,s.dataset[e]??=g,s.dataset[e]===f&&(s.style.width||=Pt,s.style.height||=Pt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(m).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(m),s.dataset[e]=f,t.appendChild(s)),s.style.width||=Pt,s.style.height||=Pt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=J();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=f,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var xt,Mt,kt,zt,Ct,It,St,Ot,Lt,Dt,_t,Et,Rt;!function(t){t.circle="circle",t.rectangle="rectangle"}(xt||(xt={}));class Tt{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 Bt extends Tt{radius;constructor(t,e,i){super(t,e,xt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,G(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Bt||t.type===xt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ft||t.type===xt.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Ft extends Tt{size;constructor(t,e,i,s){super(t,e,xt.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 Bt)return t.intersects(this);if(!(t instanceof Ft))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Mt||(Mt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(kt||(kt={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(zt||(zt={})),function(t){t.delete="delete",t.wait="wait"}(Ct||(Ct={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(It||(It={})),function(t){t.darken="darken",t.enlighten="enlighten"}(St||(St={})),function(t){t.none="none",t.max="max",t.min="min"}(Ot||(Ot={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Lt||(Lt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Dt||(Dt={})),function(t){t.max="max",t.min="min",t.random="random"}(_t||(_t={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Et||(Et={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(Rt||(Rt={}));class Ut{load(t){_(t)||this.doLoad(t)}}function At(t,...e){for(const i of e)t.load(i)}function Ht(t,e,i){void 0!==i&&(t[e]=i)}function Vt(t,e,i){void 0!==i&&(t[e]=W(i))}function $t(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Nt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Wt extends Ut{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Vt(this,"count",t.count),Ht(this,"enable",t.enable),Vt(this,"speed",t.speed),Vt(this,"decay",t.decay),Vt(this,"delay",t.delay),Ht(this,"sync",t.sync)}}class qt extends Wt{mode=kt.auto;startValue=_t.random;doLoad(t){super.doLoad(t),Ht(this,"mode",t.mode),Ht(this,"startValue",t.startValue)}}class Gt extends Wt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Ht(this,"max",t.max),Ht(this,"min",t.min),Vt(this,"offset",t.offset)}}class jt extends Ut{h=new Gt(0,v);l=new Gt(0,P);s=new Gt(0,w);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Xt extends Ut{value="";static create(t,e){const i=new Xt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class Yt extends Xt{animation=new jt;static create(t,e){const i=new Yt;return i.load(t),void 0!==e&&(S(e)||D(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 Qt extends Ut{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Xt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Xt.create(this.color,t.color)),Ht(this,"element",t.element),Ht(this,"draw",t.draw),Ht(this,"image",t.image),Ht(this,"position",t.position),Ht(this,"repeat",t.repeat),Ht(this,"size",t.size),Ht(this,"opacity",t.opacity)}}class Kt extends Ut{enable=!0;zIndex=0;doLoad(t){Ht(this,"enable",t.enable),Ht(this,"zIndex",t.zIndex)}}class Zt extends Ut{enable=!0;mode=zt.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!I(t.enable))throw new Error(`Invalid HDR "enable" value: expected a boolean, got "${String(t.enable)}"`);if(void 0!==t.mode&&("string"!=typeof t.mode||!Object.values(zt).includes(t.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(zt).join(", ")}, got "${e=t.mode,String(e)}"`);var e;if(void 0!==t.peakNits&&(!O(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(t.peakNits)}"`);Ht(this,"enable",t.enable),Ht(this,"mode",t.mode),Ht(this,"peakNits",t.peakNits)}}class Jt extends Ut{delay=.5;enable=!0;doLoad(t){Ht(this,"delay",t.delay),Ht(this,"enable",t.enable)}}class te extends Ut{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]=at(this.options[t]??{},i))}Ht(this,"close",t.close),Ht(this,"type",t.type)}}class ee extends Ut{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Yt.create(this.color,t.color)),Ht(this,"enable",t.enable),Vt(this,"opacity",t.opacity)}}class ie extends Ut{offset=0;value=90;doLoad(t){Vt(this,"offset",t.offset),Vt(this,"value",t.value)}}class se extends Ut{mode=K.percent;radius=0;x=50;y=50;doLoad(t){Ht(this,"x",t.x),Ht(this,"y",t.y),Ht(this,"mode",t.mode),Ht(this,"radius",t.radius)}}class ne extends Ut{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Vt(this,"acceleration",t.acceleration),Ht(this,"enable",t.enable),Ht(this,"inverse",t.inverse),Vt(this,"maxSpeed",t.maxSpeed)}}class ae extends Ut{value=0;doLoad(t){_(t.value)||(this.value=W(t.value))}}class oe extends ae{animation=new Wt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class re extends oe{animation=new qt}class ce extends Ut{clamp=!0;delay=new ae;enable=!1;generator;options={};doLoad(t){Ht(this,"clamp",t.clamp),this.delay.load(t.delay),Ht(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=at(this.options,t.options))}}class le extends Ut{bottom;default=It.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 he extends Ut{acceleration=0;enable=!1;position;doLoad(t){Vt(this,"acceleration",t.acceleration),Ht(this,"enable",t.enable),t.position&&(this.position=at({},t.position))}}class de extends Ut{angle=new ie;center=new se;decay=0;direction=M.none;distance={};drift=0;enable=!1;gravity=new ne;outModes=new le;path=new ce;random=!1;size=!1;speed=2;spin=new he;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Vt(this,"decay",t.decay),Ht(this,"direction",t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Vt(this,"drift",t.drift),Ht(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(L(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Ht(this,"random",t.random),Ht(this,"size",t.size),Vt(this,"speed",t.speed),this.spin.load(t.spin),Ht(this,"straight",t.straight),Ht(this,"vibrate",t.vibrate),Ht(this,"warp",t.warp)}}class ue extends Ut{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Yt.create(this.color,t.color)),Vt(this,"width",t.width),Vt(this,"opacity",t.opacity)}}class pe extends Ut{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Yt.create(this.color,t.color)),$t(this,"fill",t.fill,()=>new ee),$t(this,"stroke",t.stroke,()=>new ue)}}class fe extends ae{value=1}class ge extends Ut{horizontal=new fe;vertical=new fe;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class me extends Ut{enable=!1;height=1080;width=1920;doLoad(t){Ht(this,"enable",t.enable),Ht(this,"width",t.width),Ht(this,"height",t.height)}}class ye extends Ut{mode=Ct.delete;value=0;doLoad(t){Ht(this,"mode",t.mode),Ht(this,"value",t.value)}}class ve extends Ut{density=new me;limit=new ye;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Ht(this,"value",t.value)}}class we extends Ut{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]=at(this.options[t]??{},i))}Ht(this,"close",t.close),Ht(this,"type",t.type)}}class Pe extends ae{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Ht(this,"opacityRate",t.opacityRate),Ht(this,"sizeRate",t.sizeRate),Ht(this,"velocityRate",t.velocityRate)}}class be extends Ut{bounce=new ge;effect=new te;groups={};move=new de;number=new ve;paint;palette;reduceDuplicates=!1;shape=new we;zIndex=new Pe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new pe,this.paint.color=new Yt,this.paint.color.value="#fff",this.paint.fill=new ee,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=at(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&&(D(e)?this.paint=ot(e,t=>{const e=new pe;return e.load(t),e}):D(this.paint)?(this.paint=new pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(D(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 xe(t,e,...i){const s=new be(t,e);return At(s,...i),s}class Me extends Ut{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new Qt,this.fullScreen=new Kt,this.hdr=new Zt,this.particles=xe(this.#p,this.#u),this.resize=new Jt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,ot(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Ht(this,"autoPlay",t.autoPlay),Ht(this,"clear",t.clear),Ht(this,"key",t.key),Ht(this,"name",t.name),Vt(this,"delay",t.delay),Ht(this,"detectRetina",t.detectRetina),Vt(this,"duration",t.duration),Ht(this,"fpsLimit",t.fpsLimit);const e=t.hdr;I(e)?(this.hdr.enable=e,this.hdr.mode=zt.standard,this.hdr.peakNits=400):this.hdr.load(e),Ht(this,"pauseOnBlur",t.pauseOnBlur),Ht(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Ht(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;I(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=at(this.style,t.style),Ht(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const ke=new Map,ze=1.15,Ce=1.05,Ie=.2126,Se=.7152,Oe=.0722;function Le(t,e){let i=ke.get(t);return i||(i=e(),ke.size>2e3&&ke.clear(),ke.set(t,i)),i}function De(t){return A(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function _e(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Ee(t,n.value,i,s);if(D(n.value)){const e=it(n.value,i,s);if(!e)return;return _e(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ee(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===u?function(){const t=0,e=256,i=()=>Math.floor(U(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(D(n.value)){const e=it(n.value,i,s);if(!e)return;return Ee(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Re(t,e,i,s=!0){const n=_e(t,e,i,s);return n?function(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o));r.l*=P,r.s*=w,r.h*=60,r.h<0&&(r.h+=v);r.h>=v&&(r.h-=v);return r}(n):void 0}function Te(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 Be(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(w,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/v,o=i/w,r=s/P;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const c=r<a?r*(1+o):r+o-r*o,l=2*r-c,h=1/3,d=Math.min(y,y*Te(l,c,n+h)),u=Math.min(y,y*Te(l,c,n)),p=Math.min(y,y*Te(l,c,n-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Fe(t,e,i,s,n){const a=e?4:2,o=i??1;return Le(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${o.toString()}-${(s??400).toString()}-${n??zt.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${o.toString()}`,()=>e?function(t,e,i=400,s=zt.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/y,a=t.g/y,o=t.b/y;if(s!==zt.natural&&s!==zt.vivid&&s!==zt.cinematic&&s!==zt.dynamic)return{b:o,g:a,r:n};const r=Math.max(1,e),c=Ie*n+Se*a+Oe*o,l=function(t,e,i){if(t<=i)return De(t);const s=t+(t-i)*(e-1);return De(s)}(c,e,i),h=c>0?l/c:1;return function(t,e,i,s,n){switch(s){case zt.vivid:{const s=(t+e+i)/3;return{b:A(A(s+(i-s)*ze,0,n)*Ce,0,n),g:A(A(s+(e-s)*ze,0,n)*Ce,0,n),r:A(A(s+(t-s)*ze,0,n)*Ce,0,n)}}case zt.cinematic:{const s=1.05*t,a=.95*i,o=(s+e+a)/3;return{b:A(o+1.1*(a-o),0,n),g:A(o+1.1*(e-o),0,n),r:A(o+1.1*(s-o),0,n)}}case zt.dynamic:{const s=Ie*t+Se*e+Oe*i,a=Math.min(1,2*s),o=1-a,r=(t+e+i)/3,c=A(r+(t-r)*ze,0,n)*Ce,l=A(r+(e-r)*ze,0,n)*Ce,h=A(r+(i-r)*ze,0,n)*Ce;return{b:A(i*o+h*a,0,n),g:A(e*o+l*a,0,n),r:A(t*o+c*a,0,n)}}case zt.standard:case zt.natural:default:return{b:i,g:e,r:t}}}(A(n*h,0,r),A(a*h,0,r),A(o*h,0,r),s,r)}(t,n,.18,s);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(e??1).toString()})`}(t,i,s,n):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ue(t,e,i,s,n){const o=e?4:2,r=i??1;return Le(e?`hsl-${t.h.toFixed(o)}-${t.s.toFixed(o)}-${t.l.toFixed(o)}-hdr-${r.toString()}-${(s??x).toString()}-${n??zt.standard}`:`hsl-${t.h.toFixed(o)}-${t.s.toFixed(o)}-${t.l.toFixed(o)}-sdr-${r.toString()}`,()=>e?Fe(function(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(w,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/v,o=i/w,r=s/P;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const c=r<a?r*(1+o):r+o-r*o,l=2*r-c,h=1/3;return{r:Math.min(y,y*Te(l,c,n+h)),g:Math.min(y,y*Te(l,c,n)),b:Math.min(y,y*Te(l,c,n-h))}}(t),!0,i,s,n):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${r.toString()})`)}function Ae(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function He(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:v},s:{enable:!1,value:t.s,min:0,max:w},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Ve(s.h,e.h,i),Ve(s.s,e.s,i),Ve(s.l,e.l,i)),s}function Ve(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=V(e.speed)/n*i,t.decay=1-V(e.decay),t.status=Et.increasing,t.loops=0,t.maxLoops=V(e.count),t.time=0,t.delayTime=V(e.delay)*o,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=W(e.offset)):t.velocity=0}function $e(t,e,i,s){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?H(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,o=t.decay??1,r=t.max,c=t.min;e&&t.status!==Et.increasing?(t.value-=a,t.value<c&&(t.loops??=0,t.loops++,t.status=Et.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=Et.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=A(t.value,c,r)}function Ne(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;$e(s,!1,e),$e(n,!0,e),$e(a,!0,e)}const We=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new bt}();class qe{enable=!1;mode="destination-out";load(t){_(t)||(Ht(this,"mode",t.mode),Ht(this,"enable",t.enable))}}class Ge{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Is});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 qe),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new qe,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function je(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ge)})}class Xe{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:p};const n=i.circleRange;e.arc(r.x,r.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=L(s)?{min:j(s.min),max:j(s.max)}:{min:0,max:j(s)}}}async function Ye(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Xe))})}var Qe;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Qe||(Qe={}));const Ke=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ze=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Je{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ke,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ze.exec(e);return i?{a:i[Qe.a]?Number.parseInt(i[Qe.a],16)/255:1,b:Number.parseInt(i[Qe.b]??"0",16),g:Number.parseInt(i[Qe.g]??"0",16),r:Number.parseInt(i[Qe.r]??"0",16)}:void 0}}async function ti(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Je)})}var ei;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(ei||(ei={}));const ii=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class si{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 Be(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Be({h:V(e.h),l:V(e.l),s:V(e.s)})}parseString(t){if(!this.accepts(t))return;const e=ii.exec(t);return e?function(t){const e=Be(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?Y(e[ei.a]):1,h:Number.parseInt(e[ei.h]??"0",10),l:Number.parseInt(e[ei.l]??"0",10),s:Number.parseInt(e[ei.s]??"0",10)}):void 0}}async function ni(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new si)})}class ai{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ls});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function oi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,pt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new ai(t.pluginManager))})}function ri(t,e){const i=t.value,s=t.animation,n={delayTime:V(s.delay)*o,enable:s.enable,value:V(t.value)*e,max:N(i)*e,min:$(i)*e,loops:0,maxLoops:V(s.count),time:0};if(s.enable){switch(n.decay=1-V(s.decay),s.mode){case kt.increase:n.status=Et.increasing;break;case kt.decrease:n.status=Et.decreasing;break;case kt.random:n.status=F()>=a?Et.increasing:Et.decreasing}const t=s.mode===kt.auto;switch(s.startValue){case _t.min:n.value=n.min,t&&(n.status=Et.increasing);break;case _t.max:n.value=n.max,t&&(n.status=Et.decreasing);break;case _t.random:default:n.value=H(n),t&&(n.status=F()>=a?Et.increasing:Et.decreasing)}}return n.initialValue=n.value,n}function ci(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,c=e.decay??1;e.time??=0;const l=e.delayTime??0;if(!(l>0&&e.time<l&&(e.time+=n.value,e.time<l))){switch(e.status){case Et.increasing:e.value+=a;break;case Et.decreasing:e.value-=a}switch(e.velocity&&1!==c&&(e.velocity*=c),e.status){case Et.increasing:e.value>=r&&(e.status=Et.decreasing,e.loops??=0,e.loops++);break;case Et.decreasing:e.value<=o&&(e.status=Et.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Ot.max:i>=n&&t.destroy();break;case Ot.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class li extends qt{destroy=Ot.none;load(t){super.load(t),_(t)||Ht(this,"destroy",t.destroy)}}class hi extends re{animation=new li;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class di{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=ri(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=V(i.speed)/n*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){Nt(t,"opacity",hi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&ci(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function ui(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new di(t)))})}class pi{modes;#u;#y;constructor(t){this.#u=t,this.modes=[It.bounce,It.split],this.#y=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#y)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,c=t.getRadius(),l=nt(o,c),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==It.bounce&&t.outMode!==It.split||t.direction!==Q.left&&t.direction!==Q.right)return;t.bounds.right<0&&t.direction===Q.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Q.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===Q.right&&e>0||t.direction===Q.left&&e<0)){const e=V(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===Q.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Q.left&&(t.particle.position.x=s),t.outMode===It.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,outOfCanvas:d,size:c}),function(t){if(t.outMode!==It.bounce&&t.outMode!==It.split||t.direction!==Q.bottom&&t.direction!==Q.top)return;t.bounds.bottom<0&&t.direction===Q.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Q.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===Q.bottom&&e>0||t.direction===Q.top&&e<0)){const e=V(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===Q.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Q.top&&(t.particle.position.y=s),t.outMode===It.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,outOfCanvas:d,size:c})}}class fi{modes;constructor(t){this.modes=[It.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case Dt.normal:case Dt.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case Dt.inside:{const{dx:e,dy:i}=q(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class gi{modes;#u;constructor(t){this.#u=t,this.modes=[It.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Q.left||e===Q.right))??(t.options.move.distance.vertical&&(e===Q.top||e===Q.bottom)))return;const n=t.options.move.gravity,a=this.#u,o=a.canvas.size,c=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>o.height+c&&e===Q.bottom||n.inverse&&i.y<-c&&e===Q.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=o.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=o.width+c||t.velocity.x<0&&t.position.x>=-c)return;st(t.position,a.canvas.size,r,c,e)||t.destroy()}}}const mi=C.origin;class yi{modes;#u;constructor(t){this.#u=t,this.modes=[It.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case Dt.inside:{const{x:e,y:i}=t.velocity;mi.setTo(r),mi.length=t.moveCenter.radius,mi.angle=t.velocity.angle+Math.PI,mi.addTo(t.moveCenter);const{dx:s,dy:a}=q(t.position,mi);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(H({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(H({min:0,max:n.canvas.size.height}));const{dx:o,dy:c}=q(t.position,t.moveCenter);t.direction=Math.atan2(-c,-o),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case Dt.outside:{t.position.x=Math.floor(H({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(H({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=q(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Dt.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=nt(t.position,o);e===Q.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Q.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Q.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Q.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class vi{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,It.bounce,t=>new pi(t)),this.#v(t,It.out,t=>new yi(t)),this.#v(t,It.destroy,t=>new fi(t)),this.#v(t,It.none,t=>new gi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,Q.bottom),this.#w(t,e,i.left??i.default,Q.left),this.#w(t,e,i.right??i.default,Q.right),this.#w(t,e,i.top??i.default,Q.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function wi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new vi(t)))})}class Pi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=rt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Yt.create(void 0===a?void 0:Yt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=V(o.opacity),t.fillAnimation=i.animation;const s=Re(this.#p,i);s&&(t.fillColor=He(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=Yt.create(void 0===a?void 0:Yt.create(void 0,a),r.color);t.strokeWidth=V(r.width)*e.retina.pixelRatio,t.strokeOpacity=V(r.opacity??1),t.strokeAnimation=i.animation;const s=Re(this.#p,i)??t.getFillColor();s&&(t.strokeColor=He(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Ne(t.fillColor,e,this.#u.hdr),Ne(t.strokeColor,e,this.#u.hdr))}}async function bi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Pi(t.pluginManager,e)))})}var xi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(xi||(xi={}));const Mi=/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 ki{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:V(e.r),g:V(e.g),b:V(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Mi.exec(t);return e?{a:e.length>4?Y(e[xi.a]):1,b:parseInt(e[xi.b]??"0",10),g:parseInt(e[xi.g]??"0",10),r:parseInt(e[xi.r]??"0",10)}:void 0}}async function zi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ki)})}class Ci extends qt{destroy=Ot.none;load(t){super.load(t),_(t)||Ht(this,"destroy",t.destroy)}}class Ii extends re{animation=new Ci;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Si{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/n*e.retina.reduceFactor,s.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Nt(t,"size",Ii,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=ri(i,e),t.retina.sizeAnimationSpeed=V(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&ci(t,t.size,0,t.options.size.animation.destroy,e)}}async function Oi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Si(t)))})}async function Li(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([je(t),ti(t),ni(t),zi(t),oi(t),Ye(t),bi(t),ui(t),wi(t),Oi(t)])})}class Di{enable=!1;mode=[];load(t){_(t)||(Ht(this,"enable",t.enable),Ht(this,"mode",t.mode))}}var _i,Ei,Ri;!function(t){t.circle="circle",t.rectangle="rectangle"}(_i||(_i={}));class Ti{enable=!1;mode=[];selectors=[];type=_i.circle;load(t){_(t)||(Ht(this,"selectors",t.selectors),Ht(this,"enable",t.enable),Ht(this,"mode",t.mode),Ht(this,"type",t.type))}}class Bi{enable=!1;mode=[];load(t){_(t)||(Ht(this,"enable",t.enable),Ht(this,"mode",t.mode))}}class Fi{onClick=new Di;onDiv=new Ti;onHover=new Bi;load(t){if(_(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=ot(e,t=>{const e=new Ti;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Ei||(Ei={}));class Ui{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(_(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class Ai{detectsOn=Ei.window;events=new Fi;modes;constructor(t,e){this.modes=new Ui(t,e)}load(t){if(_(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Hi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Es});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Ai(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=at({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(Ri||(Ri={}));class Vi{type=Ri.external;container;constructor(t){this.container=t}}const $i="pointerdown",Ni="pointerup",Wi="pointerleave",qi="pointermove",Gi="touchstart",ji="touchend",Xi="touchmove",Yi="touchcancel";class Qi{x=0;y=0;load(t){t&&(Ht(this,"x",t.x),Ht(this,"y",t.y))}}class Ki{value;weights=new Qi;load(t){t&&(t.weights&&(this.weights??=new Qi,this.weights.load(t.weights)),_(t.value)||(this.value=W(t.value)))}}class Zi{h=new Ki;l=new Ki;s=new Ki;load(t){t&&(t.h&&(this.h??=new Ki,this.h.load(t.h)),t.s&&(this.s??=new Ki,this.s.load(t.s)),t.l&&(this.l??=new Ki,this.l.load(t.l)))}}class Ji{colorCoords=new Zi;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){_(t)||(Ht(this,"delay",t.delay),Ht(this,"quantity",t.quantity),Ht(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=at({},t.particles)),t.colorCoords&&(this.colorCoords??=new Zi,this.colorCoords.load(t.colorCoords)))}}const ts="trail";class es extends Vi{maxDistance=0;#P;#b;#p;constructor(t,e){super(e),this.#p=t,this.#P=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 a=n.delay*o/this.container.retina.reduceFactor;if(this.#P<a&&(this.#P+=e.value),this.#P<a)return;const r=t.mouse.position,c=!(n.pauseOnStop&&(r===this.#b||r?.x===this.#b?.x&&r?.y===this.#b?.y));if(this.#b=r?{...r}:void 0,c&&r){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:a}=i.canvas.size,o={x:r.x/s,y:r.y/a},c=t=>!!(t?.weights?.x??t?.weights?.y),l=(t,e,i)=>{if(!c(t))return;const s=t?.weights,n=o.x*(s?.x??0)+o.y*(s?.y??0),a=t?.value??e,r=$(a??0),l=N(a??i),h=r+n*(l-r);return Math.min(l,Math.max(r,h))},h=n.particles?.paint?rt(n.particles.paint):void 0,d=h?.fill,u=d?Re(this.#p,Yt.create(void 0,d.color)):void 0,p=l(e.h,u?.h,v),f=l(e.s,u?.s,w),g=l(e.l,u?.l,P);void 0===p&&void 0===f&&void 0===g||(t=at({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:f??u?.s,l:g??u?.l}}}}}))}i.particles.push(n.quantity,r,t)}this.#P-=a}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&&et(ts,n.onClick.mode)||s.inside&&!!s.position&&et(ts,n.onHover.mode))}loadModeOptions(t,...e){Nt(t,"trail",Ji,...e)}reset(){}}async function is(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new es(t.pluginManager,e)))})}class ss extends ae{sync=!1;load(t){_(t)||(super.load(t),Ht(this,"sync",t.sync))}}class ns extends ae{sync=!1;load(t){_(t)||(super.load(t),Ht(this,"sync",t.sync))}}class as{count=0;delay=new ss;duration=new ns;load(t){_(t)||(Ht(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class os{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?V(i.delay.value)*s/e.retina.reduceFactor*o:0,delayTime:0,duration:e.retina.reduceFactor?V(i.duration.value)*n/e.retina.reduceFactor*o: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){Nt(t,"life",as,...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 a=W(0,i.width),r=W(0,i.width);t.position.x=H(a),t.position.y=H(r),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const c=t.options.life;c&&(s.delay=V(c.delay.value)*o,s.duration=V(c.duration.value)*o)}(t,e,this.#u.canvas.size)}}async function rs(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new os(t)))})}const cs={fullScreen:{enable:!0,zIndex:-1},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:"#fff"},enable:!0}},life:{duration:{value:5,sync:!1},count:1},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:3}},size:{value:{min:3,max:6}},move:{enable:!0,speed:3,size:!0}},interactivity:{events:{onHover:{enable:!0,mode:"trail"}},modes:{trail:{delay:.5,pauseOnStop:!0,quantity:4}}},background:{color:"#000"}};async function ls(t){await t.pluginManager.register(async t=>{await Promise.all([Li(t),rs(t),(async()=>{await async function(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Hi(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,ut(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await is(t)})()]),t.pluginManager.addPreset("firefly",cs)})}const hs=globalThis;hs.loadFireflyPreset=ls,hs.tsParticles=We;function ds(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class us{#x;#M;#k;#z;#C;#u;#I;#S;#O;#L;#D;#_;#p;#E;#R;#T={};#B=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#I=null,this.#x=null,this.#M=new Set,this.#R=[],this.#E=[],this.#k=[],this.#C=[],this.#O=[],this.#L=[],this.#D=[],this.#_={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(r.x,r.y,this.#z.size.width,this.#z.size.height)})}clear(){for(const t of this.#k)if(t.canvasClear?.())return;for(const t of Object.values(Rt))if("number"==typeof t)for(const e of this.#U(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#x=null,this.#M.clear(),this.#R=[],this.#E=[],this.#k=[],this.#C=[],this.#O=[],this.#L=[],this.#D=[];for(const t of Object.values(Rt))"number"==typeof t&&(this.#_[t]=[])}draw(t){const e=this.#I;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#A(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#F,f=this.#T,g=a?Ue(a,r.hdr,h*d,r.peakNits,r.hdrMode):void 0,m=o?Ue(o,r.hdr,u*d,r.peakNits,r.hdrMode):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#D)i.drawParticleSetup?.(s,t,e);this.#H(s,t,i,d,f,p),this.#V({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*l**c.sizeRate,opacity:d,transform:p}),this.#$(t);for(const i of this.#L)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#N(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#z.size.width,a=this.#z.size.height;if(this.#x)try{s.drawImage(this.#x,r.x,r.y,n,a)}catch{this.#W("background-element-draw-error","Error drawing background element onto canvas")}const o=i.background;if(o.draw)try{o.draw(s,t)}catch{this.#W("background-draw-error","Error in background.draw callback")}for(const t of this.#U(Rt.BackgroundMask))t.canvasPaint?.();for(const e of this.#U(Rt.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#U(Rt.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#U(Rt.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#q(),this.paint()}initPlugins(){this.#k=[],this.#C=[],this.#O=[],this.#D=[],this.#L=[];for(const t of Object.values(Rt))"number"==typeof t&&(this.#_[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#D.push(t),t.drawParticleCleanup&&this.#L.push(t),t.canvasClear&&this.#k.push(t),t.canvasPaint&&this.#U(Rt.BackgroundMask).push(t),t.drawSettingsSetup&&this.#U(Rt.CanvasSetup).push(t),t.draw&&this.#U(Rt.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#U(Rt.CanvasCleanup).push(t)}initUpdaters(){this.#R=[],this.#E=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#E.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#R.push(t)}paint(){let t=!1;for(const e of this.#U(Rt.BackgroundMask))if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(r.x,r.y,this.#z.size.width,this.#z.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,r.x,r.y,this.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#I=t,this.#I&&(this.#I.globalCompositeOperation=i)}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(r.x,r.y,this.#z.size.width,this.#z.size.height)})}#$(t){for(const e of this.#E)e.afterDraw?.(t)}#H(t,e,i,s,n,a){for(const o of this.#R){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)ds(a,t,e)}o.beforeDraw?.(e)}}#G(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#j(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#V(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(c),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?l.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#j(y,m),this.#X(v,m),this.#Y(v,m),this.#Q(v,m),this.#G(y,m),i.resetTransform()}#N(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#Y(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#Q(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#X(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){return this.#_[t]}#A(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=Re(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Re(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#B[0]=e,this.#B[1]=i,this.#B}#q(){const t=this.#u.actualOptions.background;if(this.#x=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.#x=e:e?this.#W("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#W("background-element-not-found",`Background element selector "${t.element}" not found`)}}else("undefined"!=typeof HTMLCanvasElement&&t.element instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t.element instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t.element instanceof HTMLImageElement)&&(this.#x=t.element)}#W(t,e){this.#M.has(t)||(this.#M.add(t),wt().warning(e))}}const ps=new WeakMap;function fs(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class gs{domElement;render;renderCanvas;size;zoom=1;#u;#K;#Z;#J;#tt;#p;#et;#it;#st;#nt;constructor(t,e){this.#p=t,this.#u=e,this.render=new us(t,e,this),this.#st={height:0,width:0};const i=e.retina.pixelRatio,s=this.#st;this.size={height:s.height*i,width:s.width*i},this.#K=!1,this.#it=[],this.#et="none"}get#at(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#K){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ot();this.render.destroy(),this.#it=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#nt?this.#nt:{x:e*a/t,y:i*a/t}}init(){this.#rt(t=>{t.disconnect()}),this.#J=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ct()}),this.resize(),this.#lt(),this.#rt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ht(),this.initBackground(),this.#dt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=_e(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=Fe(n,t.hdr,e.opacity,i.peakNits,i.mode)}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#it=[];for(const t of this.#u.plugins)t.resize&&this.#it.push(t)}loadCanvas(t){this.#K&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#K=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=ps.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return ps.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#tt=function(t){const e=J().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#st,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#st,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#et=t,this.#ct())}setZoom(t,e){this.zoom=t,this.#nt=e}stop(){this.#rt(t=>{t.disconnect()}),this.#J=void 0,this.#ut(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#pt(),e&&await t.refresh()}#pt(){for(const t of this.#it)t.resize?.()}#ht(){const t=this.#u,e=t.actualOptions.hdr.enable&&tt("(color-gamut: p3)")?.matches&&tt("(dynamic-range: high)")?.matches;t.hdr=e??!1,t.hdrMode=t.actualOptions.hdr.mode,t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return;let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){t.hdr=!1;const e={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(e);try{s=i.getContext("2d",e)}catch{s=null}}this.render.setContext(s)}#dt(){this.#ut();const t=tt("(color-gamut: p3)"),e=tt("(dynamic-range: high)"),i=()=>{this.#ft(),this.#ht(),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.#Z=s}#lt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#at?this.#gt():this.#ot();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")}}}#ft(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#ut(){if(this.#Z){for(const{handler:t,mql:e}of this.#Z)e.removeEventListener("change",t);this.#Z=void 0}}#ct(){const t=this.domElement;if(!t)return;this.#rt(t=>{t.disconnect()}),this.#lt(),this.initBackground();const e=this.#et;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#rt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ot(){const t=this.domElement,e=this.#tt;t&&e&&fs(t,e,!0)}#rt(t){this.#J&&t(this.#J)}#gt(){const t=this.domElement;t&&fs(t,function(t){if(lt!==t||!ht){lt=t;const e=J().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)}ht=e}return ht}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class ms{#u;#mt;#yt;#vt;constructor(t){this.#u=t,this.#mt={visibilityChange:()=>{this.#wt()},resize:()=>{this.#Pt()}}}addListeners(){this.#bt(!0)}removeListeners(){this.#bt(!1)}#wt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(J().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Pt(){this.#vt&&(clearTimeout(this.#vt),this.#vt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#vt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*o)}#bt(t){const e=this.#mt;this.#xt(t),dt(document,s,e.visibilityChange,t,!1)}#xt(t){const e=this.#mt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void dt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#yt&&!t?(s&&this.#yt.unobserve(s),this.#yt.disconnect(),this.#yt=void 0):!this.#yt&&t&&s&&(this.#yt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#Pt()}),this.#yt.observe(s))}}function ys(t){if(!et(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 vs(t,e){const i=t%e;return i<0?i+e:i}function ws(t,e,i,s){const n=xe(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=rt(n.effect.type,t.id,a),t.shape=rt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=rt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=rt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===u){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(F()*i.length)]}if(t.shape===u){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return at({close:e.close},rt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return at({close:e.close},rt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const c=t.effectData,l=t.shapeData;return c&&n.load(c.particles),l&&n.load(l.particles),t.effectClose=c?.close??n.effect.close,t.shapeClose=l?.close??n.shape.close,n}class Ps{backColor;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#Mt={fillOpacity:1,opacity:1,strokeOpacity:1};#kt=z.origin;#zt={sin:0,cos:0};#Ct={a:1,b:0,c:0,d:1};#u;#It=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#It.push(t),this.#It.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#It.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(gt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#St(this.#Ot(Ae(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getModifier(t){return this.#It.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=V(this.opacity?.value??1),s=this.#Ot(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#Mt.fillOpacity=n,this.#Mt.opacity=s*e,this.#Mt.strokeOpacity=a,this.#Mt}getPosition(){return this.#kt.x=this.position.x+this.offset.x,this.#kt.y=this.position.y+this.offset.y,this.#kt.z=this.position.z,this.#kt}getRadius(){return this.#Ot(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#zt.sin=Math.sin(t),this.#zt.cos=Math.cos(t),this.#zt}getStrokeColor(){return this.#St(this.#Ot(Ae(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Ct.a=e.cos*(t.a??c),this.#Ct.b=i?e.sin*(t.b??1):t.b??l,this.#Ct.c=i?-e.sin*(t.c??1):t.c??h,this.#Ct.d=e.cos*(t.d??d),this.#Ct}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=Dt.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=ws(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Lt(e),this.initialVelocity=this.#Dt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#_t({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#_t({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=vs(t,p);return e>=Math.PI*a&&e<3*Math.PI*a}if(this.roll.horizontal){const e=vs(t+Math.PI*a,p);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=vs(t,p);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#It.findIndex(e=>e.id===t);e>=0&&this.#It.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ot(t,e){let i=t;for(const t of this.#It)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Et(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=X({size:c,position:s}),l=z.create(t.x,t.y,e);this.#Rt(l,r,o.left??o.default),this.#Rt(l,r,o.right??o.default),this.#Tt(l,r,o.top??o.default),this.#Tt(l,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,s=void 0}}#Dt(){const t=this.options.move,e=function(t){const e=C.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===M.inside||t.direction===M.outside)return e;const i=j(V(t.angle.value)),s=j(V(t.angle.offset)),n={left:s-i*a,right:s+i*a};return t.straight||(e.angle+=H(W(n.left,n.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#Rt(t,e,i){ys({outMode:i,checkModes:[It.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#Tt(t,e,i){ys({outMode:i,checkModes:[It.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Bt(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===It.bounce;return t===Q.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Q.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Q.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Q.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#Ft(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#_t(t){const e=this.#Bt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Ft(t.direction,t.outMode),c=a?this.#Ut(a(r),"shape"):void 0,l=o?this.#Ut(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#St(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===St.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Lt(t){const e=this.#u,i=Math.floor(V(this.options.zIndex.value)),s=this.#Et(t,A(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...ct(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(O(t))return j(t);switch(t){case M.top:return-Math.PI*a;case M.topRight:return-Math.PI*b;case M.right:return 0;case M.bottomRight:return Math.PI*b;case M.bottom:return Math.PI*a;case M.bottomLeft:return.75*Math.PI;case M.left:return Math.PI;case M.topLeft:return.75*-Math.PI;case M.inside:return Math.atan2(i.y-e.y,i.x-e.x);case M.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*p}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case M.inside:this.outType=Dt.inside;break;case M.outside:this.outType=Dt.outside}this.offset=C.origin}#Ut(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class bs{#At;#Ht=new Map;#Vt=[];#$t;#Nt;#Wt=[];#qt;constructor(t){this.#At=t,this.#$t=0,this.#qt=0}clear(){this.#Ht.clear();const t=this.#Nt;t&&(this.#At=t),this.#Nt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Gt(e,i);this.#Ht.has(s)||this.#Ht.set(s,[]),this.#Ht.get(s)?.push(t)}query(t,e,i=[]){const s=this.#jt(t);if(!s)return i;const n=Math.floor(s.minX/this.#At),a=Math.floor(s.maxX/this.#At),o=Math.floor(s.minY/this.#At),r=Math.floor(s.maxY/this.#At);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Ht.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Xt(t.x,t.y,e),a=this.query(n,i,s);return this.#Yt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Qt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Yt(),a}setCellSize(t){this.#Nt=t}#Xt(t,e,i){return(this.#Vt[this.#$t++]??=new Bt(t,e,i)).reset(t,e,i)}#Qt(t,e,i,s){return(this.#Wt[this.#qt++]??=new Ft(t,e,i,s)).reset(t,e,i,s)}#Gt(t,e){return`${Math.floor(t/this.#At)}_${Math.floor(e/this.#At)}`}#jt(t){if(t instanceof Bt){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 Ft){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}#Yt(){this.#$t=0,this.#qt=0}}class xs{checkParticlePositionPlugins;grid;#Kt;#u;#Zt;#Jt;#te;#ee;#ie;#se;#p;#ne;#ae;#oe;#re;#ce;#le;constructor(t,e){this.#p=t,this.#u=e,this.#te=0,this.#Kt=[],this.#ne=[],this.#Jt=0,this.#Zt=new Map,this.#ee=new Map,this.#le=this.#he(this.#u.zLayers),this.grid=new bs(100),this.checkParticlePositionPlugins=[],this.#ie=[],this.#se=[],this.#oe=[],this.#ae=[],this.#ce=[]}get count(){return this.#Kt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Jt:this.#Zt.get(i)??this.#Jt,o=this.count;if(a>0)switch(n){case Ct.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case Ct.wait:if(o>=a)return}try{const n=this.#ne.pop()??new Ps(this.#p,this.#u);n.init(this.#te,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Kt.push(n),this.#de(n),this.#te++,this.#u.dispatchEvent(gt.particleAdded,{particle:n}),n):void this.#ne.push(n)}catch(t){wt().warning(`error adding particle: ${t}`)}}clear(){this.#Kt=[],this.#ee.clear(),this.#ue(this.#u.zLayers)}destroy(){this.#Kt=[],this.#ne.length=0,this.#ee.clear(),this.#le=[],this.checkParticlePositionPlugins=[],this.#ie=[],this.#se=[],this.#oe=[],this.#ae=[],this.#ce=[]}drawParticles(t){for(let e=this.#le.length-1;e>=0;e--){const i=this.#le[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Kt.filter(t)}find(t){return this.#Kt.find(t)}get(t){return this.#Kt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ce=[],this.#se=[],this.#oe=[],this.#ie=[],this.#ae=[],this.#ee.clear(),this.#ue(t.zLayers),this.grid=new bs(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ce.push(e),e.particleUpdate&&this.#se.push(e),e.postUpdate&&this.#oe.push(e),e.particleReset&&this.#ie.push(e),e.postParticleUpdate&&this.#ae.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#Kt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#pe(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=xe(this.#p,this.#u,s);this.#fe(n,i,t)}this.#fe(t.particles,i)}setResizeFactor(t){this.#re=t}update(t){this.grid.clear();for(const e of this.#ce)e.update?.(t);const e=this.#ge(t);for(const e of this.#oe)e.postUpdate?.(t);if(this.#me(t,e),e.size)for(const t of e)this.remove(t);this.#re=void 0}#ye(...t){this.#ne.push(...t)}#fe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Jt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Zt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ve(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Jt=n.limit.value*a:this.#Zt.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#he(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#we(t){const e=this.#le.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ve(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}#de(t){const e=this.#we(t.position.z),i=this.#le[e];i&&(i.push(t),this.#ee.set(t.id,e))}#pe(t,e,i){const s=this.#Kt[t];return!!s&&(s.group===e&&(this.#Kt.splice(t,1),this.#Pe(s),s.destroy(i),this.#u.dispatchEvent(gt.particleRemoved,{particle:s}),this.#ye(s),!0))}#Pe(t){const e=this.#ee.get(t.id)??this.#we(t.position.z),i=this.#le[e];if(!i)return void this.#ee.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#ee.delete(t.id)}#ue(t){const e=Math.max(Math.floor(t),1);if(this.#le.length===e)for(const t of this.#le)t.length=0;else this.#le=this.#he(e)}#be(t){const e=this.#we(t.position.z),i=this.#ee.get(t.id);if(void 0===i)return void this.#de(t);if(i===e)return;const s=this.#le[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#le[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.#ee.set(t.id,e)}else this.#ee.set(t.id,e)}#ge(t){const e=new Set,i=this.#re;for(const s of this.#Kt){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.#ie)t.particleReset?.(s);for(const e of this.#se){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#me(t,e){for(const i of this.#Kt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#ae)e.postParticleUpdate?.(i,t);this.#be(i)}}}class Ms{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=V(s.gravity.maxSpeed)*i,a.moveDrift=V(s.drift)*i,a.moveSpeed=V(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function ks(t){return!t.destroyed}function zs(t,e,...i){const s=new Me(t,e);return At(s,...i),s}var Cs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#P;#xe;#Me={value:0,factor:0};#ke;#ze;#Ce;#Ie;#Se;#Oe;#Le;#De;#_e;#Ee;#Re;#p;#Te;#Be;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#ke=e,this.#_e=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=zt.standard,this.peakNits=400,this.#Te=!1,this.#P=0,this.#Ce=0,this.#De=0,this.#Se=!0,this.started=!1,this.destroyed=!1,this.#Re=!0,this.#Le=0,this.zLayers=100,this.pageHidden=!1,this.#Be=a,this.#Oe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Ms(this),this.canvas=new gs(this.#p,this),this.particles=new xs(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ee=zs(this.#p,this),this.actualOptions=zs(this.#p,this),this.#Ie=new ms(this),this.dispatchEvent(gt.containerBuilt)}get animationStatus(){return!this.#Re&&!this.pageHidden&&ks(this)}get options(){return this.#Ee}get sourceOptions(){return this.#Be}addLifeTime(t){this.#De+=t}alive(){return!this.#Ce||this.#De<=this.#Ce}destroy(t=!0){if(ks(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#_e(t),this.dispatchEvent(gt.containerDestroyed)}}dispatchEvent(t,e){this.#ke(t,{container:this,data:e})}draw(t){if(!ks(this))return;let e=t;this.#ze=T(t=>{e&&(this.#Le=void 0,e=!1),this.#Fe(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}wt().error(`Export plugin with type ${t} not found`)}async init(){if(!ks(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Ee=zs(this.#p,this,this.#Oe,this.sourceOptions),this.actualOptions=zs(this.#p,this,this.#Ee),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,smooth:n,zLayers:a}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=r.mode,this.peakNits=r.peakNits,this.zLayers=a,this.#Ce=V(i)*o,this.#P=V(e)*o,this.#De=0,this.fpsLimit=s>0?s:120,this.#Te=n;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(gt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(gt.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(ks(this)&&(void 0!==this.#ze&&(t=this.#ze,B(t),this.#ze=void 0),!this.#Re)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Re=!0),this.dispatchEvent(gt.containerPaused)}}play(t){if(!ks(this))return;const e=this.#Re||t;if(!this.#Se||this.actualOptions.autoPlay){if(this.#Re&&(this.#Re=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(gt.containerPlay),this.draw(e??!1)}else this.#Se=!1}async refresh(){if(ks(this))return this.stop(),this.start()}async reset(t){if(ks(this))return this.#Oe=t,this.#Be=t,this.#Ee=zs(this.#p,this,this.#Oe,this.sourceOptions),this.actualOptions=zs(this.#p,this,this.#Ee),this.refresh()}async start(){ks(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Ie.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(gt.containerStarted),this.play(),t()};this.#xe=setTimeout(()=>{e()},this.#P)}))}stop(){if(ks(this)&&this.started){this.#xe&&(clearTimeout(this.#xe),this.#xe=void 0),this.#Se=!0,this.started=!1,this.#Ie.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.#Be=this.#Ee,this.dispatchEvent(gt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Fe(t){try{if(!this.#Te&&void 0!==this.#Le&&t<this.#Le+o/this.fpsLimit)return void this.draw(!1);if(this.#Le??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/o}(this.#Me,t-this.#Le,this.fpsLimit,this.#Te),this.addLifeTime(this.#Me.value),this.#Le=t,this.#Me.value>o)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Me),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){wt().error("error in animation loop",t)}}}});var Is=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=Rt.CanvasSetup;#u;#Ue;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ue&&(t.globalCompositeOperation=this.#Ue)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ue=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Ss(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=c*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function Os(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(c=a,l=n,Math.sqrt(G(c,l))),r=V(i.acceleration);var c,l;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?Mt.clockwise:Mt.counterClockwise,angle:F()*p,radius:o,acceleration:e.retina.spinAcceleration}}var Ls=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-V(e.decay),t.pathDelay=V(s.delay.value)*o,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:V(i.acceleration),inverse:i.inverse},Os(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,n=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,c=t.retina.moveDrift,l=t.size.max,h=r*(i.size?t.getRadius()/l:1)*n*(e.factor||1)*a,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const n=e.spin.direction===Mt.clockwise,o={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),c=r*a;e.spin.radius>c?(e.spin.radius=c,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,h,o):Ss(t,i,h,d,c,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=q(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&n>=c||l&&o>=l)&&!t.misplaced)t.misplaced=!!c&&n>c||!!l&&o>l,c&&(t.velocity.x=t.velocity.y*a-t.velocity.x),l&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!c||n<c)&&(!l||o<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Ae()}redrawInit(){return this.#Ae()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ae(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class Ds{#He=!0;#Ve;#u;#mt;#$e;#Ne;constructor(t,e){this.#u=t,this.#Ve=[],this.#$e=e,this.#Ne=new Map,this.#mt={mouseDown:()=>{this.#We()},mouseLeave:()=>{this.#qe()},mouseMove:t=>{this.#Ge(t)},mouseUp:t=>{this.#je(t)},touchStart:t=>{this.#Xe(t)},touchMove:t=>{this.#Ge(t)},touchEnd:t=>{this.#Ye(t)},touchCancel:t=>{this.#Ye(t)},touchEndClick:t=>{this.#Qe(t)},visibilityChange:()=>{this.#wt()}}}addListeners(){this.#bt(!0)}init(){this.#Ve.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#Ve.push(t)}removeListeners(){this.#bt(!1)}#Ke(t){const e=this.#u,i=this.#$e,s=e.actualOptions;if(this.#He){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;ot(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#qe()},500)}#wt(){this.#qe()}#Ze(t){const e=this.#mt,i=this.#u,s=this.#$e,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(dt(a,qi,e.mouseMove,t),dt(a,Gi,e.touchStart,t),dt(a,Xi,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(dt(a,ji,e.touchEndClick,t),dt(a,Ni,e.mouseUp,t),dt(a,$i,e.mouseDown,t)):dt(a,ji,e.touchEnd,t):(dt(a,ji,e.touchEndClick,t),dt(a,Ni,e.mouseUp,t),dt(a,$i,e.mouseDown,t),dt(a,ji,e.touchEnd,t)),dt(a,Wi,e.mouseLeave,t),dt(a,Yi,e.touchCancel,t))}#bt(t){const e=this.#mt,i=this.#u,n=this.#$e,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===Ei.window?n.interactivityData.element=J():o===Ei.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this.#Ze(t),dt(document,s,e.visibilityChange,t,!1)}#We(){const{interactivityData:t}=this.#$e,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#je(t){const e=this.#u,i=this.#$e,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this.#Ve)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#Ke(t),n.clicking=!1}}#qe(){const{interactivityData:t}=this.#$e,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Wi,e.inside=!1,e.clicking=!1}#Ge(t){const e=this.#u,i=this.#$e,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#He=!0;const e=t;if(n.element===J()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Ei.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#He="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=qi}#Ye(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ne.delete(t.identifier);this.#qe()}#Qe(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ne.delete(t.identifier);this.#je(t)}#Xe(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ne.set(t.identifier,performance.now());this.#Ge(t)}}class _s{interactivityData;#Je;#u;#Ie;#ti;#ei;#ii;#si;#p;constructor(t,e){this.#u=e,this.#p=t,this.#ei=[],this.#ti=[],this.#si=[],this.#Je=new Map,this.#Ie=new Ds(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#ii=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#ni(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#Je.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Je.set(Gi,()=>{e.destroyed||(a=!0,o=!1)}),this.#Je.set(Xi,()=>{e.destroyed||(o=!0)}),this.#Je.set(ji,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#Je.set(Yi,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Je)s.addEventListener(t,e)}addListeners(){this.#Ie.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Je)e.element?.removeEventListener(t,i);this.#Je.clear()}}externalInteract(t){for(const e of this.#ti){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#ti)i.handleClickMode?.(t,e)}init(){this.#Ie.init();for(const t of this.#ei){switch(t.type){case Ri.external:this.#ti.push(t);break;case Ri.particles:this.#si.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#ei=t,this.#ti=[],this.#si=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#ti)i.clear(t,e);for(const s of this.#si)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#Ie.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#ti)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#si)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#ii&&this.#ii.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#ii&&this.#ii.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#ei)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#ni(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var Es=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new _s(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new Ai(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});t.loadFireflyPreset=ls,t.tsParticles=We}),Object.assign(globalThis.window||globalThis,{loadFireflyPreset:(globalThis.__tsParticlesInternals.presets.firefly||{}).loadFireflyPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},s={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const s=e.exec(t);if(s?.[1])return void console.error(`tsParticles - ${s[1]} - ${t.slice(s[0].length)}`,...i)}console.error(`tsParticles - Error - ${t}`,...i)},info:i(console.info),log:i(console.log),trace:i(console.trace),verbose:i(console.log),warning:i(console.warn)};function n(){return s}var a;!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(a||(a={}));const o="generated",r="100%",c="source-over",l="visibilitychange",h=100,d=.5,u=1e3,p={x:0,y:0,z:0},f=1,g=0,m=0,y=1,v="random",w=2*Math.PI,P="true",b="false",x="canvas",M=255,z=360,k=100,C=100,S=.25,I=400;function O(t){return"z"in t?t.z:p.z}class L{x;y;z;constructor(t=p.x,e=p.y,i=p.z){this.x=t,this.y=e,this.z=i}static get origin(){return L.create(p.x,p.y,p.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 L.create(t.x,t.y,O(t))}static create(t,e,i){return"number"==typeof t?new L(t,e??p.y,i??p.z):new L(t.x,t.y,O(t))}add(t){return L.create(this.x+t.x,this.y+t.y,this.z+O(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=O(t)}copy(){return L.clone(this)}div(t){return L.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return L.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 L.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),p.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=O(t)}sub(t){return L.create(this.x-t.x,this.y-t.y,this.z-O(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=O(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class D extends L{constructor(t=p.x,e=p.y){super(t,e,p.z)}static get origin(){return D.create(p.x,p.y)}static clone(t){return D.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new D(t,e??p.y):new D(t.x,t.y)}}function _(t){return"boolean"==typeof t}function E(t){return"string"==typeof t}function T(t){return"number"==typeof t}function R(t,e){return Object.values(t).some(t=>t===e)}function F(t,e,i){return R(t,e)?e:i}function B(t){return"object"==typeof t&&null!==t}function A(t){return Array.isArray(t)}function U(t){return null==t}const H=Math.PI/180;let V=Math.random;const $=t=>requestAnimationFrame(t),N=t=>{cancelAnimationFrame(t)};function W(){return j(V(),0,1-Number.EPSILON)}function q(t,e){return W()*(e-t)+t}function j(t,e,i){return Math.min(Math.max(t,e),i)}function G(t){const e=Q(t);let i=Y(t);return e===i&&(i=0),q(i,e)}function X(t){return T(t)?t:G(t)}function Y(t){return T(t)?t:t.min}function Q(t){return T(t)?t:t.max}function K(t,e){if(t===e||void 0===e&&T(t))return t;const i=Y(t),s=Q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:K(i,s)}function Z(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function J(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function tt(t){return t*H}function et(t){const{position:e,size:i}=t;return{x:e?.x??W()*i.width,y:e?.y??W()*i.height}}function it(t){return t?t.endsWith("%")?Number.parseFloat(t)/h:Number.parseFloat(t):1}const st="TSP-1001",nt="TSP-1002",at="TSP-1003",ot="TSP-1101",rt="TSP-1102",ct="TSP-1201",lt="TSP-1202",ht="TSP-1203";function dt(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var ut,pt;function ft(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function gt(){return globalThis.document}function mt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function yt(t,e){return t===e||A(e)&&e.includes(t)}function vt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(W()*t.length)]}function wt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==ut.bottom||(n=t.top<e.height+i.x);!n||s&&s!==ut.left||(n=t.right>i.x);!n||s&&s!==ut.right||(n=t.left<e.width+i.y);!n||s&&s!==ut.top||(n=t.bottom>i.y);return n}(Pt(t,s??0),e,i,n)}function Pt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function bt(t,...e){for(const i of e){if(U(i))continue;if(!B(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):B(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return B(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(ft(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(ft(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>bt(void 0,t)):bt(e[s],n)}}return t}function xt(t,e){return A(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Mt(t,e,i){return A(t)?vt(t,e,i):t}function zt(t,e){return function(t,e){if(t.mode!==pt.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/h*e.width,y:t.y/h*e.height}:{width:t.width/h*e.width,height:t.height/h*e.height}}(t,e)}let kt,Ct;function St(t,e,i,s,n){if(s){let s={passive:!0};_(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function It(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}async function Ot(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function Lt(t){const e=Mt(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(A(t))return t.every(t=>B(t)&&!A(t));return B(t)&&!A(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(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(ut||(ut={})),function(t){t.precise="precise",t.percent="percent"}(pt||(pt={}));class Dt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var _t,Et,Tt,Rt,Ft,Bt,At,Ut,Ht,Vt,$t,Nt,Wt,qt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(_t||(_t={}));class jt{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}get initialized(){return this.#o}addColorManager(t,e){this.#o||this.colorManagers.set(t,e)}addConfig(t){if(this.#o)return;const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(_t.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.#o||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#o||this.initializers.effects.set(t,e)}addPalette(t,e){this.#o||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#o||this.initializers.updaters.set(t,e)}addPlugin(t){this.#o||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#o||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#o)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}async register(...t){if(this.#o)throw new Error(dt(at));for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}class Gt{pluginManager=new jt(this);#h=[];#d=new Dt;#o=!1;get items(){return this.#h}get version(){return"4.5.0"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(dt(st,this.version))}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const{Container:i}=await Promise.resolve().then(function(){return Hs}),s=t.id??e?.id??`tsparticles${Math.floor(1e4*W()).toString()}`,{index:n,url:a}=t,c=Mt(a?await Lt({fallback:t.options,url:a,index:n}):t.options,n),{items:l}=this,h=l.findIndex(t=>t.id.description===s),d=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(h,e,d)}else l.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:function(t){let e;const i=gt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===x)e=t,e.dataset[o]??=b,e.dataset[o]===P&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(x).item(0);s?(e=s,e.dataset[o]=b):(e=i.createElement(x),e.dataset[o]=P,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}(function(t,e){const i=gt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[o]=P,i.body.append(s),s)}(s,e));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Et||(Et={}));class Xt{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 Yt extends Xt{radius;constructor(t,e,i){super(t,e,Et.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,J(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Yt||t.type===Et.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Qt||t.type===Et.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Qt extends Xt{size;constructor(t,e,i,s){super(t,e,Et.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 Yt)return t.intersects(this);if(!(t instanceof Qt))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Zt(t,e,i){void 0!==i&&(t[e]=K(i))}function Jt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function te(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Tt||(Tt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Rt||(Rt={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(Ft||(Ft={})),function(t){t.delete="delete",t.wait="wait"}(Bt||(Bt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(At||(At={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ut||(Ut={})),function(t){t.none="none",t.max="max",t.min="min"}(Ht||(Ht={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Vt||(Vt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}($t||($t={})),function(t){t.max="max",t.min="min",t.random="random"}(Nt||(Nt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Wt||(Wt={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(qt||(qt={}));class ee{load(t){U(t)||this.doLoad(t)}}function ie(t,...e){for(const i of e)t.load(i)}class se extends ee{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Zt(this,"count",t.count),Kt(this,"enable",t.enable),Zt(this,"speed",t.speed),Zt(this,"decay",t.decay),Zt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class ne extends se{mode=Rt.auto;startValue=Nt.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class ae extends se{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Zt(this,"offset",t.offset)}}class oe extends ee{h=new ae(0,z);l=new ae(0,C);s=new ae(0,k);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends ee{value="";static create(t,e){const i=new re;return i.load(t),void 0!==e&&(E(e)||A(e)?i.load({value:e}):i.load(e)),i}doLoad(t){U(t.value)||(this.value=t.value)}}class ce extends re{animation=new oe;static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(E(e)||A(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 le extends ee{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new re,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"element",t.element),Kt(this,"draw",t.draw),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class he extends ee{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class de extends ee{enable=!0;mode=Ft.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!_(t.enable))throw new Error(dt(ct,String(t.enable)));if(void 0!==t.mode&&!R(Ft,t.mode))throw new Error(dt(lt,Object.values(Ft).join(", "),(e=t.mode,String(e))));var e;if(void 0!==t.peakNits&&(!T(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(dt(ht,String(t.peakNits)));Kt(this,"enable",t.enable),Kt(this,"mode",t.mode),Kt(this,"peakNits",t.peakNits)}}class ue extends ee{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class pe extends ee{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]=bt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class fe extends ee{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Kt(this,"enable",t.enable),Zt(this,"opacity",t.opacity)}}class ge extends ee{offset=0;value=90;doLoad(t){Zt(this,"offset",t.offset),Zt(this,"value",t.value)}}class me extends ee{mode=pt.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class ye extends ee{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Zt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Zt(this,"maxSpeed",t.maxSpeed)}}class ve extends ee{value=0;doLoad(t){U(t.value)||(this.value=K(t.value))}}class we extends ve{animation=new se;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class Pe extends we{animation=new ne}class be extends ee{clamp=!0;delay=new ve;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=bt(this.options,t.options))}}class xe extends ee{bottom;default=At.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 Me extends ee{acceleration=0;enable=!1;position;doLoad(t){Zt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=bt({},t.position))}}class ze extends ee{angle=new ge;center=new me;decay=0;direction=a.none;distance={};drift=0;enable=!1;gravity=new ye;outModes=new xe;path=new be;random=!1;size=!1;speed=2;spin=new Me;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(T(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Zt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=T(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Zt(this,"drift",t.drift),Kt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(B(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Kt(this,"random",t.random),Kt(this,"size",t.size),Zt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class ke extends ee{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Zt(this,"width",t.width),Zt(this,"opacity",t.opacity)}}class Ce extends ee{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"fill",t.fill,()=>new fe),Jt(this,"stroke",t.stroke,()=>new ke)}}class Se extends ve{value=1}class Ie extends ee{horizontal=new Se;vertical=new Se;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Oe extends ee{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class Le extends ee{mode=Bt.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class De extends ee{density=new Oe;limit=new Le;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class _e extends ee{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]=bt(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class Ee extends ve{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Te extends ee{bounce=new Ie;effect=new pe;groups={};move=new ze;number=new De;paint;palette;reduceDuplicates=!1;shape=new _e;zIndex=new Ee;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Ce,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new fe,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=bt(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&&(A(e)?this.paint=xt(e,t=>{const e=new Ce;return e.load(t),e}):A(this.paint)?(this.paint=new Ce,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#u.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(A(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 Re(t,e,...i){const s=new Te(t,e);return ie(s,...i),s}class Fe extends ee{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new le,this.fullScreen=new he,this.hdr=new de,this.particles=Re(this.#p,this.#u),this.resize=new ue}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,xt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Zt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Zt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit);const e=t.hdr;_(e)?(this.hdr.enable=e,this.hdr.mode=Ft.standard,this.hdr.peakNits=400):this.hdr.load(e),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;_(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=bt(this.style,t.style),Kt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#g(t){this.load(this.#p.getPreset(t))}}const Be=new Map,Ae=1.15,Ue=1.05,He=.2126,Ve=.7152,$e=.0722;function Ne(t,e){let i=Be.get(t);return i||(i=e(),Be.size>2e3&&Be.clear(),Be.set(t,i)),i}function We(t){return j(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function qe(t,e,i,s=!0){if(!e)return;const n=E(e)?{value:e}:e;if(E(n.value))return je(t,n.value,i,s);if(A(n.value)){const e=vt(n.value,i,s);if(!e)return;return qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function je(t,e,i,s=!0){if(!e)return;const n=E(e)?{value:e}:e;if(E(n.value))return n.value===v?function(){const t=0,e=256,i=()=>Math.floor(q(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(A(n.value)){const e=vt(n.value,i,s);if(!e)return;return je(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ge(t,e,i,s=!0){const n=qe(t,e,i,s);return n?function(t){const e=t.r/M,i=t.g/M,s=t.b/M,n=Math.max(e,i,s),a=Math.min(e,i,s),o={h:0,l:(n+a)*d,s:0};n!==a&&(o.s=o.l<d?(n-a)/(n+a):(n-a)/(2-n-a),o.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a));o.l*=C,o.s*=k,o.h*=60,o.h<0&&(o.h+=z);o.h>=z&&(o.h-=z);return o}(n):void 0}function Xe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ye(t){const e=(t.h%z+z)%z,i=Math.max(0,Math.min(k,t.s)),s=Math.max(0,Math.min(C,t.l)),n=e/z,a=i/k,o=s/C;if(0===i){const t=Math.round(o*M);return{r:t,g:t,b:t}}const r=o<d?o*(1+a):o+a-o*a,c=2*o-r,l=1/3,h=Math.min(M,M*Xe(c,r,n+l)),u=Math.min(M,M*Xe(c,r,n)),p=Math.min(M,M*Xe(c,r,n-l));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Qe(t,e,i,s,n){const a=e?4:2,o=i??1;return Ne(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${o.toString()}-${(s??400).toString()}-${n??Ft.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${o.toString()}`,()=>e?function(t,e,i=400,s=Ft.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/M,a=t.g/M,o=t.b/M;if(s!==Ft.natural&&s!==Ft.vivid&&s!==Ft.cinematic&&s!==Ft.dynamic)return{b:o,g:a,r:n};const r=Math.max(1,e),c=He*n+Ve*a+$e*o,l=function(t,e,i){if(t<=i)return We(t);const s=t+(t-i)*(e-1);return We(s)}(c,e,i),h=c>0?l/c:1;return function(t,e,i,s,n){switch(s){case Ft.vivid:{const s=(t+e+i)/3;return{b:j(j(s+(i-s)*Ae,0,n)*Ue,0,n),g:j(j(s+(e-s)*Ae,0,n)*Ue,0,n),r:j(j(s+(t-s)*Ae,0,n)*Ue,0,n)}}case Ft.cinematic:{const s=1.05*t,a=.95*i,o=(s+e+a)/3;return{b:j(o+1.1*(a-o),0,n),g:j(o+1.1*(e-o),0,n),r:j(o+1.1*(s-o),0,n)}}case Ft.dynamic:{const s=He*t+Ve*e+$e*i,a=Math.min(1,2*s),o=1-a,r=(t+e+i)/3,c=j(r+(t-r)*Ae,0,n)*Ue,l=j(r+(e-r)*Ae,0,n)*Ue,h=j(r+(i-r)*Ae,0,n)*Ue;return{b:j(i*o+h*a,0,n),g:j(e*o+l*a,0,n),r:j(t*o+c*a,0,n)}}case Ft.standard:case Ft.natural:default:return{b:i,g:e,r:t}}}(j(n*h,0,r),j(a*h,0,r),j(o*h,0,r),s,r)}(t,n,.18,s);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(e??1).toString()})`}(t,i,s,n):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ke(t,e,i,s,n){const a=e?4:2,o=i??1;return Ne(e?`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-hdr-${o.toString()}-${(s??I).toString()}-${n??Ft.standard}`:`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-sdr-${o.toString()}`,()=>e?Qe(function(t){const e=(t.h%z+z)%z,i=Math.max(0,Math.min(k,t.s)),s=Math.max(0,Math.min(C,t.l)),n=e/z,a=i/k,o=s/C;if(0===i){const t=o*M;return{r:t,g:t,b:t}}const r=o<d?o*(1+a):o+a-o*a,c=2*o-r,l=1/3;return{r:Math.min(M,M*Xe(c,r,n+l)),g:Math.min(M,M*Xe(c,r,n)),b:Math.min(M,M*Xe(c,r,n-l))}}(t),!0,i,s,n):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${o.toString()})`)}function Ze(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Je(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:z},s:{enable:!1,value:t.s,min:0,max:k},l:{enable:!1,value:t.l,min:0,max:C}};return e&&(ti(s.h,e.h,i),ti(s.s,e.s,i),ti(s.l,e.l,i)),s}function ti(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=X(e.speed)/h*i,t.decay=1-X(e.decay),t.status=Wt.increasing,t.loops=0,t.maxLoops=X(e.count),t.time=0,t.delayTime=X(e.delay)*u,e.sync||(t.velocity*=W(),t.value*=W()),t.initialValue=t.value,t.offset=K(e.offset)):t.velocity=0}function ei(t,e,i,s){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?G(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,o=t.decay??1,r=t.max,c=t.min;e&&t.status!==Wt.increasing?(t.value-=a,t.value<c&&(t.loops??=0,t.loops++,t.status=Wt.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=Wt.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=j(t.value,c,r)}function ii(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;ei(s,!1,e),ei(n,!0,e),ei(a,!0,e)}const si=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new Gt}();class ni{enable=!1;mode="destination-out";load(t){U(t)||(Kt(this,"mode",t.mode),Kt(this,"enable",t.enable))}}class ai{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Vs});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 ni),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new ni,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function oi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ai)})}class ri{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:w};const n=i.circleRange;e.arc(p.x,p.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=B(s)?{min:tt(s.min),max:tt(s.max)}:{min:0,max:tt(s)}}}async function ci(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ri))})}var li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(li||(li={}));const hi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,di=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class ui{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(hi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=di.exec(e);return i?{a:i[li.a]?Number.parseInt(i[li.a],16)/255:1,b:Number.parseInt(i[li.b]??"0",16),g:Number.parseInt(i[li.g]??"0",16),r:Number.parseInt(i[li.r]??"0",16)}:void 0}}async function pi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new ui)})}var fi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(fi||(fi={}));const gi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class mi{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 Ye(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ye({h:X(e.h),l:X(e.l),s:X(e.s)})}parseString(t){if(!this.accepts(t))return;const e=gi.exec(t);return e?function(t){const e=Ye(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?it(e[fi.a]):1,h:Number.parseInt(e[fi.h]??"0",10),l:Number.parseInt(e[fi.l]??"0",10),s:Number.parseInt(e[fi.s]??"0",10)}):void 0}}async function yi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new mi)})}class vi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ws});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function wi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initialized||(e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i))},t.pluginManager.addPlugin(new vi(t.pluginManager))})}function Pi(t,e){const i=t.value,s=t.animation,n={delayTime:X(s.delay)*u,enable:s.enable,value:X(t.value)*e,max:Q(i)*e,min:Y(i)*e,loops:0,maxLoops:X(s.count),time:0};if(s.enable){switch(n.decay=1-X(s.decay),s.mode){case Rt.increase:n.status=Wt.increasing;break;case Rt.decrease:n.status=Wt.decreasing;break;case Rt.random:n.status=W()>=d?Wt.increasing:Wt.decreasing}const t=s.mode===Rt.auto;switch(s.startValue){case Nt.min:n.value=n.min,t&&(n.status=Wt.increasing);break;case Nt.max:n.value=n.max,t&&(n.status=Wt.decreasing);break;case Nt.random:default:n.value=G(n),t&&(n.status=W()>=d?Wt.increasing:Wt.decreasing)}}return n.initialValue=n.value,n}function bi(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,c=e.decay??1;e.time??=0;const l=e.delayTime??0;if(!(l>0&&e.time<l&&(e.time+=n.value,e.time<l))){switch(e.status){case Wt.increasing:e.value+=a;break;case Wt.decreasing:e.value-=a}switch(e.velocity&&1!==c&&(e.velocity*=c),e.status){case Wt.increasing:e.value>=r&&(e.status=Wt.decreasing,e.loops??=0,e.loops++);break;case Wt.decreasing:e.value<=o&&(e.status=Wt.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Ht.max:i>=n&&t.destroy();break;case Ht.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=j(e.value,o,r))}}class xi extends ne{destroy=Ht.none;load(t){super.load(t),U(t)||Kt(this,"destroy",t.destroy)}}class Mi extends Pe{animation=new xi;value=1;load(t){if(U(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class zi{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Pi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=X(i.speed)/h*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=W()))}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){te(t,"opacity",Mi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&bi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function ki(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new zi(t)))})}const Ci={[ut.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[ut.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[ut.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[ut.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class Si{modes;#u;#y;constructor(t){this.#u=t,this.modes=[At.bounce,At.split],this.#y=t.plugins.filter(t=>!!t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;for(const s of this.#y)if(s.particleBounce?.(t,i,e))return;const n=t.getPosition(),a=t.offset,o=t.getRadius(),r=Pt(n,o),c=this.#u.canvas.size,l=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==At.bounce&&t.outMode!==At.split||!(t.direction in Ci))return;const e=Ci[t.direction],i=t.bounds,s=t.canvasSize[e.canvas],n=t.particle.position,a=t.particle.velocity[e.axis];if(e.negative&&i[e.negativeEdge]<0?n[e.axis]=t.size+t.offset[e.axis]:!e.negative&&i[e.positiveEdge]>s&&(n[e.axis]=s-t.size-t.offset[e.axis]),!t.outOfCanvas||!(e.negative&&a<0||!e.negative&&a>0))return;t.particle.velocity[e.axis]*=-X(t.particle.options.bounce[e.bounce].value);const o=t.offset[e.axis]+t.size;n[e.axis]=e.negative?o:s-o,t.outMode===At.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:r,canvasSize:c,offset:a,outOfCanvas:l,size:o})}}class Ii{modes;constructor(t){this.modes=[At.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case $t.normal:case $t.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case $t.inside:{const{dx:e,dy:i}=Z(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class Oi{modes;#u;constructor(t){this.#u=t,this.modes=[At.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===ut.left||e===ut.right))??(t.options.move.distance.vertical&&(e===ut.top||e===ut.bottom)))return;const n=t.options.move.gravity,a=this.#u,o=a.canvas.size,r=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>o.height+r&&e===ut.bottom||n.inverse&&i.y<-r&&e===ut.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=o.height+r||t.velocity.y<0&&t.position.y>=-r||t.velocity.x>0&&t.position.x<=o.width+r||t.velocity.x<0&&t.position.x>=-r)return;wt(t.position,a.canvas.size,p,r,e)||t.destroy()}}}const Li=D.origin;class Di{modes;#u;constructor(t){this.#u=t,this.modes=[At.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;if(t.outType===$t.inside)this.#v(t,n);else{if(t.isInsideCanvasForOutMode(s,e))return;t.outType===$t.outside?this.#w(t):this.#P(t,n,e)}}#v(t,e){const{x:i,y:s}=t.velocity;Li.setTo(p),Li.length=t.moveCenter.radius,Li.angle=t.velocity.angle+Math.PI,Li.addTo(t.moveCenter);const{dx:n,dy:a}=Z(t.position,Li);if(i<=0&&n>=0||s<=0&&a>=0||i>=0&&n<=0||s>=0&&a<=0)return;t.position.x=Math.floor(G({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(G({min:0,max:e.canvas.size.height}));const{dx:o,dy:r}=Z(t.position,t.moveCenter);t.direction=Math.atan2(-r,-o),t.velocity.angle=t.direction,t.justWarped=!0}#P(t,e,i){const s=t.options.move.warp,n=e.canvas.size,a=t.getRadius(),o={bottom:n.height+a+t.offset.y,left:-a-t.offset.x,right:n.width+a+t.offset.x,top:-a-t.offset.y},r=Pt(t.position,a);i===ut.right&&r.left>n.width+t.offset.x?(t.position.x=o.left,t.initialPosition.x=t.position.x,s||(t.position.y=W()*n.height,t.initialPosition.y=t.position.y),t.justWarped=!0):i===ut.left&&r.right<-t.offset.x&&(t.position.x=o.right,t.initialPosition.x=t.position.x,s||(t.position.y=W()*n.height,t.initialPosition.y=t.position.y),t.justWarped=!0),i===ut.bottom&&r.top>n.height+t.offset.y?(s||(t.position.x=W()*n.width,t.initialPosition.x=t.position.x),t.position.y=o.top,t.initialPosition.y=t.position.y,t.justWarped=!0):i===ut.top&&r.bottom<-t.offset.y&&(s||(t.position.x=W()*n.width,t.initialPosition.x=t.position.x),t.position.y=o.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0)}#w(t){t.position.x=Math.floor(G({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(G({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=Z(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class _i{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#b(t,At.bounce,t=>new Si(t)),this.#b(t,At.out,t=>new Di(t)),this.#b(t,At.destroy,t=>new Ii(t)),this.#b(t,At.none,t=>new Oi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#x(t,e,i.bottom??i.default,ut.bottom),this.#x(t,e,i.left??i.default,ut.left),this.#x(t,e,i.right??i.default,ut.right),this.#x(t,e,i.top??i.default,ut.top)}#b(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#x(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Ei(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new _i(t)))})}class Ti{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=Mt(i.paint,t.id,i.reduceDuplicates);this.#M(s,t,e),this.#z(s,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ii(t.fillColor,e,this.#u.hdr),ii(t.strokeColor,e,this.#u.hdr))}#M(t,e,i){const s=t?.fill,n=t?.color,a=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const o=ce.create(void 0===a?void 0:ce.create(void 0,a),s.color);e.fillEnabled=s.enable,e.fillOpacity=X(s.opacity),e.fillAnimation=o.animation;const r=Ge(this.#p,o);r&&(e.fillColor=Je(r,e.fillAnimation,i.retina.reduceFactor))}#z(t,e,i){const s=t?.stroke,n=t?.color,a=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const o=ce.create(void 0===a?void 0:ce.create(void 0,a),s.color);e.strokeWidth=X(s.width)*i.retina.pixelRatio,e.strokeOpacity=X(s.opacity??1),e.strokeAnimation=o.animation;const r=Ge(this.#p,o)??e.getFillColor();r&&(e.strokeColor=Je(r,e.strokeAnimation,i.retina.reduceFactor))}}async function Ri(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ti(t.pluginManager,e)))})}var Fi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Fi||(Fi={}));const Bi=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ai{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:X(e.r),g:X(e.g),b:X(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Bi.exec(t);return e?{a:e.length>4?it(e[Fi.a]):1,b:parseInt(e[Fi.b]??"0",10),g:parseInt(e[Fi.g]??"0",10),r:parseInt(e[Fi.r]??"0",10)}:void 0}}async function Ui(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Ai)})}class Hi extends ne{destroy=Ht.none;load(t){super.load(t),U(t)||Kt(this,"destroy",t.destroy)}}class Vi extends Pe{animation=new Hi;value=3;load(t){if(super.load(t),U(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class $i{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/h*e.retina.reduceFactor,s.sync||(t.size.velocity*=W()))}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){te(t,"size",Vi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Pi(i,e),t.retina.sizeAnimationSpeed=X(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&bi(t,t.size,0,t.options.size.animation.destroy,e)}}async function Ni(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new $i(t)))})}async function Wi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([oi(t),pi(t),yi(t),Ui(t),wi(t),ci(t),Ri(t),ki(t),Ei(t),Ni(t)])})}const qi="TSP-3201",ji="TSP-3202";class Gi{enable=!1;mode=[];load(t){U(t)||(Kt(this,"enable",t.enable),Kt(this,"mode",t.mode))}}var Xi,Yi,Qi;!function(t){t.circle="circle",t.rectangle="rectangle"}(Xi||(Xi={}));class Ki{enable=!1;mode=[];selectors=[];type=Xi.circle;load(t){U(t)||(Kt(this,"selectors",t.selectors),Kt(this,"enable",t.enable),Kt(this,"mode",t.mode),Kt(this,"type",t.type))}}class Zi{enable=!1;mode=[];load(t){U(t)||(Kt(this,"enable",t.enable),Kt(this,"mode",t.mode))}}class Ji{onClick=new Gi;onDiv=new Ki;onHover=new Zi;load(t){if(U(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=xt(e,t=>{const e=new Ki;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Yi||(Yi={}));class ts{#u;constructor(t){this.#u=t}load(t){if(U(t))return;if(!this.#u)return;const e=this.#u.interactionManager?.interactors??[];for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class es{detectsOn=Yi.window;events=new Ji;modes;constructor(t){this.modes=new ts(t)}load(t){if(U(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class is{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Gs});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new es(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=bt({},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"}(Qi||(Qi={}));class ss{type=Qi.external;container;constructor(t){this.container=t}}const ns="pointerleave",as="pointermove",os="touchstart",rs="touchend",cs="touchmove",ls="touchcancel";class hs{x=0;y=0;load(t){t&&(Kt(this,"x",t.x),Kt(this,"y",t.y))}}class ds{value;weights=new hs;load(t){t&&(t.weights&&(this.weights??=new hs,this.weights.load(t.weights)),U(t.value)||(this.value=K(t.value)))}}class us{h=new ds;l=new ds;s=new ds;load(t){t&&(t.h&&(this.h??=new ds,this.h.load(t.h)),t.s&&(this.s??=new ds,this.s.load(t.s)),t.l&&(this.l??=new ds,this.l.load(t.l)))}}class ps{colorCoords=new us;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){U(t)||(Kt(this,"delay",t.delay),Kt(this,"quantity",t.quantity),Kt(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=bt({},t.particles)),t.colorCoords&&(this.colorCoords??=new us,this.colorCoords.load(t.colorCoords)))}}const fs="trail";class gs extends ss{maxDistance=0;#k;#C;#p;constructor(t,e){super(e),this.#p=t,this.#k=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 a=n.delay*u/this.container.retina.reduceFactor;if(this.#k<a&&(this.#k+=e.value),this.#k<a)return;const o=t.mouse.position,r=!(n.pauseOnStop&&(o===this.#C||o?.x===this.#C?.x&&o?.y===this.#C?.y));if(this.#C=o?{...o}:void 0,r&&o){let t=n.particles;const e=n.colorCoords;if(e){const{width:s,height:a}=i.canvas.size,r={x:o.x/s,y:o.y/a},c=t=>!!(t?.weights?.x??t?.weights?.y),l=(t,e,i)=>{if(!c(t))return;const s=t?.weights,n=r.x*(s?.x??0)+r.y*(s?.y??0),a=t?.value??e,o=Y(a??0),l=Q(a??i),h=o+n*(l-o);return Math.min(l,Math.max(o,h))},h=n.particles?.paint?Mt(n.particles.paint):void 0,d=h?.fill,u=d?Ge(this.#p,ce.create(void 0,d.color)):void 0,p=l(e.h,u?.h,z),f=l(e.s,u?.s,k),g=l(e.l,u?.l,C);void 0===p&&void 0===f&&void 0===g||(t=bt({},n.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:f??u?.s,l:g??u?.l}}}}}))}i.particles.push(n.quantity,o,t)}this.#k-=a}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&&yt(fs,n.onClick.mode)||s.inside&&!!s.position&&yt(fs,n.onHover.mode))}loadModeOptions(t,...e){te(t,"trail",ps,...e)}reset(){}}async function ms(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addInteractor)throw new Error(dt(qi))}(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new gs(t.pluginManager,e)))})}class ys extends ve{sync=!1;load(t){U(t)||(super.load(t),Kt(this,"sync",t.sync))}}class vs extends ve{sync=!1;load(t){U(t)||(super.load(t),Kt(this,"sync",t.sync))}}class ws{count=0;delay=new ys;duration=new vs;load(t){U(t)||(Kt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ps{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:W(),n=i.duration.sync?1:W();t.life={delay:e.retina.reduceFactor?X(i.delay.value)*s/e.retina.reduceFactor*u:0,delayTime:0,duration:e.retina.reduceFactor?X(i.duration.value)*n/e.retina.reduceFactor*u: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){te(t,"life",ws,...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 a=K(0,i.width),o=K(0,i.width);t.position.x=G(a),t.position.y=G(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=X(r.delay.value)*u,s.duration=X(r.duration.value)*u)}(t,e,this.#u.canvas.size)}}async function bs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ps(t)))})}const xs={fullScreen:{enable:!0,zIndex:-1},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:"#fff"},enable:!0}},life:{duration:{value:5,sync:!1},count:1},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:3}},size:{value:{min:3,max:6}},move:{enable:!0,speed:3,size:!0}},interactivity:{events:{onHover:{enable:!0,mode:"trail"}},modes:{trail:{delay:.5,pauseOnStop:!0,quantity:4}}},background:{color:"#000"}};async function Ms(t){await t.pluginManager.register(async t=>{await Promise.all([Wi(t),bs(t),(async()=>{await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new is(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(dt(ji));i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await ms(t)})()]),t.pluginManager.addPreset("firefly",xs)})}const zs=globalThis;zs.loadFireflyPreset=Ms,zs.tsParticles=si;function ks(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Cs{#S;#I;#O;#L;#D;#u;#_;#E;#T;#R;#F;#B;#p;#A;#U;#H={};#V=[void 0,void 0];#$={};constructor(t,e,i){this.#p=t,this.#u=e,this.#L=i,this.#_=null,this.#S=null,this.#I=new Set,this.#U=[],this.#A=[],this.#O=[],this.#D=[],this.#T=[],this.#R=[],this.#F=[],this.#B={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#E}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(p.x,p.y,this.#L.size.width,this.#L.size.height)})}clear(){const t=new Set;for(const e of this.#O)if(t.add(e),e.canvasClear?.())return e;for(const e of Object.values(qt))if("number"==typeof e)for(const i of this.#N(e))if(!t.has(i)&&(t.add(i),i.canvasClear?.()))return i;this.canvasClear()}destroy(){this.stop(),this.#S=null,this.#I.clear(),this.#U=[],this.#A=[],this.#O=[],this.#D=[],this.#T=[],this.#R=[],this.#F=[];for(const t of Object.values(qt))"number"==typeof t&&(this.#B[t]=[])}draw(t){const e=this.#_;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this.#W(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#$,f=this.#H,g=a?Ke(a,r.hdr,h*d,r.peakNits,r.hdrMode):void 0,m=o?Ke(o,r.hdr,u*d,r.peakNits,r.hdrMode):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#F)i.drawParticleSetup?.(s,t,e);this.#q(s,t,i,d,f,p),this.#j({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*l**c.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#R)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#T)this.#X(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u,s=this.clear();e.update(t),this.draw(n=>{const a=this.#L.size.width,o=this.#L.size.height;if(this.#S)try{n.drawImage(this.#S,p.x,p.y,a,o)}catch{this.#Y("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(n,t)}catch{this.#Y("background-draw-error","Error in background.draw callback")}for(const t of this.#N(qt.BackgroundMask))t!==s&&t.canvasPaint?.();for(const e of this.#N(qt.CanvasSetup))e.drawSettingsSetup?.(n,t);for(const e of this.#N(qt.PluginContent))e.draw?.(n,t);e.drawParticles(t);for(const e of this.#N(qt.CanvasCleanup))e.clearDraw?.(n,t),e.drawSettingsCleanup?.(n,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#Q(),this.paint()}initPlugins(){this.#O=[],this.#D=[],this.#T=[],this.#F=[],this.#R=[];for(const t of Object.values(qt))"number"==typeof t&&(this.#B[t]=[]);this.#K()}initUpdaters(){this.#U=[],this.#A=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#A.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#U.push(t)}paint(){let t=!1;for(const e of this.#N(qt.BackgroundMask))if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(p.x,p.y,this.#L.size.width,this.#L.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,p.x,p.y,this.#L.size.width,this.#L.size.height),i.globalAlpha=s})}setContext(t){this.#_=t,this.#_&&(this.#_.globalCompositeOperation=c)}setContextSettings(t){this.#E=t}stop(){this.draw(t=>{t.clearRect(p.x,p.y,this.#L.size.width,this.#L.size.height)})}#G(t){for(const e of this.#A)e.afterDraw?.(t)}#q(t,e,i,s,n,a){for(const o of this.#U){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)ks(a,t,e)}o.beforeDraw?.(e)}}#Z(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#J(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#j(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(c),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?l.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#J(y,m),this.#tt(v,m),this.#et(v,m),this.#it(v,m),this.#Z(y,m),i.resetTransform()}#X(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#et(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}#it(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#tt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#N(t){return this.#B[t]}#W(t){let e,i;for(const s of this.#D)if(!e&&s.particleFillColor&&(e=Ge(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ge(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#V[0]=e,this.#V[1]=i,this.#V}#st(t){const e=[[qt.BackgroundMask,!!t.canvasPaint],[qt.CanvasSetup,!!t.drawSettingsSetup],[qt.PluginContent,!!t.draw],[qt.CanvasCleanup,!!(t.clearDraw??t.drawSettingsCleanup)]];for(const[i,s]of e)s&&this.#B[i].push(t)}#K(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#D.push(t),t.drawParticle&&this.#T.push(t),t.drawParticleSetup&&this.#F.push(t),t.drawParticleCleanup&&this.#R.push(t),t.canvasClear&&this.#O.push(t),this.#st(t)}#nt(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}#Q(){const t=this.#u.actualOptions.background;if(this.#S=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e&&this.#nt(e)?this.#S=e:e?this.#Y("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#Y("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#nt(t.element)&&(this.#S=t.element)}#Y(t,e){this.#I.has(t)||(this.#I.add(t),n().warning(e))}}const Ss=new WeakMap;function Is(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 Os{domElement;render;renderCanvas;size;zoom=1;#u;#at;#ot;#rt;#ct;#p;#lt;#ht;#dt;#ut;constructor(t,e){this.#p=t,this.#u=e,this.render=new Cs(t,e,this),this.#dt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#dt;this.size={height:s.height*i,width:s.width*i},this.#at=!1,this.#ht=[],this.#lt="none"}get#pt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#at){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ft();this.render.destroy(),this.#ht=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#ut?this.#ut:{x:e*d/t,y:i*d/t}}init(){this.#gt(t=>{t.disconnect()}),this.#rt=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#mt()}),this.resize(),this.#yt(),this.#gt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#vt(),this.initBackground(),this.#wt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=qe(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=Qe(n,t.hdr,e.opacity,i.peakNits,F(Ft,i.mode,Ft.standard))}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#ht=[];for(const t of this.#u.plugins)t.resize&&this.#ht.push(t)}loadCanvas(t){this.#at&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#at=!!e&&"true"===e.dataset[o],this.renderCanvas=e?(t=>{const e=Ss.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(dt(ot));try{const e=t.transferControlToOffscreen();return Ss.set(t,e),e}catch{throw new TypeError(dt(rt))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#ct=function(t){const e=gt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||U(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(i.style));const s=this.#dt,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const a=this.#u.retina.pixelRatio,r=this.size;n.height=r.height=s.height*a,n.width=r.width=s.width*a}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#dt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#lt=t,this.#mt())}setZoom(t,e){this.zoom=t,this.#ut=e}stop(){this.#gt(t=>{t.disconnect()}),this.#rt=void 0,this.#Pt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#bt(),e&&await t.refresh()}#bt(){for(const t of this.#ht)t.resize?.()}#vt(){const t=this.#u,e=t.actualOptions.hdr.enable&&mt("(color-gamut: p3)")?.matches&&mt("(dynamic-range: high)")?.matches;t.hdrMode=F(Ft,t.actualOptions.hdr.mode,Ft.standard),t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return void(t.hdr=e??!1);let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{s=i.getContext("2d",t)}catch{s=null}}if(this.render.setContext(s),s){const e=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(s);void 0!==e&&(t.hdr="display-p3"===e)}}#wt(){this.#Pt();const t=mt("(color-gamut: p3)"),e=mt("(dynamic-range: high)"),i=()=>{this.#vt(),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.#ot=s}#yt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#pt?this.#xt():this.#ft();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")}}}#Pt(){if(this.#ot){for(const{handler:t,mql:e}of this.#ot)e.removeEventListener("change",t);this.#ot=void 0}}#mt(){const t=this.domElement;if(!t)return;this.#gt(t=>{t.disconnect()}),this.#yt(),this.initBackground();const e=this.#lt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#gt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ft(){const t=this.domElement,e=this.#ct;t&&e&&Is(t,e,!0)}#gt(t){this.#rt&&t(this.#rt)}#xt(){const t=this.domElement;t&&Is(t,function(t){if(kt!==t||!Ct){kt=t;const e=gt().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)}Ct=e}return Ct}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ls{#u;#Mt;#zt;#kt;constructor(t){this.#u=t,this.#Mt={visibilityChange:()=>{this.#Ct()},resize:()=>{this.#St()}}}addListeners(){this.#It(!0)}removeListeners(){this.#It(!1)}#Ct(){const t=this.#u;t.actualOptions.pauseOnBlur&&(gt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#St(){this.#kt&&(clearTimeout(this.#kt),this.#kt=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#kt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*u)}#It(t){const e=this.#Mt;this.#Ot(t),St(document,l,e.visibilityChange,t,!1)}#Ot(t){const e=this.#Mt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void St(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#zt&&!t?(s&&this.#zt.unobserve(s),this.#zt.disconnect(),this.#zt=void 0):!this.#zt&&t&&s&&(this.#zt=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#St()}),this.#zt.observe(s))}}function Ds(t){if(!yt(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 _s(t,e){const i=t%e;return i<0?i+e:i}function Es(t,e,i,s){const n=Re(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=Mt(n.effect.type,t.id,a),t.shape=Mt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=Mt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=Mt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===v){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(W()*i.length)]}if(t.shape===v){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(W()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return bt({close:e.close},Mt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return bt({close:e.close},Mt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const c=t.effectData,l=t.shapeData;return c&&n.load(c.particles),l&&n.load(l.particles),t.effectClose=c?.close??n.effect.close,t.shapeClose=l?.close??n.shape.close,n}class Ts{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;#Lt={fillOpacity:1,opacity:1,strokeOpacity:1};#Dt=L.origin;#_t={sin:0,cos:0};#Et={a:1,b:0,c:0,d:1};#u;#Tt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Tt.push(t),this.#Tt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Tt.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(_t.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Rt(this.#Ft(Ze(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*d}getModifier(t){return this.#Tt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=X(this.opacity?.value??1),s=this.#Ft(void 0,t=>t.opacity)??i;return this.#Lt.fillOpacity=this.fillOpacity??1,this.#Lt.opacity=s*e,this.#Lt.strokeOpacity=this.strokeOpacity??1,this.#Lt}getPosition(){return this.#Dt.x=this.position.x+this.offset.x,this.#Dt.y=this.position.y+this.offset.y,this.#Dt.z=this.position.z,this.#Dt}getRadius(){return this.#Ft(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#_t.sin=Math.sin(t),this.#_t.cos=Math.cos(t),this.#_t}getStrokeColor(){return this.#Rt(this.#Ft(Ze(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Et.a=e.cos*(t.a??f),this.#Et.b=i?e.sin*(t.b??1):t.b??g,this.#Et.c=i?-e.sin*(t.c??1):t.c??m,this.#Et.d=e.cos*(t.d??y),this.#Et}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=$t.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Es(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Bt(e),this.initialVelocity=this.#At(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#Ut({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Ut({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=_s(t,w);return e>=Math.PI*d&&e<3*Math.PI*d}if(this.roll.horizontal){const e=_s(t+Math.PI*d,w);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=_s(t,w);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Tt.findIndex(e=>e.id===t);e>=0&&this.#Tt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ft(t,e){let i=t;for(const t of this.#Tt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Ht(t,e){let i=0,s=t?L.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return L.create(i.x,i.y,e)}const t=et({size:c,position:s}),l=L.create(t.x,t.y,e);this.#Vt(l,r,o.left??o.default),this.#Vt(l,r,o.right??o.default),this.#$t(l,r,o.top??o.default),this.#$t(l,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,s=void 0}}#At(){const t=this.options.move,e=function(t){const e=D.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===a.inside||t.direction===a.outside)return e;const i=tt(X(t.angle.value)),s=tt(X(t.angle.offset)),n={left:s-i*d,right:s+i*d};return t.straight||(e.angle+=G(K(n.left,n.right))),t.random&&"number"==typeof t.speed&&(e.length*=W()),e}#Vt(t,e,i){Ds({outMode:i,checkModes:[At.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#$t(t,e,i){Ds({outMode:i,checkModes:[At.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Nt(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===At.bounce;return t===ut.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===ut.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===ut.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===ut.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#Wt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Ut(t){const e=this.#Nt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Wt(t.direction,t.outMode),c=a?this.#qt(a(r),"shape"):void 0,l=o?this.#qt(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#Rt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Ut.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Bt(t){const e=this.#u,i=Math.floor(X(this.options.zIndex.value)),s=this.#Ht(t,j(i,0,e.zLayers));if(!s)throw new Error(dt(nt));this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...zt(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(T(t))return tt(t);switch(t){case a.top:return-Math.PI*d;case a.topRight:return-Math.PI*S;case a.right:return 0;case a.bottomRight:return Math.PI*S;case a.bottom:return Math.PI*d;case a.bottomLeft:return.75*Math.PI;case a.left:return Math.PI;case a.topLeft:return.75*-Math.PI;case a.inside:return Math.atan2(i.y-e.y,i.x-e.x);case a.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return W()*w}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case a.inside:this.outType=$t.inside;break;case a.outside:this.outType=$t.outside}this.offset=D.origin}#qt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Rs{#jt;#Gt=new Map;#Xt=[];#Yt;#Qt;#Kt=[];#Zt;constructor(t){this.#jt=t,this.#Yt=0,this.#Zt=0}get cellSize(){return this.#jt}set cellSize(t){this.#Qt=t}clear(){this.#Gt.clear();const t=this.#Qt;t&&(this.#jt=t),this.#Qt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Jt(e,i);this.#Gt.has(s)||this.#Gt.set(s,[]),this.#Gt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#te(t);if(!s)return i;const n=Math.floor(s.minX/this.#jt),a=Math.floor(s.maxX/this.#jt),o=Math.floor(s.minY/this.#jt),r=Math.floor(s.maxY/this.#jt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++)this.#ee(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#ie(t.x,t.y,e),a=this.query(n,i,s);return this.#se(),a}queryRectangle(t,e,i,s=[]){const n=this.#ne(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#se(),a}#ie(t,e,i){const s=this.#Yt++;let n=this.#Xt[s];return n||(n=new Yt(t,e,i),this.#Xt[s]=n),n.reset(t,e,i)}#ne(t,e,i,s){const n=this.#Zt++;let a=this.#Kt[n];return a||(a=new Qt(t,e,i,s),this.#Kt[n]=a),a.reset(t,e,i,s)}#Jt(t,e){return`${Math.floor(t/this.#jt)}_${Math.floor(e/this.#jt)}`}#te(t){if(t instanceof Yt){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 Qt){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}#ee(t,e,i,s,n){const a=this.#Gt.get(`${t}_${e}`);if(a)for(const t of a)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}#se(){this.#Yt=0,this.#Zt=0}}class Fs{checkParticlePositionPlugins;#ae;#u;#oe;#re;#ce;#le;#he;#de;#ue;#p;#pe;#fe;#ge;#me;#ye;#ve;constructor(t,e){this.#p=t,this.#u=e,this.#le=0,this.#ae=[],this.#pe=[],this.#ce=0,this.#re=new Map,this.#he=new Map,this.#ve=this.#we(this.#u.zLayers),this.#oe=new Rs(100),this.checkParticlePositionPlugins=[],this.#de=[],this.#ue=[],this.#ge=[],this.#fe=[],this.#ye=[]}get count(){return this.#ae.length}get grid(){return this.#oe}addParticle(t,e,i,s){if(!this.#Pe(i,this.count))try{const n=this.#pe.pop()??new Ts(this.#p,this.#u);n.init(this.#le,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#ae.push(n),this.#be(n),this.#le++,this.#u.dispatchEvent(_t.particleAdded,{particle:n}),n):void this.#pe.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#ae=[],this.#he.clear(),this.#xe(this.#u.zLayers)}destroy(){this.#ae=[],this.#pe.length=0,this.#he.clear(),this.#ve=[],this.checkParticlePositionPlugins=[],this.#de=[],this.#ue=[],this.#ge=[],this.#fe=[],this.#ye=[]}drawParticles(t){for(let e=this.#ve.length-1;e>=0;e--){const i=this.#ve[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#ae.filter(t)}find(t){return this.#ae.find(t)}get(t){return this.#ae[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#ye=[],this.#ue=[],this.#ge=[],this.#de=[],this.#fe=[],this.#he.clear(),this.#xe(t.zLayers),this.#oe=new Rs(100*t.retina.pixelRatio),this.#Me(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#Me(Re(this.#p,this.#u,i),t,i)}await this.#ze()}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#ae.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let a=0;for(let o=t;a<e&&o<this.count;o++)this.#ke(o,i,s,n)&&(o--,a++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Re(this.#p,this.#u,s);this.#Ce(n,i,t)}this.#Ce(t.particles,i)}setResizeFactor(t){this.#me=t}update(t){this.#oe.clear();for(const e of this.#ye)e.update?.(t);const e=this.#Se(t);for(const e of this.#ge)e.postUpdate?.(t);if(this.#Ie(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#me=void 0}#Oe(...t){this.#pe.push(...t)}#Ce(t,e,i,s){const n=t.number;if(!n.density.enable)return void this.#Me(t,i,s);const a=this.#Le(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#ce=n.limit.value*a:this.#re.set(i,{limit:n.limit.value*a,mode:F(Bt,n.limit.mode,Bt.delete)}),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#Me(t,e,i){if(void 0===e){this.#ce=t.number.limit.value;const e=this.#u.actualOptions.particles.groups;for(const t of this.#re.keys())t in e||this.#re.delete(t)}else{const s=i?.number?.limit?.value??t.number.limit.value;s>0?this.#re.set(e,{limit:s,mode:F(Bt,i?.number?.limit?.mode??t.number.limit.mode,Bt.delete)}):this.#re.delete(e)}}#Pe(t,e){const i=this.#ce,s=this.#u.actualOptions.particles.number.limit.mode;if(i>0&&s===Bt.wait&&e>=i)return!0;const n=void 0===t?void 0:this.#re.get(t);if(n&&n.limit>0&&n.mode===Bt.wait){if(this.filter(e=>e.group===t).length>=n.limit)return!0}if(n&&n.limit>0&&n.mode===Bt.delete){const e=this.filter(e=>e.group===t).length+1-n.limit;e>0&&this.removeQuantity(e,t)}if(i>0&&s===Bt.delete){const t=this.count+1-i;t>0&&this.#De(t)}return!1}#we(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#_e(t){const e=this.#ve.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Le(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1}async#Ee(){const t=this.#u;await t.initDrawersAndUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#ze(){await this.#Te(),await this.#Ee();let t=!1;const e=this.#u;for(const i of e.plugins)if(t=i.particlesInitialization?.()??t,t)break;if(t)return;const i=e.actualOptions.particles,s=i.groups;for(const t in s){const e=s[t];if(e)for(let s=this.count,n=0;n<e.number.value&&s<i.number.value;s++,n++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#Te(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ye.push(e),e.particleUpdate&&this.#ue.push(e),e.postUpdate&&this.#ge.push(e),e.particleReset&&this.#de.push(e),e.postParticleUpdate&&this.#fe.push(e)}#be(t){const e=this.#_e(t.position.z),i=this.#ve[e];i&&(i.push(t),this.#he.set(t.id,e))}#De(t){this.removeAt(0,t,void 0,void 0,!1)}#ke(t,e,i,s=!0){const n=this.#ae[t];return!!n&&((!s||n.group===e)&&(this.#ae.splice(t,1),this.#Re(n),n.destroy(i),this.#u.dispatchEvent(_t.particleRemoved,{particle:n}),this.#Oe(n),!0))}#Re(t){const e=this.#he.get(t.id)??this.#_e(t.position.z),i=this.#ve[e];if(!i)return void this.#he.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#he.delete(t.id)}#xe(t){const e=Math.max(Math.floor(t),1);if(this.#ve.length===e)for(const t of this.#ve)t.length=0;else this.#ve=this.#we(e)}#Fe(t){const e=this.#_e(t.position.z),i=this.#he.get(t.id);if(void 0===i)return void this.#be(t);if(i===e)return;const s=this.#ve[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ve[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.#he.set(t.id,e)}else this.#he.set(t.id,e)}#Se(t){const e=new Set,i=this.#me;for(const s of this.#ae){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.#de)t.particleReset?.(s);for(const e of this.#ue){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#oe.insert(s)}return e}#Ie(t,e){for(const i of this.#ae)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#fe)e.postParticleUpdate?.(i,t);this.#Fe(i)}}}class Bs{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=X(s.gravity.maxSpeed)*i,a.moveDrift=X(s.drift)*i,a.moveSpeed=X(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function As(t){return!t.destroyed}function Us(t,e,...i){const s=new Fe(t,e);return ie(s,...i),s}var Hs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#k;#Be;#Ae={value:0,factor:0};#Ue;#He;#Ve;#$e;#Ne;#We;#qe;#je;#Ge;#Xe;#Ye;#p;#Qe;#Ke;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#Ue=e,this.#Ge=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=Ft.standard,this.peakNits=400,this.#Qe=!1,this.#k=0,this.#Ve=0,this.#je=0,this.#Ne=!0,this.started=!1,this.destroyed=!1,this.#Ye=!0,this.#qe=0,this.zLayers=100,this.pageHidden=!1,this.#Ke=a,this.#We=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Bs(this),this.canvas=new Os(this.#p,this),this.particles=new Fs(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Xe=Us(this.#p,this),this.actualOptions=Us(this.#p,this),this.#$e=new Ls(this),this.dispatchEvent(_t.containerBuilt)}get animationStatus(){return!this.#Ye&&!this.pageHidden&&As(this)}get options(){return this.#Xe}get sourceOptions(){return this.#Ke}addLifeTime(t){this.#je+=t}alive(){return!this.#Ve||this.#je<=this.#Ve}destroy(t=!0){if(As(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.destroyed=!0,this.#Ge(t),this.dispatchEvent(_t.containerDestroyed)}}dispatchEvent(t,e){this.#Ue(t,{container:this,data:e})}draw(t){if(!As(this))return;let e=t;this.#He=$(t=>{e&&(this.#qe=void 0,e=!1),this.#Ze(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}n().error(`Export plugin with type ${t} not found`)}async init(){if(!As(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Xe=Us(this.#p,this,this.#We,this.sourceOptions),this.actualOptions=Us(this.#p,this,this.#Xe),this.#ze(t),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,smooth:n,zLayers:a}=this.actualOptions,o=this.actualOptions.hdr;this.hdrMode=F(Ft,o.mode,Ft.standard),this.peakNits=o.peakNits,this.zLayers=a,this.#Ve=X(i)*u,this.#k=X(e)*u,this.#je=0,this.fpsLimit=s>0?s:120,this.#Qe=n;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(_t.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(_t.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await Ot(this,t.initializers.effects),this.shapeDrawers=await Ot(this,t.initializers.shapes),this.particleUpdaters=await It(this,t.initializers.updaters)}pause(){var t;if(As(this)&&(void 0!==this.#He&&(t=this.#He,N(t),this.#He=void 0),!this.#Ye)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Ye=!0),this.dispatchEvent(_t.containerPaused)}}play(t){if(!As(this))return;const e=this.#Ye||t;if(!this.#Ne||this.actualOptions.autoPlay){if(this.#Ye&&(this.#Ye=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(_t.containerPlay),this.draw(e??!1)}else this.#Ne=!1}async refresh(){if(As(this))return this.stop(),this.start()}async reset(t){if(As(this))return this.#We=t,this.#Ke=t,this.#Xe=Us(this.#p,this,this.#We,this.sourceOptions),this.actualOptions=Us(this.#p,this,this.#Xe),this.refresh()}async start(){As(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#$e.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(_t.containerStarted),this.play(),t()};this.#Be=setTimeout(()=>{e()},this.#k)}))}stop(){if(As(this)&&this.started){this.#Be&&(clearTimeout(this.#Be),this.#Be=void 0),this.#Ne=!0,this.started=!1,this.#$e.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.#Ke=this.#Xe,this.dispatchEvent(_t.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ze(t){this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i))}#Ze(t){try{if(!this.#Qe&&void 0!==this.#qe&&t<this.#qe+u/this.fpsLimit)return void this.draw(!1);if(this.#qe??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/u}(this.#Ae,t-this.#qe,this.fpsLimit,this.#Qe),this.addLifeTime(this.#Ae.value),this.#qe=t,this.#Ae.value>u)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Ae),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});var Vs=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=qt.CanvasSetup;#u;#Je;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??c,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Je&&(t.globalCompositeOperation=this.#Je)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Je=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function $s(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=j(t.velocity.x,-1,1),t.velocity.y=j(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=c*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function Ns(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(c=a,l=n,Math.sqrt(J(c,l))),r=X(i.acceleration);var c,l;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?Tt.clockwise:Tt.counterClockwise,angle:W()*w,radius:o,acceleration:e.retina.spinAcceleration}}var Ws=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-X(e.decay),t.pathDelay=X(s.delay.value)*u,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:X(i.acceleration),inverse:i.inverse},Ns(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,n=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(t),a=s.retina.reduceFactor,o=t.retina.moveSpeed,r=t.retina.moveDrift,c=t.size.max,l=o*(i.size?t.getRadius()/c:1)*n*(e.factor||1)*d,h=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const n=e.spin.direction===Tt.clockwise,a={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*a.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*a.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const o=Math.max(t.canvas.size.width,t.canvas.size.height),r=o*d;e.spin.radius>r?(e.spin.radius=r,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/o)}(s,t,l,a):$s(t,i,l,h,r,a,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=Z(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:o}=t.retina,r=o.horizontal,c=o.vertical;if(!r&&!c)return;if((r&&n>=r||c&&a>=c)&&!t.misplaced)t.misplaced=!!r&&n>r||!!c&&a>c,r&&(t.velocity.x=t.velocity.y*d-t.velocity.x),c&&(t.velocity.y=t.velocity.x*d-t.velocity.y);else if((!r||n<r)&&(!c||a<c)&&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*=-W()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-W())}}(t)}preInit(){return this.#ti()}redrawInit(){return this.#ti()}update(){for(const t of this.pathGenerators.values())t.update()}async#ti(){const t=this.#p;if(t.initializers.pathGenerators){this.availablePathGenerators=await Ot(this.#u,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class qs{#ei=!0;#ii;#u;#Mt;#si;#ni;constructor(t,e){this.#u=t,this.#ii=[],this.#si=e,this.#ni=new Map,this.#Mt={mouseDown:()=>{this.#ai()},mouseLeave:()=>{this.#oi()},mouseMove:t=>{this.#ri(t)},mouseUp:t=>{this.#ci(t)},touchStart:t=>{this.#li(t)},touchMove:t=>{this.#ri(t)},touchEnd:t=>{this.#hi(t)},touchCancel:t=>{this.#hi(t)},touchEndClick:t=>{this.#di(t)},visibilityChange:()=>{this.#Ct()}}}addListeners(){this.#It(!0)}init(){this.#ii.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#ii.push(t)}removeListeners(){this.#It(!1)}#ui(t){const e=this.#u,i=this.#si,s=e.actualOptions;if(this.#ei){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;xt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#oi()},500)}#Ct(){this.#oi()}#pi(t){const e=this.#Mt,i=this.#u,s=this.#si,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),St(a,as,e.mouseMove,t),St(a,os,e.touchStart,t),St(a,cs,e.touchMove,t),St(a,rs,n.interactivity?.events.onClick.enable?e.touchEndClick:e.touchEnd,t),St(a,"pointerup",e.mouseUp,t),St(a,"pointerdown",e.mouseDown,t),St(a,ns,e.mouseLeave,t),St(a,ls,e.touchCancel,t)}#It(t){const e=this.#Mt,i=this.#u,s=this.#si,n=i.actualOptions,a=n.interactivity?.detectsOn,o=i.canvas.domElement;a===Yi.window?s.interactivityData.element=gt():a===Yi.parent&&o?s.interactivityData.element=o.parentElement??o.parentNode:s.interactivityData.element=o,this.#pi(t),St(document,l,e.visibilityChange,t,!1)}#ai(){const{interactivityData:t}=this.#si,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#ci(t){const e=this.#u,i=this.#si,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;const a=n.position;if(a&&s.interactivity?.events.onClick.enable){let e=!1;for(const t of this.#ii)if(e=t.clickPositionValid?.(a)??!1,e)break;e||this.#ui(t)}n.clicking=!1}#oi(){const{interactivityData:t}=this.#si,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=ns,e.inside=!1,e.clicking=!1}#ri(t){const e=this.#u,i=this.#si,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#ei=!0;const e=t;if(n.element===gt()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Yi.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#ei="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=as}#hi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ni.delete(t.identifier);this.#oi()}#di(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ni.delete(t.identifier);this.#ci(t)}#li(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ni.set(t.identifier,performance.now());this.#ri(t);const{mouse:s}=this.#si.interactivityData;s.clicking=!0,s.downPosition=s.position}}class js{interactivityData;interactors;#fi;#u;#$e;#gi;#mi;#yi;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactors=[],this.#gi=[],this.#yi=[],this.#fi=new Map,this.#$e=new qs(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#mi=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#vi(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#fi.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#fi.set(os,()=>{e.destroyed||(a=!0,o=!1)}),this.#fi.set(cs,()=>{e.destroyed||(o=!0)}),this.#fi.set(rs,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#fi.set(ls,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#fi)s.addEventListener(t,e)}addListeners(){this.#$e.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#fi)e.element?.removeEventListener(t,i);this.#fi.clear()}}externalInteract(t){for(const e of this.#gi){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#gi)i.handleClickMode?.(t,e)}init(){this.#$e.init();for(const t of this.interactors){switch(t.type){case Qi.external:this.#gi.push(t);break;case Qi.particles:this.#yi.push(t)}t.init()}}async initInteractors(){const t=this.#p;t.initializers.interactors&&(this.interactors=await It(this.#u,t.initializers.interactors),this.#gi=[],this.#yi=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#gi)i.clear(t,e);for(const s of this.#yi)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#$e.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#gi)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#yi)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#mi&&this.#mi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#mi&&this.#mi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.cellSize=t*e.retina.pixelRatio}#vi(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var Gs=Object.freeze({__proto__:null,InteractivityPluginInstance:class{#u;constructor(t,e){e.addClickHandler=t=>{e.interactionManager?.addClickHandler(t)},e.interactionManager=new js(t,e),this.#u=e}addClickHandler(t){this.#u.interactionManager?.addClickHandler(t)}clearClickHandlers(){this.#u.interactionManager?.clearClickHandlers()}destroy(){this.clearClickHandlers()}particleCreated(t){const e=t,i=this.#u,s=new es(i);s.load(i.actualOptions.interactivity),s.load(e.options.interactivity),e.interactivity=s}particleReset(t){this.#u.interactionManager?.reset(t)}postParticleUpdate(t,e){this.#u.interactionManager?.particlesInteract(t,e)}postUpdate(t){const e=this.#u;e.interactionManager?.externalInteract(t),e.interactionManager?.updateMaxDistance()}async preInit(){const t=this.#u;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}async redrawInit(){const t=this.#u;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}start(){const t=this.#u;return t.interactionManager?.addListeners(),t.interactionManager?.startObserving(),Promise.resolve()}stop(){this.#u.interactionManager?.removeListeners(),this.#u.interactionManager?.stopObserving()}}});t.loadFireflyPreset=Ms,t.tsParticles=si}(t.__tsParticlesInternals.presets.firefly=t.__tsParticlesInternals.presets.firefly||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadFireflyPreset:(globalThis.__tsParticlesInternals.presets.firefly||{}).loadFireflyPreset});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
+
(function (g) {
|
|
3
|
+
/* Preset v4.5.0 */
|
|
4
|
+
g.__tsParticlesInternals = g.__tsParticlesInternals || {};
|
|
5
|
+
g.__tsParticlesInternals.presets = g.__tsParticlesInternals.presets || {};
|
|
6
|
+
(function (exports, basic, interactionExternalTrail, pluginInteractivity, updaterLife) {
|
|
7
|
+
'use strict';
|
|
8
8
|
|
|
9
9
|
const options = {
|
|
10
10
|
fullScreen: {
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
|
|
92
92
|
exports.loadFireflyPreset = loadFireflyPreset;
|
|
93
93
|
|
|
94
|
-
}));
|
|
94
|
+
})(g.__tsParticlesInternals.presets.firefly = g.__tsParticlesInternals.presets.firefly || {}, g.__tsParticlesInternals.bundles.basic, g.__tsParticlesInternals.interactions.externalTrail, g.__tsParticlesInternals.plugins.interactivity, g.__tsParticlesInternals.updaters.life);
|
|
95
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : self);
|
|
96
|
+
|
|
95
97
|
Object.assign(globalThis.window || globalThis, { loadFireflyPreset: (globalThis.__tsParticlesInternals.presets.firefly || {}).loadFireflyPreset });
|
|
96
|
-
delete (globalThis.window || globalThis).tsparticlesInternalExports;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(
|
|
1
|
+
!function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.bundles=s.__tsParticlesInternals.bundles||{},s.__tsParticlesInternals.effects=s.__tsParticlesInternals.effects||{},s.__tsParticlesInternals.engine=s.__tsParticlesInternals.engine||{},s.__tsParticlesInternals.interactions=s.__tsParticlesInternals.interactions||{},s.__tsParticlesInternals.palettes=s.__tsParticlesInternals.palettes||{},s.__tsParticlesInternals.paths=s.__tsParticlesInternals.paths||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins.emittersShapes=s.__tsParticlesInternals.plugins.emittersShapes||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.updaters=s.__tsParticlesInternals.updaters||{},s.__tsParticlesInternals.utils=s.__tsParticlesInternals.utils||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas.utils=s.__tsParticlesInternals.canvas.utils||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path.utils=s.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(s){return new Proxy(s,{get:function(s,t){return t in s||(s[t]={}),s[t]}})}:function(s){return s};s.__tsParticlesInternals.bundles=t(s.__tsParticlesInternals.bundles),s.__tsParticlesInternals.effects=t(s.__tsParticlesInternals.effects),s.__tsParticlesInternals.interactions=t(s.__tsParticlesInternals.interactions),s.__tsParticlesInternals.palettes=t(s.__tsParticlesInternals.palettes),s.__tsParticlesInternals.paths=t(s.__tsParticlesInternals.paths),s.__tsParticlesInternals.plugins=t(s.__tsParticlesInternals.plugins),s.__tsParticlesInternals.plugins.emittersShapes=t(s.__tsParticlesInternals.plugins.emittersShapes),s.__tsParticlesInternals.presets=t(s.__tsParticlesInternals.presets),s.__tsParticlesInternals.shapes=t(s.__tsParticlesInternals.shapes),s.__tsParticlesInternals.updaters=t(s.__tsParticlesInternals.updaters),s.__tsParticlesInternals.utils=t(s.__tsParticlesInternals.utils),s.__tsParticlesInternals.canvas=t(s.__tsParticlesInternals.canvas),s.__tsParticlesInternals.path=t(s.__tsParticlesInternals.path)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},function(s,t,e,a,n){"use strict";const l={fullScreen:{enable:!0,zIndex:-1},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:"#fff"},enable:!0}},life:{duration:{value:5,sync:!1},count:1},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:3}},size:{value:{min:3,max:6}},move:{enable:!0,speed:3,size:!0}},interactivity:{events:{onHover:{enable:!0,mode:"trail"}},modes:{trail:{delay:.5,pauseOnStop:!0,quantity:4}}},background:{color:"#000"}};async function r(s){await s.pluginManager.register(async s=>{await Promise.all([t.loadBasic(s),n.loadLifeUpdater(s),(async()=>{await a.loadInteractivityPlugin(s),await e.loadExternalTrailInteraction(s)})()]),s.pluginManager.addPreset("firefly",l)})}const i=globalThis;i.__tsParticlesInternals=i.__tsParticlesInternals??{},i.loadFireflyPreset=r,s.loadFireflyPreset=r}(s.__tsParticlesInternals.presets.firefly=s.__tsParticlesInternals.presets.firefly||{},s.__tsParticlesInternals.bundles.basic,s.__tsParticlesInternals.interactions.externalTrail,s.__tsParticlesInternals.plugins.interactivity,s.__tsParticlesInternals.updaters.life)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadFireflyPreset:(globalThis.__tsParticlesInternals.presets.firefly||{}).loadFireflyPreset});
|