UNPKG

tsparticles

Version:

Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

1 lines 211 kB
!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.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.full=t.__tsParticlesInternals.bundles.full||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",o=100,a=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,b=100,w=.25,x=.75;var P;function M(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class k{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return k.create(c.x,c.y,c.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 k.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new k(t,e??c.y,i??c.z):new k(t.x,t.y,M(t))}add(t){return k.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return k.clone(this)}div(t){return k.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return k.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 k.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return k.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends k{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return C.create(c.x,c.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??c.y):new C(t.x,t.y)}}function O(t){return"boolean"==typeof t}function D(t){return"string"==typeof t}function S(t){return"number"==typeof t}function z(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const E=Math.PI/180;let R=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return V(R(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function L(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function U(t){const e=j(t);let i=W(t);return e===i&&(i=0),F(i,e)}function H(t){return S(t)?t:U(t)}function W(t){return S(t)?t:t.min}function j(t){return S(t)?t:t.max}function $(t,e){if(t===e||void 0===e&&S(t))return t;const i=W(t),s=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:$(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(N(t,e))}function X(t,e,i){return N(t,e)<=i*i}function Y(t){return t*E}function K(e,i,s){if(S(e))return Y(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return A()*u}}function Z(t){const e=C.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return C.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??A()*o)*t.size.width/o,y:(t.position?.y??A()*o)*t.size.height/o}}function et(t){const e={x:void 0!==t.position?.x?H(t.position.x):void 0,y:void 0!==t.position?.y?H(t.position.y):void 0};return tt({size:t.size,position:e})}function it(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var nt,ot,at,rt,ct,lt;t.AnimationMode=void 0,(nt=t.AnimationMode||(t.AnimationMode={})).auto="auto",nt.increase="increase",nt.decrease="decrease",nt.random="random",t.AnimationStatus=void 0,(ot=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",ot.decreasing="decreasing",t.DestroyType=void 0,(at=t.DestroyType||(t.DestroyType={})).none="none",at.max="max",at.min="min",t.OutModeDirection=void 0,(rt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",rt.left="left",rt.right="right",rt.top="top",t.PixelMode=void 0,(ct=t.PixelMode||(t.PixelMode={})).precise="precise",ct.percent="percent",t.StartValueType=void 0,(lt=t.StartValueType||(t.StartValueType={})).max="max",lt.min="min",lt.random="random";function ht(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,o=e?.keyFn,a=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>a(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${a(t[i],e)}`).join(",")}}`},r=t=>o?o(t):(t=>a(t))(t);return(...e)=>{const o=r(e),a=Date.now(),c=i.get(o);if(void 0!==c){if(!(n&&a-c.ts>n))return i.delete(o),i.set(o,{value:c.value,ts:c.ts}),c.value;i.delete(o)}const l=t(...e);return i.set(o,{value:l,ts:a}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),l}}function dt(){return"undefined"!=typeof matchMedia}function ut(){return globalThis.document}function pt(t){if(dt())return matchMedia(t)}function gt(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function ft(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function yt(t,e){return t===e||I(e)&&e.includes(t)}function mt(t){return Math.floor(A()*t.length)}function vt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:mt(t)]}function bt(t,e,i,s,n){return wt(xt(t,s??0),e,i,n)}function wt(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function xt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Pt(t,...e){for(const i of e){if(T(i))continue;if(!z(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):z(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return z(e)||Array.isArray(e)})){const n=i,o=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(o[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,o=i[n];e[n]=Array.isArray(o)?o.map(t=>Pt(void 0,t)):Pt(e[n],o)}}return t}function Mt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:C.create(H(t.options.bounce.horizontal.value),H(t.options.bounce.vertical.value))}}function kt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=G(o,n);if(i*a+s*r<0)return;const c=-Math.atan2(r,a),l=t.mass,h=e.mass,d=t.velocity.rotate(c),u=e.velocity.rotate(c),p=J(d,u,l,h),g=J(u,d,l,h),f=p.rotate(-c),y=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function Ct(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Ot(t,e,i){return I(t)?vt(t,e,i):t}function Dt(t,e){if(I(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function St(e,i){const s=e.value,n=e.animation,o={delayTime:H(n.delay)*r,enable:n.enable,value:H(e.value)*i,max:j(s)*i,min:W(s)*i,loops:0,maxLoops:H(n.count),time:0};if(n.enable){switch(o.decay=1-H(n.decay),n.mode){case t.AnimationMode.increase:o.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:o.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:o.status=A()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=U(o),e&&(o.status=A()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function zt(e,i){if(!(e.mode===t.PixelMode.percent)){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}function It(t,e){return zt(t,e)}function Tt(t,e){return zt(t,e)}function Et(e,i,s,n,o){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const a=(i.velocity??0)*o.factor,r=i.min,c=i.max,l=i.decay??1;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=o.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case t.AnimationStatus.increasing:i.value+=a;break;case t.AnimationStatus.decreasing:i.value-=a}switch(i.velocity&&1!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(s?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,s,n,o){switch(i){case t.DestroyType.max:s>=o&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,c),e.destroyed||(i.value=V(i.value,r,c))}}function Rt(t){const e=ut().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}const _t=ht(function(t){const e=ut().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function At(t,e,i,s,n){if(s){let s={passive:!0};O(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 Ft(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 Lt(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 Bt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Vt;t.EventType=void 0,(Vt=t.EventType||(t.EventType={})).configAdded="configAdded",Vt.containerInit="containerInit",Vt.particlesSetup="particlesSetup",Vt.containerStarted="containerStarted",Vt.containerStopped="containerStopped",Vt.containerDestroyed="containerDestroyed",Vt.containerPaused="containerPaused",Vt.containerPlay="containerPlay",Vt.containerBuilt="containerBuilt",Vt.particleAdded="particleAdded",Vt.particleDestroyed="particleDestroyed",Vt.particleRemoved="particleRemoved";class qt{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;#o=new Set;#a=!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(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.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 Lt(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 Lt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ft(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#o,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)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.#o,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 Ut=t=>(...e)=>{t(...e)},Ht={debug:Ut(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Ut(console.info),log:Ut(console.log),trace:Ut(console.trace),verbose:Ut(console.log),warning:Ut(console.warn)};function Wt(){return Ht}const jt="100%";class $t{pluginManager=new qt(this);#h=[];#d=new Bt;#a=!1;get items(){return this.#h}get version(){return"4.1.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.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return jr}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=Ot(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:a,index:o}):t.options,c=Ot(r,o),{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=ut();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=jt,s.style.height||=jt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=jt,s.style.height||=jt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ut();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Gt,Nt,Qt,Xt,Yt,Kt,Zt,Jt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Gt||(Gt={}));class te{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 ee extends te{radius;constructor(t,e,i){super(t,e,Gt.circle),this.radius=i}contains(t){return X(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof ee||t.type===Gt.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof ie||t.type===Gt.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(n-i,2)+Math.pow(o-a,2)<=s**2||n<=s+i&&o<=s+a||n<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class ie extends te{size;constructor(t,e,i,s){super(t,e,Gt.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 ee)return t.intersects(this);if(!(t instanceof ie))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(Nt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Nt.counterClockwise="counter-clockwise",Nt.random="random",t.LimitMode=void 0,(Qt=t.LimitMode||(t.LimitMode={})).delete="delete",Qt.wait="wait",t.OutMode=void 0,(Xt=t.OutMode||(t.OutMode={})).bounce="bounce",Xt.none="none",Xt.out="out",Xt.destroy="destroy",Xt.split="split",t.AlterType=void 0,(Yt=t.AlterType||(t.AlterType={})).darken="darken",Yt.enlighten="enlighten",t.GradientType=void 0,(Kt=t.GradientType||(t.GradientType={})).linear="linear",Kt.radial="radial",Kt.random="random",t.ParticleOutType=void 0,(Zt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Zt.inside="inside",Zt.outside="outside",t.EasingType=void 0,(Jt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Jt.easeInBounce="ease-in-bounce",Jt.easeInCirc="ease-in-circ",Jt.easeInCubic="ease-in-cubic",Jt.easeInElastic="ease-in-elastic",Jt.easeInExpo="ease-in-expo",Jt.easeInGaussian="ease-in-gaussian",Jt.easeInLinear="ease-in-linear",Jt.easeInQuad="ease-in-quad",Jt.easeInQuart="ease-in-quart",Jt.easeInQuint="ease-in-quint",Jt.easeInSigmoid="ease-in-sigmoid",Jt.easeInSine="ease-in-sine",Jt.easeInSmoothstep="ease-in-smoothstep",Jt.easeOutBack="ease-out-back",Jt.easeOutBounce="ease-out-bounce",Jt.easeOutCirc="ease-out-circ",Jt.easeOutCubic="ease-out-cubic",Jt.easeOutElastic="ease-out-elastic",Jt.easeOutExpo="ease-out-expo",Jt.easeOutGaussian="ease-out-gaussian",Jt.easeOutLinear="ease-out-linear",Jt.easeOutQuad="ease-out-quad",Jt.easeOutQuart="ease-out-quart",Jt.easeOutQuint="ease-out-quint",Jt.easeOutSigmoid="ease-out-sigmoid",Jt.easeOutSine="ease-out-sine",Jt.easeOutSmoothstep="ease-out-smoothstep",Jt.easeInOutBack="ease-in-out-back",Jt.easeInOutBounce="ease-in-out-bounce",Jt.easeInOutCirc="ease-in-out-circ",Jt.easeInOutCubic="ease-in-out-cubic",Jt.easeInOutElastic="ease-in-out-elastic",Jt.easeInOutExpo="ease-in-out-expo",Jt.easeInOutGaussian="ease-in-out-gaussian",Jt.easeInOutLinear="ease-in-out-linear",Jt.easeInOutQuad="ease-in-out-quad",Jt.easeInOutQuart="ease-in-out-quart",Jt.easeInOutQuint="ease-in-out-quint",Jt.easeInOutSigmoid="ease-in-out-sigmoid",Jt.easeInOutSine="ease-in-out-sine",Jt.easeInOutSmoothstep="ease-in-out-smoothstep";class se{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){T(t)||(void 0!==t.count&&(this.count=$(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=$(t.speed)),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.delay&&(this.delay=$(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class ne extends se{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class oe extends se{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),T(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=$(t.offset)))}}class ae{h=new oe(0,m);l=new oe(0,b);s=new oe(0,v);load(t){T(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class re{value;constructor(){this.value=""}static create(t,e){const i=new re;return i.load(t),void 0!==e&&(D(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){T(t)||T(t.value)||(this.value=t.value)}}class ce extends re{animation;constructor(){super(),this.animation=new ae}static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(D(e)||I(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class le{color;image;opacity;position;repeat;size;constructor(){this.color=new re,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){T(t)||(void 0!==t.color&&(this.color=re.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class he{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class de{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){T(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ue{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(T(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class pe{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){T(t)||(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class ge{offset;value;constructor(){this.offset=0,this.value=90}load(t){T(t)||(void 0!==t.offset&&(this.offset=$(t.offset)),void 0!==t.value&&(this.value=$(t.value)))}}class fe{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){T(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ye{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){T(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=$(t.maxSpeed)))}}class me{value;constructor(){this.value=0}load(t){T(t)||T(t.value)||(this.value=$(t.value))}}class ve extends me{animation=new se;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class be extends ve{animation;constructor(){super(),this.animation=new ne}load(t){super.load(t)}}class we{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new me,this.enable=!1,this.options={}}load(t){T(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Pt(this.options,t.options)))}}class xe{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){T(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 Pe{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){T(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Pt({},t.position)))}}class Me{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new ge,this.center=new fe,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ye,this.path=new we,this.outModes=new xe,this.random=!1,this.size=!1,this.speed=2,this.spin=new Pe,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(T(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=$(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(z(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=$(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class ke{color;opacity;width;constructor(){this.width=0}load(t){T(t)||(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.width&&(this.width=$(t.width)),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class Ce{color;fill;stroke;load(t){T(t)||(void 0!==t.color&&(this.color=ce.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new pe,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new ke,this.stroke.load(t.stroke)))}}class Oe extends me{constructor(){super(),this.value=1}}class De{horizontal;vertical;constructor(){this.horizontal=new Oe,this.vertical=new Oe}load(t){T(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Se{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(T(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class ze{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ie{density;limit;value;constructor(){this.density=new Se,this.limit=new ze,this.value=0}load(t){T(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Te{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(T(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Ee extends me{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),T(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Re{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.bounce=new De,this.effect=new ue,this.groups={},this.move=new Me,this.number=new Ie,this.paint=new Ce,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new pe,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Te,this.zIndex=new Ee}load(t){if(T(t))return;if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=Ct(e,t=>{const e=new Ce;return e.load(t),e}):I(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.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g=t=>{const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function _e(t,...e){for(const i of e)t.load(i)}function Ae(t,e,...i){const s=new Re(t,e);return _e(s,...i),s}class Fe{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.autoPlay=!0,this.background=new le,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new he,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Ae(this.#p,this.#u),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new de,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(T(t))return;void 0!==t.preset&&(this.preset=t.preset,Ct(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=$(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=$(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;O(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Pt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#f=t=>{this.load(this.#p.getPreset(t))}}function Le(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(c.x,c.y,e.width,e.height)}function Be(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,c.x,c.y,e.width,e.height),t.globalAlpha=n}function Ve(t,e){t.clearRect(c.x,c.y,e.width,e.height)}function qe(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,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),o.fill&&(i.fillStyle=o.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,o.stroke&&(i.strokeStyle=o.stroke);const y={context:i,particle:s,radius:a,drawRadius:1*a,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?l.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;He(m,y),$e(v,y),We(v,y),je(v,y),Ue(m,y),i.resetTransform()}function Ue(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function He(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function We(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:o}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),o&&i.stroke())}function je(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function $e(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ge(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Ne=new Map;function Qe(t,e){let i=Ne.get(t);if(!i){if(i=e(),Ne.size>=1e3){[...Ne.keys()].slice(0,500).forEach(t=>Ne.delete(t))}Ne.set(t,i)}return i}function Xe(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ye(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return Ke(t,n.value,i,s);if(I(n.value)){const e=vt(n.value,i,s);if(!e)return;return Ye(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ke(t,e,i,s=!0){if(!e)return;const n=D(e)?{value:e}:e;if(D(n.value))return n.value===h?si():ti(t,n.value);if(I(n.value)){const e=vt(n.value,i,s);if(!e)return;return Ke(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ze(t,e,i,s=!0){const n=Ye(t,e,i,s);return n?Je(n):void 0}function Je(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};return 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*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function ti(t,e){return Xe(t,e)}function ei(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const c=(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},l=r<a?r*(1+o):r+o-r*o,h=2*r-l,d=1/3,u=Math.min(y,y*c(h,l,n+d)),p=Math.min(y,y*c(h,l,n)),g=Math.min(y,y*c(h,l,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function ii(t){const e=ei(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function si(t){const e=t??0,i=()=>Math.floor(F(e,256));return{b:i(),g:i(),r:i()}}function ni(t,e,i){const s=i??1;return Qe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?oi(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function oi(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function ai(t,e,i){const s=i??1;return Qe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return oi(ei(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function ri(t,e,i,s){let n=t,o=e;return"r"in n||(n=ei(t)),"r"in o||(o=ei(e)),{b:q(n.b,o.b,i,s),g:q(n.g,o.g,i,s),r:q(n.r,o.r,i,s)}}function ci(t,e,i){if(i===h)return si();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return ri(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ei(t)}}}function li(t,e,i,s){const n=D(e)?e:e.value;return n===h?s?Ye(t,{value:n}):i?h:d:n===d?d:Ye(t,{value:n})}function hi(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function di(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ui(s.h,e.h,i),ui(s.s,e.s,i),ui(s.l,e.l,i)),s}function ui(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=H(i.speed)/o*s,e.decay=1-H(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=H(i.count),e.time=0,e.delayTime=H(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=$(i.offset)):e.velocity=0}function pi(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?U(e.offset):0,o=(e.velocity??0)*s.factor+3.6*n,a=e.decay??1,r=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==a&&(e.velocity*=a),e.value=V(e.value,c,r)}function gi(t,e){if(!t)return;const{h:i,s:s,l:n}=t;pi(i,!1,e),pi(s,!0,e),pi(n,!0,e)}function fi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const yi=new $t;class mi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var vi,bi,wi;!function(t){t.circle="circle",t.rectangle="rectangle"}(vi||(vi={}));class xi{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=vi.circle}load(t){T(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class Pi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class Mi{onClick;onDiv;onHover;constructor(){this.onClick=new mi,this.onDiv=new xi,this.onHover=new Pi}load(t){if(T(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=Ct(e,t=>{const e=new xi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(bi||(bi={}));class ki{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(T(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 Ci{detectsOn;events;modes;constructor(t,e){this.detectsOn=bi.window,this.events=new Mi,this.modes=new ki(t,e)}load(t){if(T(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Oi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Nr});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Ci(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=Pt({},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"}(wi||(wi={}));class Di{type=wi.external;container;constructor(t){this.container=t}}class Si{type=wi.particles;container;constructor(t){this.container=t}}const zi="pointerdown",Ii="pointerup",Ti="pointerleave",Ei="pointermove",Ri="touchstart",_i="touchend",Ai="touchmove",Fi="touchcancel";function Li(t,e){return!!Dt(e,e=>e.enable&&yt(t,e.mode))}function Bi(t,e,i){Ct(e,e=>{const s=e.mode;e.enable&&yt(t,s)&&function(t,e){const i=t.selectors;Ct(i,i=>{e(i,t)})}(e,i)})}function Vi(t,e){if(e&&t)return Dt(t,t=>function(t,e){const i=Ct(e,e=>t.matches(e));return I(i)?i.some(t=>t):i}(e,t.selectors))}function qi(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Ui{count;delay;duration;wait;constructor(){this.wait=!1}load(t){T(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=$(t.delay)),void 0!==t.duration&&(this.duration=$(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class Hi{mass;radius;constructor(){this.radius=0,this.mass=0}load(t){T(t)||(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class Wi extends me{density;limit;constructor(){super(),this.density=5,this.value=50,this.limit=new Hi}load(t){T(t)||(super.load(t),void 0!==t.density&&(this.density=t.density),S(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class ji{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new re,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ui,this.size=new Wi}load(t){T(t)||(void 0!==t.color&&(this.color=re.create(this.color,t.color)),void 0!==t.draggable&&(this.draggable=t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=$(t.position.x)),void 0!==t.position.y&&(this.position.y=$(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.orbits&&(this.orbits=t.orbits))}}const $i="absorbers";class Gi extends Di{handleClickMode;maxDistance;#y=!1;#m;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==$i)return;const{clickPosition:o}=i.mouse;if(o){if(e.getArray(this.container).some(t=>Q(t.position,o)<t.size))return}const a=vt(n)??new ji;this.#v.addAbsorber(s,a,o)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){Q(s.position,e.downPosition)<=s.size&&(this.#y=!0,this.#m=s)}else this.#y=!1,this.#m=void 0;this.#y&&this.#m==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&yt($i,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(I(i.absorbers))for(const e of i.absorbers){const i=new ji;i.load(e),t.absorbers.push(i)}else{const e=new ji;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Ni=new WeakMap;function Qi(t){const e=t.pluginManager;let i=Ni.get(e);return i||(i=Promise.resolve().then(function(){return Qr}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Ni.delete(e),t}),Ni.set(e,i)),i}class Xi{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return Xr});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=Ct(i.absorbers,t=>{const e=new ji;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return I(e)?!!e.length:!!e}}async function Yi(t){await async function(t){t.checkVersion("4.1.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Qi(t);e.addPlugin(new Xi(i))})}(t),await async function(t){t.checkVersion("4.1.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Qi(t);qi(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new Gi(t,i)))})}(t)}class Ki{bottom;left;right;top;load(t){T(t)||(void 0!==t.bottom&&(this.bottom=$(t.bottom)),void 0!==t.left&&(this.left=$(t.left)),void 0!==t.right&&(this.right=$(t.right)),void 0!==t.top&&(this.top=$(t.top)))}}var Zi;!function(t){t.explode="explode",t.none="none",t.split="split"}(Zi||(Zi={}));class Ji{maxSizeFactor;speed;constructor(){this.maxSizeFactor=3,this.speed=2}load(t){T(t)||(void 0!==t.maxSizeFactor&&(this.maxSizeFactor=t.maxSizeFactor),void 0!==t.speed&&(this.speed=t.speed))}}class ts extends me{constructor(){super(),this.value=3}}class es extends me{constructor(){super(),this.value={min:4,max:9}}}class is{count;factor;fillColor;fillColorOffset;particles;rate;sizeOffset;strokeColor;strokeColorOffset;constructor(){this.count=1,this.factor=new ts,this.rate=new es,this.sizeOffset=!0}load(t){T(t)||(void 0!==t.fillColor&&(this.fillColor=re.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=re.create(this.strokeColor,t.strokeColor)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=Ct(t.particles,t=>Pt({},t)),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let ss=class{bounds;explode;mode;split;constructor(){this.bounds=new Ki,this.explode=new Ji,this.mode=Zi.none,this.split=new is}load(t){T(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function ns(t,e,i,s){return t&&s?function(t,e){const i=H(e.h??0),s=H(e.s??0),n=H(e.l??0),o=(t.h+i)%360,a=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return ce.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?ce.create(void 0,e):i?ce.create(void 0,i):s?function(t){return ce.create(void 0,{value:{hsl:t}})}(s):void 0}function os(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=Ae(e,i,s.options),c=Ot(a.fillColor),l=Ot(a.strokeColor),h=s.getFillColor(),d=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/H(a.factor.value),p=r.size;p&&(S(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=Ot(r.paint),f=g?.fill,y=g?.stroke,m=ns(a.fillColorOffset,c,f?.color,h),v=ns(a.strokeColorOffset,l,y?.color,d);m&&f&&(f.color=m),v&&y&&(y.color=v);const b=a.sizeOffset?$(-s.size.value,s.size