UNPKG

@tsparticles/all

Version:

All-inclusive tsParticles bundle — all engine packages, plugins, interactions, presets, shapes, updaters, effects, paths, emitters, sounds, and palettes in one dependency. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte,

2 lines • 416 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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},n={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const n=e.exec(t);if(n?.[1])return void console.error(`tsParticles - ${n[1]} - ${t.slice(n[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 s(){return n}var o;t.MoveDirection=void 0,(o=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",o.bottomLeft="bottom-left",o.bottomRight="bottom-right",o.left="left",o.none="none",o.right="right",o.top="top",o.topLeft="top-left",o.topRight="top-right",o.outside="outside",o.inside="inside";const a="generated",r="100%",c="source-over",l="resize",h="visibilitychange",d=100,u=.5,p=1e3,g={x:0,y:0,z:0},f={a:1,b:0,c:0,d:1},y="random",m="mid",w=2*Math.PI,v="true",b="false",x="canvas",S=255,P=360,M=100,C=100,_=.25,k=.75,O=400;function T(t){return"z"in t?t.z:g.z}class D{x;y;z;constructor(t=g.x,e=g.y,i=g.z){this.x=t,this.y=e,this.z=i}static get origin(){return D.create(g.x,g.y,g.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return D.create(t.x,t.y,T(t))}static create(t,e,i){return"number"==typeof t?new D(t,e??g.y,i??g.z):new D(t.x,t.y,T(t))}add(t){return D.create(this.x+t.x,this.y+t.y,this.z+T(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=T(t)}copy(){return D.clone(this)}div(t){return D.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return D.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return D.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),g.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=T(t)}sub(t){return D.create(this.x-t.x,this.y-t.y,this.z-T(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=T(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class A extends D{constructor(t=g.x,e=g.y){super(t,e,g.z)}static get origin(){return A.create(g.x,g.y)}static clone(t){return A.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new A(t,e??g.y):new A(t.x,t.y)}}function V(t){return"boolean"==typeof t}function E(t){return"string"==typeof t}function I(t){return"number"==typeof t}function z(t){return"function"==typeof t}function R(t,e){return Object.values(t).some(t=>t===e)}function L(t,e,i){return R(t,e)?e:i}function G(t){return"object"==typeof t&&null!==t}function F(t){return Array.isArray(t)}function H(t){return null==t}const N=Math.PI/180;let B=Math.random;const U={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function $(){return Q(B(),0,1-Number.EPSILON)}function j(t,e){return $()*(e-t)+t}function q(t){return U.nextFrame(t)}function W(t){U.cancel(t)}function Q(t,e,i){return Math.min(Math.max(t,e),i)}function Z(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function Y(t){const e=J(t);let i=K(t);return e===i&&(i=0),j(i,e)}function X(t){return I(t)?t:Y(t)}function K(t){return I(t)?t:t.min}function J(t){return I(t)?t:t.max}function tt(t,e){if(t===e||void 0===e&&I(t))return t;const i=K(t),n=J(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:tt(i,n)}function et(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function it(t,e){const i=t.x-e.x,n=t.y-e.y;return i*i+n*n}function nt(t,e){return Math.sqrt(it(t,e))}function st(t,e,i){return it(t,e)<=i*i}function ot(t){return t*N}function at(e,i,n){if(I(e))return ot(e);switch(e){case t.MoveDirection.top:return-Math.PI*u;case t.MoveDirection.topRight:return-Math.PI*_;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*_;case t.MoveDirection.bottom:return Math.PI*u;case t.MoveDirection.bottomLeft:return Math.PI*k;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*k;case t.MoveDirection.inside:return Math.atan2(n.y-i.y,n.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-n.y,i.x-n.x);default:return $()*w}}function rt(t){const e=A.origin;return e.length=1,e.angle=t,e}function ct(t,e,i,n){return A.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function lt(t){return{x:(t.position?.x??$()*d)*t.size.width/d,y:(t.position?.y??$()*d)*t.size.height/d}}function ht(t){const e={x:void 0!==t.position?.x?X(t.position.x):void 0,y:void 0!==t.position?.y?X(t.position.y):void 0};return lt({size:t.size,position:e})}function dt(t){const{position:e,size:i}=t;return{x:e?.x??$()*i.width,y:e?.y??$()*i.height}}function ut(t){return t?t.endsWith("%")?Number.parseFloat(t)/d:Number.parseFloat(t):1}const pt={engineVersionMismatch:"TSP-1001",particlePositionNotFound:"TSP-1002",pluginRegisterAfterLoad:"TSP-1003",offscreenCanvasUnsupported:"TSP-1101",offscreenCanvasTransferFailed:"TSP-1102",hdrEnableInvalid:"TSP-1201",hdrModeInvalid:"TSP-1202",hdrPeakNitsInvalid:"TSP-1203"};function gt(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var ft,yt;function mt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function wt(){return globalThis.document}function vt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function bt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function xt(t,e){return t===e||F(e)&&e.includes(t)}function St(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor($()*t.length)]}function Pt(t,e,i,n,s){return Mt(Ct(t,n??0),e,i,s)}function Mt(e,i,n,s){let o=!0;return s&&s!==t.OutModeDirection.bottom||(o=e.top<i.height+n.x),!o||s&&s!==t.OutModeDirection.left||(o=e.right>n.x),!o||s&&s!==t.OutModeDirection.right||(o=e.left<i.width+n.y),!o||s&&s!==t.OutModeDirection.top||(o=e.bottom>n.y),o}function Ct(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function _t(t,...e){for(const i of e){if(H(i))continue;if(!G(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):G(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return G(e)||Array.isArray(e)})){const n=i,s=t;for(const t of e){if(mt(t))continue;const e=n[t];void 0!==e&&(s[t]=e)}continue}for(const n of e){if(mt(n))continue;const e=t,s=i[n];e[n]=Array.isArray(s)?s.map(t=>_t(void 0,t)):_t(e[n],s)}}return t}function kt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:A.create(X(t.options.bounce.horizontal.value),X(t.options.bounce.vertical.value))}}function Ot(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,o]=[t.position,e.position],{dx:a,dy:r}=et(o,s);if(i*a+n*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=ct(d,u,l,h),g=ct(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 Tt(t,e){return F(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Dt(t,e,i){return F(t)?St(t,e,i):t}function At(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/d*i.width,y:e.y/d*i.height}:{width:e.width/d*i.width,height:e.height/d*i.height}}(e,i)}function Vt(t){const e=wt().createElement("div").style;for(const i in t){const n=t[i];if(!(i in t)||H(n))continue;const s=t.getPropertyValue?.(n);if(!s)continue;const o=t.getPropertyPriority?.(n);o?e.setProperty(n,s,o):e.setProperty(n,s)}return e}let Et,It;function zt(t){if(Et!==t||!It){Et=t;const e=wt().createElement("div").style,i=10,n={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 n){const i=n[t];void 0!==i&&e.setProperty(t,i)}It=e}return It}function Rt(t,e,i,n,s){if(n){let n={passive:!0};V(s)?n.capture=s:void 0!==s&&(n=s),t.addEventListener(e,i,n)}else{const n=s;t.removeEventListener(e,i,n)}}async function Lt(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}async function Gt(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function Ft(t){const e=Dt(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(F(t))return t.every(t=>G(t)&&!F(t));return G(t)&&!F(t)}(e))return e;s().error("invalid configuration data while retrieving config file")}else s().error(`${t.status.toString()} while retrieving config file`)}catch(t){s().error(`error while retrieving config file: ${t}`)}return t.fallback}function Ht(t){let e;const i=wt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===x)e=t,e.dataset[a]??=b,e.dataset[a]===v&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(x).item(0);n?(e=n,e.dataset[a]=b):(e=i.createElement(x),e.dataset[a]=v,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}function Nt(t,e){const i=wt();let n=e??i.getElementById(t);return n||(n=i.createElement("canvas"),n.id=t,n.dataset[a]=v,i.body.append(n),n)}t.OutModeDirection=void 0,(ft=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ft.left="left",ft.right="right",ft.top="top",t.PixelMode=void 0,(yt=t.PixelMode||(t.PixelMode={})).precise="precise",yt.percent="percent";class Bt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const n=i.length,s=i.indexOf(e);s<0||(1===n?this.#e.delete(t):i.splice(s,1))}}var Ut,$t,jt,qt,Wt,Qt,Zt,Yt,Xt,Kt,Jt,te,ee,ie;t.EventType=void 0,(Ut=t.EventType||(t.EventType={})).configAdded="configAdded",Ut.containerInit="containerInit",Ut.particlesSetup="particlesSetup",Ut.containerStarted="containerStarted",Ut.containerStopped="containerStopped",Ut.containerDestroyed="containerDestroyed",Ut.containerPaused="containerPaused",Ut.containerPlay="containerPlay",Ut.containerBuilt="containerBuilt",Ut.particleAdded="particleAdded",Ut.particleDestroyed="particleDestroyed",Ut.particleRemoved="particleRemoved";class ne{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;#n=new Map;#s;#o=new Set;#a=!1;#r=!1;#c=new Set;constructor(t){this.#s=t}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}get initialized(){return this.#a}addColorManager(t,e){this.#a||this.colorManagers.set(t,e)}addConfig(e){if(this.#a)return;const i=e.key??e.name??"default";this.#n.set(i,e),this.#s.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.#a||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#a||this.initializers.effects.set(t,e)}addPalette(t,e){this.#a||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#a||this.initializers.updaters.set(t,e)}addPlugin(t){this.#a||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#a||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#a)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#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}}}async register(...t){if(this.#a)throw new Error(gt(pt.pluginRegisterAfterLoad));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.#s))}}class se{pluginManager=new ne(this);#h=[];#d=new Bt;#a=!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(gt(pt.engineVersionMismatch,this.version))}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 e;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const{Container:i}=await Promise.resolve().then(function(){return by}),n=t.id??e?.id??`tsparticles${Math.floor(1e4*$()).toString()}`,{index:s,url:o}=t,a=Dt(o?await Ft({fallback:t.options,url:o,index:s}):t.options,s),{items:r}=this,c=r.findIndex(t=>t.id.description===n),l=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(l);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:a});if(c>=0){const t=this.item(c),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),r.splice(c,e,l)}else r.push(l);const h="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:Ht(Nt(n,e));return l.canvas.loadCanvas(h),await l.start(),l}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"}($t||($t={}));class oe{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class ae extends oe{radius;constructor(t,e,i){super(t,e,$t.circle),this.radius=i}contains(t){return st(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,n=this.radius,s=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof ae||t.type===$t.circle){return n+t.radius>Math.hypot(s,o)}if(t instanceof re||t.type===$t.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,2)+Math.pow(o-a,2)<=n**2||s<=n+i&&o<=n+a||s<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class re extends oe{size;constructor(t,e,i,n){super(t,e,$t.rectangle),this.size={height:n,width:i}}contains(t){const e=this.size.width,i=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+i}intersects(t){if(t instanceof ae)return t.intersects(this);if(!(t instanceof re))return!1;const e=this.size.width,i=this.size.height,n=this.position,s=t.position,o=t.size,a=o.width,r=o.height;return s.x<n.x+e&&s.x+a>n.x&&s.y<n.y+i&&s.y+r>n.y}reset(t,e,i,n){return this._resetPosition(t,e),this.size.width=i,this.size.height=n,this}}function ce(t,e,i){void 0!==i&&(t[e]=i)}function le(t,e,i){void 0!==i&&(t[e]=tt(i))}function he(t,e,i){void 0!==i&&t[e].load(i)}function de(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function ue(t,e,i,...n){const s=t;s[e]??=new i;const o=s[e];for(const t of n)o.load(t?.[e])}t.RotateDirection=void 0,(jt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",jt.counterClockwise="counter-clockwise",jt.random="random",t.AnimationMode=void 0,(qt=t.AnimationMode||(t.AnimationMode={})).auto="auto",qt.increase="increase",qt.decrease="decrease",qt.random="random",t.HdrMode=void 0,(Wt=t.HdrMode||(t.HdrMode={})).standard="standard",Wt.natural="natural",Wt.vivid="vivid",Wt.cinematic="cinematic",Wt.dynamic="dynamic",t.LimitMode=void 0,(Qt=t.LimitMode||(t.LimitMode={})).delete="delete",Qt.wait="wait",t.OutMode=void 0,(Zt=t.OutMode||(t.OutMode={})).bounce="bounce",Zt.none="none",Zt.out="out",Zt.destroy="destroy",Zt.split="split",t.AlterType=void 0,(Yt=t.AlterType||(t.AlterType={})).darken="darken",Yt.enlighten="enlighten",t.DestroyType=void 0,(Xt=t.DestroyType||(t.DestroyType={})).none="none",Xt.max="max",Xt.min="min",t.GradientType=void 0,(Kt=t.GradientType||(t.GradientType={})).linear="linear",Kt.radial="radial",Kt.random="random",t.ParticleOutType=void 0,(Jt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Jt.inside="inside",Jt.outside="outside",t.StartValueType=void 0,(te=t.StartValueType||(t.StartValueType={})).max="max",te.min="min",te.random="random",t.AnimationStatus=void 0,(ee=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",ee.decreasing="decreasing",t.DrawLayer=void 0,(ie=t.DrawLayer||(t.DrawLayer={}))[ie.BackgroundElement=0]="BackgroundElement",ie[ie.BackgroundDraw=1]="BackgroundDraw",ie[ie.BackgroundMask=2]="BackgroundMask",ie[ie.CanvasSetup=3]="CanvasSetup",ie[ie.PluginContent=4]="PluginContent",ie[ie.Particles=5]="Particles",ie[ie.CanvasCleanup=6]="CanvasCleanup",ie[ie.Foreground=7]="Foreground";class pe{load(t){H(t)||this.doLoad(t)}}function ge(t,...e){for(const i of e)t.load(i)}class fe extends pe{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){le(this,"count",t.count),ce(this,"enable",t.enable),le(this,"speed",t.speed),le(this,"decay",t.decay),le(this,"delay",t.delay),ce(this,"sync",t.sync)}}class ye extends fe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),ce(this,"mode",t.mode),ce(this,"startValue",t.startValue)}}class me extends fe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),ce(this,"max",t.max),ce(this,"min",t.min),le(this,"offset",t.offset)}}class we extends pe{h=new me(0,P);l=new me(0,C);s=new me(0,M);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ve extends pe{value="";static create(t,e){const i=new ve;return i.load(t),void 0!==e&&(E(e)||F(e)?i.load({value:e}):i.load(e)),i}doLoad(t){H(t.value)||(this.value=t.value)}}class be extends ve{animation=new we;static create(t,e){const i=new be;return i.load(t),void 0!==e&&(E(e)||F(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class xe extends pe{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ve,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"element",t.element),ce(this,"draw",t.draw),ce(this,"image",t.image),ce(this,"position",t.position),ce(this,"repeat",t.repeat),ce(this,"size",t.size),ce(this,"opacity",t.opacity)}}class Se extends pe{enable=!0;zIndex=0;doLoad(t){ce(this,"enable",t.enable),ce(this,"zIndex",t.zIndex)}}class Pe extends pe{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!V(e.enable))throw new Error(gt(pt.hdrEnableInvalid,String(e.enable)));if(void 0!==e.mode&&!R(t.HdrMode,e.mode))throw new Error(gt(pt.hdrModeInvalid,Object.values(t.HdrMode).join(", "),(i=e.mode,String(i))));var i;if(void 0!==e.peakNits&&(!I(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(gt(pt.hdrPeakNitsInvalid,String(e.peakNits)));ce(this,"enable",e.enable),ce(this,"mode",e.mode),ce(this,"peakNits",e.peakNits)}}class Me extends pe{delay=.5;enable=!0;doLoad(t){ce(this,"delay",t.delay),ce(this,"enable",t.enable)}}class Ce extends pe{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=_t(this.options[t]??{},i))}ce(this,"close",t.close),ce(this,"type",t.type)}}class _e extends pe{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=be.create(this.color,t.color)),ce(this,"enable",t.enable),le(this,"opacity",t.opacity)}}class ke extends pe{offset=0;value=90;doLoad(t){le(this,"offset",t.offset),le(this,"value",t.value)}}class Oe extends pe{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){ce(this,"x",t.x),ce(this,"y",t.y),ce(this,"mode",t.mode),ce(this,"radius",t.radius)}}class Te extends pe{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){le(this,"acceleration",t.acceleration),ce(this,"enable",t.enable),ce(this,"inverse",t.inverse),le(this,"maxSpeed",t.maxSpeed)}}class De extends pe{value=0;doLoad(t){H(t.value)||(this.value=tt(t.value))}}class Ae extends De{animation=new fe;doLoad(t){super.doLoad(t),he(this,"animation",t.animation)}}class Ve extends Ae{animation=new ye}class Ee extends pe{clamp=!0;delay=new De;enable=!1;generator;options={};doLoad(t){ce(this,"clamp",t.clamp),this.delay.load(t.delay),ce(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=_t(this.options,t.options))}}class Ie extends pe{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class ze extends pe{acceleration=0;enable=!1;position;doLoad(t){le(this,"acceleration",t.acceleration),ce(this,"enable",t.enable),t.position&&(this.position=_t({},t.position))}}class Re extends pe{angle=new ke;center=new Oe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new Te;outModes=new Ie;path=new Ee;random=!1;size=!1;speed=2;spin=new ze;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(I(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),le(this,"decay",t.decay),ce(this,"direction",t.direction),void 0!==t.distance&&(this.distance=I(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),le(this,"drift",t.drift),ce(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(G(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),ce(this,"random",t.random),ce(this,"size",t.size),le(this,"speed",t.speed),this.spin.load(t.spin),ce(this,"straight",t.straight),ce(this,"vibrate",t.vibrate),ce(this,"warp",t.warp)}}class Le extends pe{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=be.create(this.color,t.color)),le(this,"width",t.width),le(this,"opacity",t.opacity)}}class Ge extends pe{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=be.create(this.color,t.color)),de(this,"fill",t.fill,()=>new _e),de(this,"stroke",t.stroke,()=>new Le)}}class Fe extends De{value=1}class He extends pe{horizontal=new Fe;vertical=new Fe;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ne extends pe{enable=!1;height=1080;width=1920;doLoad(t){ce(this,"enable",t.enable),ce(this,"width",t.width),ce(this,"height",t.height)}}class Be extends pe{mode=t.LimitMode.delete;value=0;doLoad(t){ce(this,"mode",t.mode),ce(this,"value",t.value)}}class Ue extends pe{density=new Ne;limit=new Be;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),ce(this,"value",t.value)}}class $e extends pe{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=_t(this.options[t]??{},i))}ce(this,"close",t.close),ce(this,"type",t.type)}}class je extends De{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),ce(this,"opacityRate",t.opacityRate),ce(this,"sizeRate",t.sizeRate),ce(this,"velocityRate",t.velocityRate)}}class qe extends pe{bounce=new He;effect=new Ce;groups={};move=new Re;number=new Ue;paint;palette;reduceDuplicates=!1;shape=new $e;zIndex=new je;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Ge,this.paint.color=new be,this.paint.color.value="#fff",this.paint.fill=new _e,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=_t(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&&(F(e)?this.paint=Tt(e,t=>{const e=new Ge;return e.load(t),e}):F(this.paint)?(this.paint=new Ge,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#u.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,n=(F(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,n=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:n,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:n}]}),s=n.length>1?n:n[0]??{};this.load({paint:s,blend:{enable:!0,mode:e.blendMode}})}}function We(t,e,...i){const n=new qe(t,e);return ge(n,...i),n}class Qe extends pe{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new xe,this.fullScreen=new Se,this.hdr=new Pe,this.particles=We(this.#p,this.#u),this.resize=new Me}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,Tt(this.preset,t=>{this.#f(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#g(this.palette)),ce(this,"autoPlay",e.autoPlay),ce(this,"clear",e.clear),ce(this,"key",e.key),ce(this,"name",e.name),le(this,"delay",e.delay),ce(this,"detectRetina",e.detectRetina),le(this,"duration",e.duration),ce(this,"fpsLimit",e.fpsLimit);const i=e.hdr;V(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),ce(this,"pauseOnBlur",e.pauseOnBlur),ce(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),ce(this,"zLayers",e.zLayers),this.background.load(e.background);const n=e.fullScreen;V(n)?this.fullScreen.enable=n:this.fullScreen.load(n),this.particles.load(e.particles),this.resize.load(e.resize),this.style=_t(this.style,e.style),ce(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Ze=new Map,Ye=1.15,Xe=1.05,Ke=.2126,Je=.7152,ti=.0722;function ei(t,e){let i=Ze.get(t);return i||(i=e(),Ze.size>2e3&&Ze.clear(),Ze.set(t,i)),i}function ii(t){return Q(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function ni(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function si(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function oi(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function ai(t,e,i,n=!0){if(!e)return;const s=E(e)?{value:e}:e;if(E(s.value))return ri(t,s.value,i,n);if(F(s.value)){const e=St(s.value,i,n);if(!e)return;return ai(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function ri(t,e,i,n=!0){if(!e)return;const s=E(e)?{value:e}:e;if(E(s.value))return s.value===y?yi():di(t,s.value);if(F(s.value)){const e=St(s.value,i,n);if(!e)return;return ri(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function ci(t,e,i,n=!0){const s=ai(t,e,i,n);return s?li(s):void 0}function li(t){const e=t.r/S,i=t.g/S,n=t.b/S,s=Math.max(e,i,n),o=Math.min(e,i,n),a={h:0,l:(s+o)*u,s:0};return s!==o&&(a.s=a.l<u?(s-o)/(s+o):(s-o)/(2-s-o),a.h=e===s?(i-n)/(s-o):i===s?2+(n-e)/(s-o):4+(e-i)/(s-o)),a.l*=C,a.s*=M,a.h*=60,a.h<0&&(a.h+=P),a.h>=P&&(a.h-=P),a}function hi(t,e){return oi(t,e)?.a}function di(t,e){return oi(t,e)}function ui(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 pi(t){const e=(t.h%P+P)%P,i=Math.max(0,Math.min(M,t.s)),n=Math.max(0,Math.min(C,t.l)),s=e/P,o=i/M,a=n/C;if(0===i){const t=Math.round(a*S);return{r:t,g:t,b:t}}const r=a<u?a*(1+o):a+o-a*o,c=2*a-r,l=1/3,h=Math.min(S,S*ui(c,r,s+l)),d=Math.min(S,S*ui(c,r,s)),p=Math.min(S,S*ui(c,r,s-l));return{r:Math.round(h),g:Math.round(d),b:Math.round(p)}}function gi(t){const e=(t.h%P+P)%P,i=Math.max(0,Math.min(M,t.s)),n=Math.max(0,Math.min(C,t.l)),s=e/P,o=i/M,a=n/C;if(0===i){const t=a*S;return{r:t,g:t,b:t}}const r=a<u?a*(1+o):a+o-a*o,c=2*a-r,l=1/3;return{r:Math.min(S,S*ui(c,r,s+l)),g:Math.min(S,S*ui(c,r,s)),b:Math.min(S,S*ui(c,r,s-l))}}function fi(t){const e=pi(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function yi(t,e){const i=t??0;if(e)return{r:j(i,S),g:j(i,S),b:j(i,S)};const n=()=>Math.floor(j(i,256));return{b:n(),g:n(),r:n()}}function mi(e,i,n,s,o){const a=i?4:2,r=n??1;return ei(i?`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-hdr-${r.toString()}-${(s??O).toString()}-${o??t.HdrMode.standard}`:`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-sdr-${r.toString()}`,()=>i?function(e,i,n=400,s=t.HdrMode.standard){const o=n/203,a=function(e,i,n,s){const o=e.r/S,a=e.g/S,r=e.b/S;if(s!==t.HdrMode.natural&&s!==t.HdrMode.vivid&&s!==t.HdrMode.cinematic&&s!==t.HdrMode.dynamic)return{b:r,g:a,r:o};const c=Math.max(1,i),l=Ke*o+Je*a+ti*r,h=function(t,e,i){if(t<=i)return ii(t);const n=t+(t-i)*(e-1);return ii(n)}(l,i,n),d=l>0?h/l:1;return function(e,i,n,s,o){switch(s){case t.HdrMode.vivid:{const t=(e+i+n)/3;return{b:Q(Q(t+(n-t)*Ye,0,o)*Xe,0,o),g:Q(Q(t+(i-t)*Ye,0,o)*Xe,0,o),r:Q(Q(t+(e-t)*Ye,0,o)*Xe,0,o)}}case t.HdrMode.cinematic:{const t=1.05*e,s=.95*n,a=(t+i+s)/3;return{b:Q(a+1.1*(s-a),0,o),g:Q(a+1.1*(i-a),0,o),r:Q(a+1.1*(t-a),0,o)}}case t.HdrMode.dynamic:{const t=Ke*e+Je*i+ti*n,s=Math.min(1,2*t),a=1-s,r=(e+i+n)/3,c=Q(r+(e-r)*Ye,0,o)*Xe,l=Q(r+(i-r)*Ye,0,o)*Xe,h=Q(r+(n-r)*Ye,0,o)*Xe;return{b:Q(n*a+h*s,0,o),g:Q(i*a+l*s,0,o),r:Q(e*a+c*s,0,o)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:n,g:i,r:e}}}(Q(o*d,0,c),Q(a*d,0,c),Q(r*d,0,c),s,c)}(e,o,.18,s);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(i??1).toString()})`}(e,n,s,o):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,n))}function wi(e,i,n,s,o){const a=i?4:2,r=n??1;return ei(i?`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-hdr-${r.toString()}-${(s??O).toString()}-${o??t.HdrMode.standard}`:`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-sdr-${r.toString()}`,()=>i?mi(gi(e),!0,n,s,o):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function vi(t,e,i,n,s){let o=t,a=e;if("r"in o||(o=s?gi(t):pi(t)),"r"in a||(a=s?gi(e):pi(e)),s){const t={b:ni(o.b/S),g:ni(o.g/S),r:ni(o.r/S)},e={b:ni(a.b/S),g:ni(a.g/S),r:ni(a.r/S)},s=i+n;return{b:si((t.b*i+e.b*n)/s)*S,g:si((t.g*i+e.g*n)/s)*S,r:si((t.r*i+e.r*n)/s)*S}}return{b:Z(o.b,a.b,i,n),g:Z(o.g,a.g,i,n),r:Z(o.r,a.r,i,n)}}function bi(t,e,i,n){if(i===y)return yi();if(i!==m)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return vi(i,s,t.getRadius(),e.getRadius(),n);{const t=i??s;if(t)return pi(t)}}}function xi(t,e,i,n){const s=E(e)?e:e.value;return s===y?n?ai(t,{value:s}):i?y:m:s===m?m:ai(t,{value:s})}function Si(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Pi(t,e,i){const n={h:{enable:!1,value:t.h,min:0,max:P},s:{enable:!1,value:t.s,min:0,max:M},l:{enable:!1,value:t.l,min:0,max:C}};return e&&(Mi(n.h,e.h,i),Mi(n.s,e.s,i),Mi(n.l,e.l,i)),n}function Mi(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=X(i.speed)/d*n,e.decay=1-X(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=X(i.count),e.time=0,e.delayTime=X(i.delay)*p,i.sync||(e.velocity*=$(),e.value*=$()),e.initialValue=e.value,e.offset=tt(i.offset)):e.velocity=0}function Ci(e,i,n,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+=n.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=e.offset?Y(e.offset):0,a=(e.velocity??0)*n.factor+3.6*o,r=e.decay??1,c=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>c&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=c)),e.velocity&&1!==r&&(e.velocity*=r),e.value=Q(e.value,l,c)}function _i(t,e,i){if(!t)return;const{h:n,s:s,l:o}=t;Ci(n,!1,e),Ci(s,!0,e),Ci(o,!0,e)}function ki(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const Oi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new se}();class Ti{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=2*n,o=s*(i.heightFactor??.5),a=s*(i.headWidthFactor??.2),r=o*(i.bodyHeightFactor??.5);e.moveTo(-s*u,g.y),e.lineTo(-s*u,-r*u),e.lineTo(s*u-a,-r*u),e.lineTo(s*u-a,-o*u),e.lineTo(s*u+a,g.y),e.lineTo(s*u-a,o*u),e.lineTo(s*u-a,r*u),e.lineTo(-s*u,r*u),e.lineTo(-s*u,g.y)}(t)}particleInit(t,e){const i=e.shapeData;e.heightFactor=X(i?.heightFactor??.5),e.headWidthFactor=X(i?.headWidthFactor??.2),e.bodyHeightFactor=X(i?.bodyHeightFactor??.5)}}async function Di(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["arrow"],()=>Promise.resolve(new Ti))})}class Ai{color;draw;element;image;opacity=1;load(t){H(t)||(void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"draw",t.draw),ce(this,"element",t.element),ce(this,"image",t.image),ce(this,"opacity",t.opacity))}}class Vi{composite="destination-out";cover=new Ai;enable=!1;load(t){if(!H(t)){if(ce(this,"composite",t.composite),void 0!==t.cover){const e=t.cover,i=E(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color||void 0!==e.draw||void 0!==e.element||void 0!==e.image?e:{color:i})}ce(this,"enable",t.enable)}}}class Ei{id="background-mask";#p;constructor(t){this.#p=t}async getPlugin(t){const{BackgroundMaskPluginInstance:e}=await Promise.resolve().then(function(){return xy});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.backgroundMask;n?.load||(e.backgroundMask=n=new Vi),n.load(i?.backgroundMask)}needsPlugin(t){return!!t?.backgroundMask?.enable}}async function Ii(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ei(t.pluginManager))})}const zi="TSP-3203";class Ri{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Py});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Li(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 Ri(t.pluginManager))})}function Gi(t){if(!t.pluginManager.addPathGenerator)throw new Error(gt(zi))}const Fi={segmentLength:20,branchChance:.2,maxAngle:Math.PI/3,speedVariation:.3,inertia:{enable:!1,factor:.1}};class Hi{options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.options={...Fi,inertia:{...Fi.inertia}}}generate(t){const e=this.options;t.branching??={angle:$()*w,remaining:e.segmentLength,baseSpeed:t.velocity.length,speed:t.velocity.length};const i=t.branching;if(i.remaining<=0){const t=$()<(e.branchChance??0),n=e.maxAngle??Fi.maxAngle,s=(2*$()-1)*(t?n:.3*n);i.angle+=s,i.remaining=e.segmentLength;const o=1+(2*$()-1)*(e.speedVariation??0);i.speed=i.baseSpeed*o}i.remaining-=i.speed;const n=Math.cos(i.angle)*i.speed,s=Math.sin(i.angle)*i.speed,o=e.inertia;if(o?.enable){const e=o.factor??.1;t.velocity.x+=(n-t.velocity.x)*e,t.velocity.y+=(s-t.velocity.y)*e,this.#y.x=t.velocity.x,this.#y.y=t.velocity.y}else t.velocity.x=0,t.velocity.y=0,this.#y.x=n,this.#y.y=s;return this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.segmentLength=t.segmentLength??this.options.segmentLength,this.options.branchChance=t.branchChance??this.options.branchChance,this.options.maxAngle=t.maxAngle??this.options.maxAngle,this.options.speedVariation=t.speedVariation??this.options.speedVariation;const e=t.inertia;if(e){const t={...Fi.inertia};t.enable=e.enable??t.enable,t.factor=e.factor??t.factor,this.options.inertia=t}}reset(t){delete t.branching}update(){}}async function Ni(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("branchesPathGenerator",t=>Promise.resolve(new Hi(t)))})}class Bi{options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.options={angleDelta:Math.PI/12,damping:1}}generate(t){t.brownian??={angle:$()*w,speed:t.velocity.length};const e=t.brownian,i=(2*$()-1)*(this.options.angleDelta??0);e.angle+=i;const n=this.options.damping??1;return t.velocity.x=0,t.velocity.y=0,this.#y.length=e.speed*n,this.#y.angle=e.angle,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.angleDelta=t.angleDelta??this.options.angleDelta,this.options.damping=t.damping??this.options.damping}reset(t){delete t.brownian}update(){}}async function Ui(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("brownianPathGenerator",t=>Promise.resolve(new Bi(t)))})}class $i{drawAfter(t){const{context:e,radius:i}=t,n=i/3;e.beginPath(),e.arc(n,-n,n,0,w,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}async function ji(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("bubble",()=>Promise.resolve(new $i))})}class qi{color=!0;opacity=!1;load(t){H(t)||(ce(this,"color",t.color),ce(this,"opacity",t.opacity))}}class Wi{offset=4;filter=t=>t.a>0;load(t){if(!H(t)){if(void 0!==t.filter)if(E(t.filter)){if(t.filter in globalThis){const e=globalThis[t.filter];z(e)&&(this.filter=e)}}else this.filter=t.filter;ce(this,"offset",t.offset)}}}class Qi{src="";load(t){H(t)||ce(this,"src",t.src)}}class Zi{family="sans-serif";size=100;style="";variant="";weight="";load(t){H(t)||(ce(this,"family",t.family),ce(this,"size",t.size),ce(this,"style",t.style),ce(this,"variant",t.variant),ce(this,"weight",t.weight))}}class Yi{separator="\n";spacing=10;load(t){H(t)||(ce(this,"separator",t.separator),ce(this,"spacing",t.spacing))}}class Xi{color="#000000";fill=!0;font=new Zi;lines=new Yi;text="";load(t){H(t)||(ce(this,"color",t.color),ce(this,"fill",t.fill),this.font.load(t.font),this.lines.load(t.lines),ce(this,"text",t.text))}}class Ki{element;enable=!1;image;override=new qi;pixels=new Wi;position;scale=1;selector;text;constructor(){this.position={x:50,y:50}}load(t){H(t)||(void 0!==t.element&&t.element instanceof HTMLCanvasElement&&(this.element=t.element),ce(this,"enable",t.enable),t.image&&(this.image??=new Qi,this.image.load(t.image)),this.pixels.load(t.pixels),t.position&&(this.position={x:t.position.x??this.position.x,y:t.position.y??this.position.y}),this.override.load(t.override),ce(this,"scale",t.scale),ce(this,"selector",t.selector),t.text&&(this.text??=new Xi,this.text.load(t.text)))}}class Ji{id="canvas-mask";async getPlugin(t){const{CanvasMaskPluginInstance:e}=await Promise.resolve().then(function(){return _y});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.canvasMask;void 0===n?.load&&(e.canvasMask=n=new Ki),n.load(i?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}async function tn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ji)})}var en;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(en||(en={}));function nn(t,e,i){const n=i.segments[0];if(!n)return;const s=n.values[0];if(!s)return;t.moveTo(s.x*e,s.y*e);for(const n of i.segments){const i=n.values[0];if(!i)continue;const s=n.values[1],o=n.values[2],a=n.values[3];switch(n.type){case en.move:t.moveTo(i.x*e,i.y*e);break;case en.line:t.lineTo(i.x*e,i.y*e);break;case en.bezier:if(!s||!o||!a)continue;t.bezierCurveTo(s.x*e,s.y*e,o.x*e,o.y*e,a.x*e,a.y*e);break;case en.quadratic:if(!s||!o)continue;t.quadraticCurveTo(s.x*e,s.y*e,o.x*e,o.y*e);break;case en.arc:if(!s||!o)continue;t.arc(i.x*e,i.y*e,s.x*e,o.x,o.y);break;case en.ellipse:if(!s||!o||!a)continue;t.ellipse(i.x*e,i.y*e,s.x*e,s.y*e,o.x,a.x,a.y)}}if(!i.half)return;for(let n=i.segments.length-1;n>=0;n--){const s=i.segments[n];if(!s)continue;const o=s.values[0],a=1,r=2,c=s.values[a],l=s.values[r];switch(s.type){case en.line:if(!o)break;t.lineTo(o.x*-e,o.y*e);break;case en.bezier:if(!o||!c||!l)break;t.bezierCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e,-o.x*e,o.y*e);break;case en.quadratic:if(!c||!l)break;t.quadraticCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e);case en.arc:case en.ellipse:}}}var sn;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(sn||(sn={}));const on=u,an=.25,rn=-on,cn=-.25,ln=.0625,hn=.375,dn={half:!0,segments:[{type:en.bezier,values:[{x:0,y:rn},{x:0,y:rn},{x:an,y:rn},{x:an,y:cn}]},{type:en.bezier,values:[{x:an,y:cn},{x:an,y:cn},{x:on,y:cn},{x:on,y:0}]},{type:en.bezier,values:[{x:on,y:0},{x:on,y:0},{x:on,y:an},{x:an,y:an}]},{type:en.bezier,values:[{x:an,y:an},{x:an,y:an},{x:ln,y:an},{x:ln,y:ln}]},{type:en.bezier,values:[{x:ln,y:ln},{x:ln,y:an},{x:an,y:on},{x:an,y:on}]},{type:en.bezier,values:[{x:an,y:on},{x:an,y:on},{x:0,y:on},{x:0,y:on}]}]},un={half:!0,segments:[{type:en.bezier,values:[{x:0,y:on},{x:0,y:on},{x:hn,y:0},{x:hn,y:0}]},{type:en.bezier,values:[{x:hn,y:0},{x:hn,y:0},{x:0,y:rn},{x:0,y:rn}]}]},pn={half:!0,segments:[{type:en.bezier,values:[{x:0,y:on},{x:0,y:on},{x:on,y:0},{x:on,y:cn}]},{type:en.bezier,values:[{x:on,y:cn},{x:on,y:cn},{x:on,y:rn},{x:an,y:rn}]},{type:en.bezier,values:[{x:an,y:rn},{x:an,y:rn},{x:0,y:rn},{x:0,y:cn}]}]},gn={half:!0,segments:[{type:en.bezier,values:[{x:0,y:rn},{x:0,y:rn},{x:on,y:cn},{x:on,y:0}]},{type:en.bezier,values:[{x:on,y:0},{x:on,y:0},{x:on,y:an},{x:an,y:an}]},{type:en.bezier,values:[{x:an,y:an},{x:an,y:an},{x:ln,y:an},{x:ln,y:ln}]},{type:en.bezier,values:[{x:ln,y:ln},{x:ln,y:an},{x:an,y:on},{x:an,y:on}]},{type:en.bezier,values:[{x:an,y:on},{x:an,y:on},{x:0,y:on},{x:0,y:on}]}]},fn={[sn.hearts]:pn,[sn.diamonds]:un,[sn.clubs]:dn,[sn.spades]:gn};class yn{draw(t){const{context:e,radius:i}=t;nn(e,i,fn.clubs)}}async function mn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new yn))})}class wn{draw(t){const{context:e,radius:i}=t;nn(e,i,fn.diamonds)}}async function vn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new wn))})}let bn=class{draw(t){const{context:e,radius:i}=t;nn(e,i,fn.hearts)}};async function xn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new bn))})}class Sn{draw(t){const{context:e,radius:i}=t;nn(e,i,fn.spades)}}async function Pn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new Sn))})}async function Mn(t){t.checkVersion("4.5.0"),await Promise.all([mn(t),vn(t),xn(t),Pn(t)])}const Cn=4/3,_n=new Map,kn={r:215,g:20,b:20},On={r:18,g:18,b:18};function Tn(t,e,i,n,s,o,a,r){if(s)!function(t,e){An(t,e)}(t,e);else{const s=function(t,e,i,n,s){return`${t.toFixed(2)}-${e?"hdr":"sdr"}-${void 0!==n?n.toFixed(2):"default"}-${s??"default"}-${i.suit}-${i.value}`}(e,n,i,a,r),c=e*Cn,l=2*e,h=c*u,d=l*u;let p=_n.get(s);if(!p){const t=new OffscreenCanvas(c,l),u=t.getContext("2d",o);u&&(u.translate(h,d),Dn(u,e,i,n,a,r),p=t instanceof HTMLCanvasElement?t:t.transferToImageBitmap(),_n.set(s,p))}p?t.drawImage(p,-h,-d,c,l):Dn(t,e,i,n,a,r)}}function Dn(t,e,i,n,s,o){const{suit:a,value:r}=i,c=e*Cn*u,l=2*e*u,h=.2*e,d=.4*e,p=.3*e,f=.7*e,y=.25*e,m=.1*e,v=mi(a===sn.hearts||a===sn.diamonds?kn:On,n,void 0,s,o);t.save(),An(t,e),t.fillStyle=mi({r:255,g:255,b:255},n,void 0,s,o),t.fill(),t.strokeStyle=mi({r:0,g:0,b:0},n,void 0,s,o),t.stroke(),t.fillStyle=v,t.font=`bold ${d.toString()}px Arial, serif`,t.textAlign="left",t.textBaseline="middle";const b=-c+h+m,x=-l+h+d*u;t.save(),t.translate(b,x),t.beginPath(),nn(t,p,fn[a]),t.fill(),t.restore(),t.fillText(r,b+y,x),t.save(),t.translate(c-h-m,l-h-d*u),t.rotate(Math.PI),t.save(),t.beginPath(),nn(t,p,fn[a]),t.fill(),t.restore(),t.fillText(r,g.x+y,g.y),t.restore(),t.save(),t.beginPath(),nn(t,f,fn[a]),t.fillStyle=v,t.fill(),t.restore(),t.beginPath(),t.arc(g.x,g.y,0,0,w,!1),t.closePath(),t.restore()}function An(t,e){const i=e*Cn*u,n=2*e*u,s=.2*e;t.beginPath(),t.moveTo(-i+s,-n),t.lineTo(i-s,-n),t.quadraticCurveTo(i,-n,i,-n+s),t.lineTo(i,n-s),t.quadraticCurveTo(i,n,i-s,n),t.lineTo(-i+s,n),t.quadraticCurveTo(-i,n,-i,n-s),t.lineTo(-i,-n+s),t.quadraticCurveTo(-i,-n,-i+s,-n),t.closePath()}class Vn{#u;constructor(t){this.#u=t}draw(t){const{context:e,particle:i,opacity:n,radius:s}=t;if(!i.cardData)return;const o=e.globalAlpha,a=this.#u;e.globalAlpha=n,Tn(e,s,i.cardData,a.hdr,i.isShowingBack(),a.canvas.render.settings,a.peakNits,a.hdrMode),e.globalAlpha=o}particleInit(t,e){const i=e.shapeData;i&&(e.cardData=_t({},i))}}async function En(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["card"],t=>Promise.resolve(new Vn(t)))})}async function In(t){t.checkVersion("4.5.0"),await Promise.all([En(t),Mn(t)])}class zn{afterDraw(t){!function(t){const{context:e,particle:i,radius:n}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const s=n*i.cogHoleRadius/d;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(s,g.y),e.arc(g.x,g.y,s,0,w),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(t)}draw(t){!function(t){const{context:e,particle:i,radius:n}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const s=w/(2*i.cogNotches),o=s*i.cogInnerTaper*.005,a=s*i.cogOuterTaper*.005,r=n*i.cogInnerRadius/d;let c=s,l=!1;for(e.moveTo(n*Math.cos(a),n*Math.sin(a));c<=w;c+=s)l?(e.lineTo(r*Math.cos(c-o),r*Math.sin(c-o)),e.lineTo(n*Math.cos(c+a),n*Math.sin(c+a))):(e.lineTo(n*Math.cos(c-a),n*Math.sin(c-a)),e.lineTo(r*Math.cos(c+o),r*Math.sin(c+o))),l=!l}(t)}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=X(i?.holeRadius??44),e.cogInnerRadius=X(i?.innerRadius??72),e.cogInnerTaper=X(i?.innerTaper??35),e.cogNotches=X(i?.notches??7),e.cogOuterTaper=X(i?.outerTaper??50)}}async function Rn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["cog"],()=>Promise.resolve(new zn))})}function Ln(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class Gn{#m;#w;#v;#b;#x;#S;#P;#M;#C;#_;constructor(){this.#m=1/47,this.#w=.5*(Math.sqrt(3)-1),this.#v=.5*(1/Math.sqrt(3)-1),this.#b=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this.#x=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this.#S=[],this.#P=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this.#M=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this.#C=new Uint8Array(256),this.#_=new Uint8Array(256)}noise(t,e){const i=this.#x,n=this.#m,s=this.#w,o=this.#v,a=this.#S,r=this.#C,c=this.#_,l=(t+e)*o,h=t+l,d=e+l,u=Math.floor(h),p=Math.floor(d),g=(u+p)*s,f=t-(u+g),y=e-(p+g),m=h-u,w=d-p,v=m+w;let b=0;for(let t=a[m-w+1|v<<1|v+w<<2|v+m<<4];void 0!==t;t=t.next){const e=f+t.dx,n=y+t.dy,s=2-e*e-n*n;if(s<=0)continue;const o=u+t.xsb,a=p+t.ysb,l=c[r[255&o]+a&255];b+=s*s*s*s*(i[l]*e+i[l+1]*n)}return b*n}seed(t){const e=this.#M,i=this.#b,n=this.#P,s=[];for(let t=0;t<e.length;t+=4){const n=i[e[t]];let o=null,a=null;for(let e=0;e<n.length;e+=3)a=this.#k(n[e],n[e+1],n[e+2]),null===o?s[t/4]=a:o.next=a,o=a;a&&(a.next=this.#k(e[t+1],e[t+2],e[t+3]))}this.#S=[];for(let t=0;t<n.length;t+=2)this.#S[n[t]]=s[n[t+1]];this.#C=new Uint8Array(256),this.#_=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=Ln(Ln(Ln(a)));for(let t=255;t>=0;t--){a=Ln(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#C[t]=o[e[0]],this.#_[t]=14&this.#C[t],o[e[0]]=o[t]}}#k(t,e,i){const n=this.#w;return{dx:-e-t*n,dy:-i-t*n,xsb:e,ysb:i}}}const Fn=1/3;class Hn{#O;#T;#D;#A;#V;#S;#E;#I;#C;#z;constructor(){this.#O=1/103,this.#T=(Math.sqrt(4)-1)*Fn,this.#D=(1/Math.sqrt(4)-1)*Fn,this.#A=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this.#V=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this.#S=[],this.#E=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this.#I=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this.#C=new Uint8Array(256),this.#z=new Uint8Array(256)}noise(t,e,i){const n=this.#D,s=this.#O,o=this.#T,a=this.#S,r=this.#C,c=this.#z,l=this.#V,h=(t+e+i)*n,d=t+h,u=e+h,p=i+h,g=Math.floor(d),f=Math.floor(u),y=Math.floor(p),m=(g+f+y)*o,w=t-(g+m),v=e-(f+m),b=i-(y+m),x=d-g,S=u-f,P=p-y,M=x+S+P;let C=0;for(let t=a[S-P+1|x-S+1<<1|x-P+1<<2|M<<3|M+P<<5|M+S<<7|M+x<<9];void 0!==t;t=t.next){const e=w+t.dx,i=v+t.dy,n=b+t.dz,s=2-e*e-i*i-n*n;if(s>0){const o=g+t.xsb,a=f+t.ysb,h=y+t.zsb,d=c[r[r[255&o]+a&255]+h&255];C+=s*s*s*s*(l[d]*e+l[d+1]*i+l[d+2]*n)}}return C*s}seed(t){const e=this.#A,i=this.#E,n=this.#I,s=[];for(let t=0;t<n.length;t+=9){const i=e[n[t]];let o=null,a=null;for(let e=0;e<i.length;e+=4)a=this.#R(i[e],i[e+1],i[e+2],i[e+3]),null===o?s[t/9]=a:o.next=a,o=a;a&&(a.next=this.#R(n[t+1],n[t+2],n[t+3],n[t+4]),a.next.next=this.#R(n[t+5],n[t+6],n[t+7],n[t+8]))}this.#S=[];for(let t=0;t<i.length;t+=2)this.#S[i[t]]=s[i[t+1]];this.#C=new Uint8Array(256),this.#z=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=Ln(Ln(Ln(a)));for(let t=255;t>=0;t--){a=Ln(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#C[t]=o[e[0]],this.#z[t]=this.#C[t]%24*3,o[e[0]]=o[t]}}#R(t,e,i,n){const s=this.#T;return{dx:-e-t*s,dy:-i-t*s,dz:-n-t*s,xsb:e,ysb:i,zsb:n}}}class Nn{#L;#G;#F;#H;#N;#S;#B;#U;#C;#$;constructor(){this.#L=1/30,this.#G=.25*(Math.sqrt(5)-1),this.#F=.25*(1/Math.sqrt(5)-1),this.#S=[],this.#C=new Uint8Array(0),this.#$=new Uint8Array(0),this.#H=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1]],this.#N=[3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,-3,1,1,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],this.#B=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],this.#U=[0,0,1,-1,0,0,0,1,0,-1,0,0,1,0,0,-1,0,0,-1,1,0,0,0,0,1,-1,0,0,0,1,0,-1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,-1,0,0,-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,2,1,1,0,0,1,1,1,-1,0,1,1,1,0,-1,0,2,1,0,1,0,1,1,-1,1,0,1,1,0,1,-1,0,2,0,1,1,0,1,-1,1,1,0,1,0,1,1,-1,0,2,1,0,0,1,1,1,-1,0,1,1,1,0,-1,1,0,2,0,1,0,1,1,-1,1,0,1,1,0,1,-1,1,0,2,0,0,1,1,1,-1,0,1,1,1,0,-1,1,1,1,4,2,1,1,0,4,1,2,1,0,4,1,1,2,0,1,4,2,1,0,1,4,1,2,0,1,4,1,1,0,2,1,4,2,0,1,1,4,1,0,2,1,4,1,0,1,2,1,4,0,2,1,1,4,0,1,2,1,4,0,1,1,2,1,2,1,1,0,0,3,2,1,0,0,3,1,2,0,0,1,2,1,0,1,0,3,2,0,1,0,3,1,0,2,0,1,2,0,1,1,0,3,0,2,1,0,3,0,1,2,0,1,2,1,0,0,1,3,2,0,0,1,3,1,0,0,2,1,2,0,1,0,1,3,0,2,0,1,3,0,1,0,2,1,2,0,0,1,1,3,0,0,2,1,3,0,0,1,2,2,3,1,1,1,0,2,1,1,1,-1,2,2,0,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,2,0,0,0,2,3,1,0,1,1,2,1,-1,1,1,2,2,0,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,2,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,2,0,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,2,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,0,2,0,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,2,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,2,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,0,0,2,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,0,2,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,0,2,2,1,1,1,-1,0,1,1,1,0,-1,0,0,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,0,0,0,0,0,2,1,-1,1,1,0,1,0,1,1,-1,0,0,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,0,0,0,0,0,2,1,-1,1,0,1,1,0,1,-1,1,0,0,0,0,0,2,1,-1,0,1,1,1,0,-1,1,1,0,0,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,2,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,2,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,2,2,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,0,2,0,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,2,0,0,2,1,-1,1,0,1,1,0,1,-1,1,2,0,2,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,0,0,2,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,0,2,0,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,2,0,2,1,1,-1,0,1,1,1,0,-1,1,2,0,0,0,2,2,1,-1,1,0,1,1,0,1,-1,1,2,0,0,0,2,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,0,2,3,1,1,0,0,0,2,2,0,0,0,2,1,1,1,-1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,1,-1,3,1,0,0,1,0,2,0,0,2,0,2,1,1,1,-1,3,1,1,0,0,0,2,2,0,0,0,2,1,1,-1,1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,-1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,1,-1,1,3,1,1,0,0,0,2,2,0,0,0,2,1,-1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,1,-1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,-1,1,1,3,1,0,1,0,0,2,0,2,0,0,2,-1,1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,-1,1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,-1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,4,1,1,1,1,3,3,2,0,1,0,3,1,0,2,0,4,1,1,1,1,3,3,0,2,1,0,3,0,1,2,0,4,1,1,1,1,3,3,2,0,0,1,3,1,0,0,2,4,1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,4,1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,4,1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,1,-1,3,3,2,0,1,0,3,1,0,2,0,2,1,1,1,-1,3,3,0,2,1,0,3,0,1,2,0,2,1,1,1,-1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,-1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,1,-1,1,3,3,0,2,0,1,3,0,1,0,2,2,1,1,-1,1,3,3,2,0,1,0,3,1,0,2,0,2,1,-1,1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,-1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,1,-1,1,1,3,3,0,2,1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]}noise(t,e,i,n){const s=this.#C,o=this.#$,a=this.#S,r=this.#F,c=this.#G,l=this.#N,h=this.#L,d=(t+e+i+n)*r,u=t+d,p=e+d,g=i+d,f=n+d,y=Math.floor(u),m=Math.floor(p),w=Math.floor(g),v=Math.floor(f),b=(y+m+w+v)*c,x=t-(y+b),S=e-(m+b),P=i-(w+b),M=n-(v+b),C=u-y,_=p-m,k=g-w,O=f-v,T=C+_+k+O;let D=0;for(let t=a[k-O+1|_-k+1<<1|_-O+1<<2|C-_+1<<3|C-k+1<<4|C-O+1<<5|T<<6|T+O<<8|T+k<<11|T+_<<14|T+C<<17];void 0!==t;t=t.next){const e=x+t.dx,i=S+t.dy,n=P+t.dz,a=M+t.dw,r=2-e*e-i*i-n*n-a*a;if(r>0){const c=y+t.xsb,h=m+t.ysb,d=w+t.zsb,u=v+t.wsb,p=o[s[s[s[255&c]+h&255]+d&255]+u&255];D+=r*r*r*r*(l[p]*e+l[p+1]*i+l[p+2]*n+l[p+3]*a)}}return D*h}seed(t){const e=this.#U,i=this.#H,n=this.#B,s=[];for(let t=0;t<e.length;t+=16){const n=i[e[t]];let o=null,a=null;for(let e=0;e<n.length;e+=5)a=this.#j(n[e],n[e+1],n[e+2],n[e+3],n[e+4]),null===o?s[t/16]=a:o.next=a,o=a;a&&(a.next=this.#j(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),a.next.next=this.#j(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),a.next.next.next=this.#j(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this.#S=[];for(let t=0;t<n.length;t+=2)this.#S[n[t]]=s[n[t+1]];this.#C=new Uint8Array(256),this.#$=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=Ln(Ln(Ln(a)));for(let t=255;t>=0;t--){a=Ln(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#C[t]=o[e[0]],this.#$[t]=252&this.#C[t],o[e[0]]=o[t]}}#j(t,e,i,n,s){const o=this.#G;return{dx:-e-t*o,dy:-i-t*o,dz:-n-t*o,dw:-s-t*o,xsb:e,ysb:i,zsb:n,wsb:s}}}class Bn{noise2d;noise3d;noise4d;constructor(){this.noise2d=new Gn,this.noise3d=new Hn,this.noise4d=new Nn}}const Un={speed:.2,step:250};class $n{options;#u;#y;#q;constructor(t){this.#u=t,this.#y=A.origin;const e=new Bn;this.#q=e.noise2d,this.options=_t({},Un)}generate(t){const e=t.getPosition(),{speed:i,step:n}=this.options,s=e.x/n,o=e.y/n,a=.001,r=(this.#q.noise(s,o+a)-this.#q.noise(s,o-a))/.002,c=(this.#q.noise(s+a,o)-this.#q.noise(s-a,o))/.002;return t.velocity.x=0,t.velocity.y=0,this.#y.x=i*r,this.#y.y=i*-c,this.#y}init(){const t=this.#u,e=t.actualOptions.particles.move.path.options;this.options.seed=e.seed,this.options.speed=(e.speed??Un.speed)*t.retina.pixelRatio,this.options.step=e.step??Un.step,this.#q.seed(this.options.seed??$())}reset(){}update(){}}async function jn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("curlNoise",t=>Promise.resolve(new $n(t)))})}const qn={rndFunc:null,period:100,nbHarmonics:2,attenHarmonics:.8,lowValue:-.03,highValue:.03};class Wn{options;#u;constructor(t){this.#u=t,this.options=_t({},qn)}generate(t){if(!t.pathGen){const e=this.options;t.pathGen=function(t,e,i,n,s=0,o=1){const a=[],r=[],c=[],l=[],h=[],d=t??$;let u=0;i<1&&(i=1);for(let t=1;t<=i;++t)a[t]=d(),r[t]=d(),c[t]=1===t?1:c[t-1]*n,u+=c[t],l[t]=t/e,h[t]=d();return c.forEach((t,e)=>c[e]=t/u*(o-s)),()=>{let t,e,n=0;for(let s=i;s>=1;--s)t=h[s]+=l[s],h[s]>=1&&(t=h[s]-=1,a[s]=r[s],r[s]=d()),e=t**2*(3-2*t),n+=(a[s]*(1-e)+r[s]*e)*c[s];return n+s}}(e.rndFunc,e.period,e.nbHarmonics,e.attenHarmonics,e.lowValue,e.highValue)}return t.curveVelocity?(t.curveVelocity.length+=.01,t.curveVelocity.angle=(t.curveVelocity.angle+t.pathGen())%w):(t.curveVelocity=A.origin,t.curveVelocity.length=.6*$()+.8,t.curveVelocity.angle=$()*w),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(){const t=this.#u.actualOptions.particles.move.path.options;z(t.rndFunc)?this.options.rndFunc=t.rndFunc:E(t.rndFunc)&&(this.options.rndFunc=globalThis[t.rndFunc]??this.options.rndFunc),this.options.period=t.period??this.options.period,this.options.nbHarmonics=t.nbHarmonics??this.options.nbHarmonics,this.options.attenHarmonics=t.attenHarmonics??this.options.attenHarmonics,this.options.lowValue=t.lowValue??this.options.lowValue,this.options.highValue=t.highValue??this.options.highValue}reset(t){delete t.pathGen,delete t.curveVelocity}update(){}}async function Qn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("curvesPathGenerator",t=>Promise.resolve(new Wn(t)))})}const Zn=new Map;async function Yn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of Zn)t.pluginManager.addEasing(e,i)})}Zn.set("ease-in-back",t=>{const e=1.70158;return 2.70158*t**3-e*t**2}),Zn.set("ease-out-back",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),Zn.set("ease-in-out-back",t=>{const e=2.5949095;return t<.5?(2*t)**2*(7.189819*t-e)/2:((2*t-2)**2*((e+1)*(2*t-2)+e)+2)/2});const Xn=new Map,Kn=t=>{const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375};async function Jn(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of Xn)t.pluginManager.addEasing(e,i)})}Xn.set("ease-out-bounce",t=>Kn(t)),Xn.set("ease-in-bounce",t=>1-Kn(1-t)),Xn.set("ease-in-out-bounce",t=>t<.5?(1-Kn(1-2*t))/2:(1+Kn(2*t-1))/2);const ts=new Map;async function es(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of ts)t.pluginManager.addEasing(e,i)})}ts.set("ease-in-circ",t=>1-Math.sqrt(1-t**2)),ts.set("ease-out-circ",t=>Math.sqrt(1-(t-1)**2)),ts.set("ease-in-out-circ",t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2);const is=new Map;async function ns(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of is)t.pluginManager.addEasing(e,i)})}is.set("ease-in-cubic",t=>t**3),is.set("ease-out-cubic",t=>1-(1-t)**3),is.set("ease-in-out-cubic",t=>t<.5?4*t**3:1-(-2*t+2)**3/2);const ss=new Map;async function os(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of ss)t.pluginManager.addEasing(e,i)})}ss.set("ease-in-elastic",t=>0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin((t-1.075)*(2*Math.PI)/.3)),ss.set("ease-out-elastic",t=>0===t||1===t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1),ss.set("ease-in-out-elastic",t=>0===t||1===t?t:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin((t-1.1125)*(2*Math.PI)/.45):Math.pow(2,-10*(t-1))*Math.sin((t-1.1125)*(2*Math.PI)/.45)*.5+1);const as=new Map;async function rs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of as)t.pluginManager.addEasing(e,i)})}as.set("ease-in-expo",t=>t?2**(10*t-10):0),as.set("ease-out-expo",t=>1===t?1:1-Math.pow(2,-10*t)),as.set("ease-in-out-expo",t=>1===t?1:t?t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0);const cs=new Map,ls=t=>Math.exp(-4*(1-t)*(1-t));async function hs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of cs)t.pluginManager.addEasing(e,i)})}cs.set("ease-in-gaussian",t=>ls(t)),cs.set("ease-out-gaussian",t=>ls(t)),cs.set("ease-in-out-gaussian",t=>ls(t));const ds=new Map;async function us(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of ds)t.pluginManager.addEasing(e,i)})}ds.set("ease-in-linear",t=>t),ds.set("ease-out-linear",t=>t),ds.set("ease-in-out-linear",t=>t);const ps=new Map;async function gs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of ps)t.pluginManager.addEasing(e,i)})}ps.set("ease-in-quart",t=>t**4),ps.set("ease-out-quart",t=>1-(1-t)**4),ps.set("ease-in-out-quart",t=>t<.5?8*t**4:1-(-2*t+2)**4/2);const fs=new Map;async function ys(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of fs)t.pluginManager.addEasing(e,i)})}fs.set("ease-in-quint",t=>t**5),fs.set("ease-out-quint",t=>1-(1-t)**5),fs.set("ease-in-out-quint",t=>t<.5?16*t**5:1-(-2*t+2)**5/2);const ms=new Map,ws=t=>1/(1+Math.exp(-10*(t-.5)));async function vs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of ms)t.pluginManager.addEasing(e,i)})}ms.set("ease-in-sigmoid",t=>ws(t)),ms.set("ease-out-sigmoid",t=>ws(t)),ms.set("ease-in-out-sigmoid",t=>ws(t));const bs=new Map;async function xs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of bs)t.pluginManager.addEasing(e,i)})}bs.set("ease-in-sine",t=>1-Math.cos(t*Math.PI/2)),bs.set("ease-out-sine",t=>Math.sin(t*Math.PI/2)),bs.set("ease-in-out-sine",t=>-(Math.cos(Math.PI*t)-1)/2);const Ss=new Map,Ps=t=>t*t*(3-2*t);async function Ms(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of Ss)t.pluginManager.addEasing(e,i)})}Ss.set("ease-in-smoothstep",t=>Ps(t)),Ss.set("ease-out-smoothstep",t=>Ps(t)),Ss.set("ease-in-out-smoothstep",t=>Ps(t));const Cs="TSP-3201",_s="TSP-3202";class ks{enable=!1;mode=[];load(t){H(t)||(ce(this,"enable",t.enable),ce(this,"mode",t.mode))}}var Os,Ts,Ds;!function(t){t.circle="circle",t.rectangle="rectangle"}(Os||(Os={}));class As{enable=!1;mode=[];selectors=[];type=Os.circle;load(t){H(t)||(ce(this,"selectors",t.selectors),ce(this,"enable",t.enable),ce(this,"mode",t.mode),ce(this,"type",t.type))}}class Vs{enable=!1;mode=[];load(t){H(t)||(ce(this,"enable",t.enable),ce(this,"mode",t.mode))}}class Es{onClick=new ks;onDiv=new As;onHover=new Vs;load(t){if(H(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=Tt(e,t=>{const e=new As;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Ts||(Ts={}));class Is{#u;constructor(t){this.#u=t}load(t){if(H(t))return;if(!this.#u)return;const e=this.#u.interactionManager?.interactors??[];for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class zs{detectsOn=Ts.window;events=new Es;modes;constructor(t){this.modes=new Is(t)}load(t){if(H(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Rs{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Ty});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.interactivity;n?.load||(e.interactivity=n=new zs(t)),n.load(i?.interactivity);const s=t.interactionManager?.interactors;if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=_t({},i.interactivity));const n=t.interactionManager?.interactors;if(n)for(const t of n)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(Ds||(Ds={}));class Ls{type=Ds.external;container;constructor(t){this.container=t}}class Gs{type=Ds.particles;container;constructor(t){this.container=t}}const Fs="pointerleave",Hs="pointermove",Ns="touchstart",Bs="touchend",Us="touchmove",$s="touchcancel";function js(t,e){if(F(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function qs(t,e){return!!js(e,e=>e.enable&&xt(t,e.mode))}function Ws(t,e,i){Tt(e,e=>{const n=e.mode;e.enable&&xt(t,n)&&function(t,e){const i=t.selectors;Tt(i,i=>{e(i,t)})}(e,i)})}function Qs(t,e){if(e&&t)return js(t,t=>function(t,e){const i=Tt(e,e=>t.matches(e));return F(i)?i.some(t=>t):i}(e,t.selectors))}function Zs(t){if(!t.pluginManager.addInteractor)throw new Error(gt(Cs))}class Ys{count;delay;duration;wait=!1;load(t){H(t)||(ce(this,"count",t.count),le(this,"delay",t.delay),le(this,"duration",t.duration),ce(this,"wait",t.wait))}}class Xs{delay=.1;quantity=1;load(t){H(t)||(le(this,"quantity",t.quantity),le(this,"delay",t.delay))}}class Ks{color=!1;opacity=!1;load(t){H(t)||(ce(this,"color",t.color),ce(this,"opacity",t.opacity))}}class Js{options={};replace=new Ks;type="square";load(t){H(t)||(void 0!==t.options&&(this.options=_t({},t.options??{})),this.replace.load(t.replace),ce(this,"type",t.type))}}class to{height=0;mode=t.PixelMode.percent;width=0;load(t){H(t)||(ce(this,"mode",t.mode),ce(this,"height",t.height),ce(this,"width",t.width))}}class eo{fill;stroke;load(t){H(t)||(t.fill&&(this.fill??=new _e,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Le,this.stroke.load(t.stroke)))}}class io{autoPlay=!0;direction;domId;draggable=!1;draw=!0;fill=!0;life=new Ys;name;particles;position;rate=new Xs;shape=new Js;size;spawn=new eo;spawnFillColor;spawnStrokeColor;startCount=0;load(t){H(t)||(ce(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new to,this.size.load(t.size)),ce(this,"direction",t.direction),ce(this,"domId",t.domId),ce(this,"draggable",t.draggable),ce(this,"draw",t.draw),ce(this,"fill",t.fill),this.life.load(t.life),ce(this,"name",t.name),this.particles=Tt(t.particles,t=>_t({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=tt(t.position.x)),void 0!==t.position.y&&(this.position.y=tt(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new be,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new be,this.spawnStrokeColor.load(t.spawnStrokeColor)),ce(this,"startCount",t.startCount))}}var no;!function(t){t.emitter="emitter"}(no||(no={}));class so{#u;#W;constructor(t,e){this.#W=t,this.#u=e,this.#W.initContainer(e)}draw(t,e){for(const e of this.#W.getArray(this.#u))e.draw(t)}async init(){const t=this.#u.actualOptions.emitters;if(F(t))for(const e of t)await this.#W.addEmitter(this.#u,e);else await this.#W.addEmitter(this.#u,t)}pause(){for(const t of this.#W.getArray(this.#u))t.pause()}play(){for(const t of this.#W.getArray(this.#u))t.play()}resize(){for(const t of this.#W.getArray(this.#u))t.resize()}stop(){this.#W.clear(this.#u)}update(t){this.#W.getArray(this.#u).forEach(e=>{e.update(t)})}}var oo=Object.freeze({__proto__:null,EmittersPluginInstance:so});const ao={count:1,enable:!0},ro=no.emitter;class co extends Ls{handleClickMode;maxDistance;#Q=!1;#Z;#W;constructor(t,e){super(e),this.#W=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==ro)return;let n;if(F(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){n=[];const t=new Set;for(let s=0;s<i.random.count;s++){const o=Math.floor($()*i.value.length);if(t.has(o)&&t.size<e){s--;continue}t.add(o);const a=St(i.value,o);a&&n.push(a)}}else n=i.value}else n=i.value;const s=n,o=e.mouse.clickPosition;Tt(s,async t=>{await this.#W.addEmitter(this.container,t,o)})}}clear(){}init(){}interact(t,e){const i=this.container,n=this.#W.getArray(i),s=!i.plugins.some(t=>t instanceof so);for(const i of n){if(i.options.draggable&&!i.options.domId){const e=t.mouse;if(e.clicking&&e.downPosition){if(!this.#Q){Math.abs(e.downPosition.x-i.position.x)<=i.size.width*u&&Math.abs(e.downPosition.y-i.position.y)<=i.size.height*u&&(this.#Q=!0,this.#Z=i)}}else this.#Q=!1,this.#Z=void 0;this.#Q&&this.#Z===i&&e.position&&i.setPosition(e.position)}s&&i.update(e)}}isEnabled(t,e){const i=this.container,n=i.actualOptions,s=t.mouse,o=(e?.interactivity??n.interactivity).events;return!(!s.clicking||!this.#W.getArray(i).some(t=>t.options.draggable&&!t.options.domId))||!(!s.clickPosition||!o.onClick.enable)&&xt(ro,o.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:ao,value:[]};for(const i of e)if(i?.emitters)if(F(i.emitters))for(const e of i.emitters){const i=new io;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,F(e.value))for(const i of e.value){const e=new io;e.load(i),t.emitters.value.push(e)}else{const i=new io;i.load(e.value),t.emitters.value.push(i)}}else{const e=new io;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#W.getArray(this.container).indexOf(t);e>=0&&this.#W.getArray(this.container).splice(e,1)}reset(){}}async function lo(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Ay}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const ho=new WeakMap;function uo(t){const e=t.pluginManager;let i=ho.get(e);return i||(i=Promise.resolve().then(function(){return Vy}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw ho.delete(e),t}),ho.set(e,i)),i}class po{fill;options;position;size;constructor(t,e,i,n){this.position=t,this.size=e,this.fill=i,this.options=n}draw(t){}resize(t,e){this.position=t,this.size=e}}class go{id="emitters";#W;constructor(t){this.#W=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return oo});return new e(this.#W,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=Tt(i.emitters,t=>{const e=new io;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return F(e)&&!!e.length||void 0!==e}}const fo="TSP-3101";function yo(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error(gt(fo))}async function mo(t){await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{const e=await uo(t);await lo(t),t.pluginManager.addPlugin(new go(e))})}(t),await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{const e=await uo(t);Zs(t),await lo(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new co(e,t)))})}(t)}const wo=0,vo=1,bo=2,xo=3,So=1/255;function Po(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Mo(t,e,i,n=!0){const s=t.getImageData(g.x,g.y,e.width,e.height).data;n&&t.clearRect(g.x,g.y,e.width,e.height);const o=[];for(let t=0;t<s.length;t+=i){const n=t/i,a={x:n%e.width,y:Math.floor(n/e.width)};o[a.y]??=[];const r=o[a.y];r&&(r[a.x]={r:s[t+wo]??0,g:s[t+vo]??0,b:s[t+bo]??0,a:(s[t+xo]??1)*So})}return{pixels:o,width:Math.min(...o.map(t=>t.length)),height:o.length}}function Co(t,e,i){const n=new Image;n.crossOrigin="Anonymous";const s=new Promise((t,s)=>{n.onerror=s,n.onload=()=>{const o=wt().createElement("canvas");o.width=n.width,o.height=n.height;const a=o.getContext("2d",i);a?(a.drawImage(n,g.x,g.y,n.width,n.height,g.x,g.y,o.width,o.height),t(Mo(a,o,e))):s(new Error("Could not get canvas context"))}});return n.src=t,s}function _o(t,e,i,n){const s=wt().createElement("canvas"),o=s.getContext("2d",n),{font:a,text:r,lines:c,color:l}=t;if(!r||!o)return;const h=r.split(c.separator),d=I(a.size)?`${a.size.toString()}px`:a.size,u=[];let p=0,f=0;for(const t of h){o.font=`${a.style||""} ${a.variant||""} ${a.weight||""} ${d} ${a.family}`;const e=o.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};p=Math.max(p||0,i.width),f+=i.height+c.spacing,u.push(i)}s.width=p,s.height=f;let y=0;for(const t of u)o.font=`${a.style||""} ${a.variant||""} ${a.weight||""} ${d} ${a.family}`,i?(o.fillStyle=l,o.fillText(t.text,g.x,y+t.measure.actualBoundingBoxAscent)):(o.strokeStyle=l,o.strokeText(t.text,g.x,y+t.measure.actualBoundingBoxAscent)),y+=t.height+c.spacing;return Mo(o,s,e)}async function ko(t,e){try{await wt().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}class Oo extends po{filter;pixelData;scale;#u;constructor(t,e,i,n,s){super(e,i,n,s),this.#u=t;const o=s.filter;let a=t=>t.a>0;if(E(o)){if(o in globalThis){const t=globalThis[o];z(t)&&(a=t)}}else a=o;this.filter=a,this.scale=s.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const e=this.options,i=e.selector,n=e.pixels,s=e.image,o=e.element,a=e.text,r=n.offset;if(s){const e=s.src;if(!e)return;t=await Co(e,r,this.#u.canvas.render.settings)}else if(o??i){const e=o??(i&&wt().querySelector(i));if(!e)return;const n=e.getContext("2d",this.#u.canvas.render.settings);if(!n)return;t=Mo(n,e,r)}else{const e=_o(a,r,this.fill,this.#u.canvas.render.settings);if(H(e))return;t=e}this.pixelData=t}randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,n=this.position,s=this.scale,o=n.x-e*s*u,a=n.y-t*s*u;for(let n=0;n<100;n++){const n=Math.floor($()*e*t),r={x:n%e,y:Math.floor(n/e)},c=i.pixels[r.y];if(!c)continue;const l=c[r.x];if(!l)continue;if(this.filter(l))return{position:{x:r.x*s+o,y:r.y*s+a},color:{...l},opacity:l.a}}return null}resize(t,e){super.resize(t,e)}}class To{offset=4;load(t){H(t)||void 0!==t.offset&&(this.offset=t.offset)}}class Do{family="Verdana";size=32;style="";variant="";weight="";load(t){H(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Ao{separator="\n";spacing=0;load(t){H(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Vo{color="#000000";font=new Do;lines=new Ao;text="";load(t){H(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class Eo{element;image;pixels=new To;scale=1;selector="";text=new Vo;filter=t=>t.a>0;load(t){H(t)||(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class Io{generate(t,e,i,n,s){const o=new Eo;return o.load(s),new Oo(t,e,i,n,o)}}async function zo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{yo(t),t.pluginManager.addEmitterShapeGenerator?.("canvas",new Io)})}const Ro="TSP-3102",Lo="TSP-3103";class Go extends po{checkContext;path;points;constructor(t,e,i,n,s){super(e,i,n,s);const o=wt().createElement("canvas").getContext("2d",t.canvas.render.settings);if(!o)throw new Error(gt(Ro));this.checkContext=o,this.points=s.points;const a=this.points,r=new Path2D,c=e.x-i.width*u,l=e.y-i.height*u;for(const[t,e]of a.entries()){const n={x:c+e.x*i.width/d,y:l+e.y*i.height/d};t?r.lineTo(n.x,n.y):r.moveTo(n.x,n.y)}const h=a.length?a[0]:null;if(!h)throw new Error(gt(Lo));const p={x:c+h.x*i.width/d,y:l+h.y*i.height/d};r.lineTo(p.x,p.y),this.path=r}draw(t){const e=this.position,i=this.size,n=this.points,s=e.x-i.width*u,o=e.y-i.height*u;for(const[e,a]of n.entries()){const n={x:s+a.x*i.width/d,y:o+a.y*i.height/d};e?t.lineTo(n.x,n.y):t.moveTo(n.x,n.y)}t.closePath()}async init(){}randomPosition(){const t=this.checkContext,e=this.position,i=this.size,n=this.fill,s=this.path,o=n?function(t,e,i,n){let s=null;for(let o=0;o<100;o++){const o={x:i.x+$()*n.width-n.width*u,y:i.y+$()*n.height-n.height*u};if(t.isPointInPath(e,o.x,o.y)){s=o;break}}return s}(t,s,e,i):function(t,e,i,n){let s=null;for(let o=0;o<100;o++){const o={x:i.x+$()*n.width-n.width*u,y:i.y+$()*n.height-n.height*u};if(t.isPointInStroke(e,o.x,o.y)){s=o;break}}return s}(t,s,e,i);return o?{position:o}:null}resize(t,e){super.resize(t,e);const i=this.points,n=new Path2D,s=t.x-e.width*u,o=t.y-e.height*u;for(const[t,a]of i.entries()){const i={x:s+a.x*e.width/d,y:o+a.y*e.height/d};t?n.lineTo(i.x,i.y):n.moveTo(i.x,i.y)}const a=i.length?i[0]:null;if(!a)throw new Error(gt(Lo));const r={x:s+a.x*e.width/d,y:o+a.y*e.height/d};n.lineTo(r.x,r.y),this.path=n}}const Fo=50,Ho=50;class No{points=[];load(t){H(t)||void 0!==t.points&&(this.points=t.points.map(t=>({x:t.x??Fo,y:t.y??Ho})))}}class Bo{generate(t,e,i,n,s){const o=new No;return o.load(s),new Go(t,e,i,n,o)}}async function Uo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{yo(t),t.pluginManager.addEmitterShapeGenerator?.("path",new Bo)})}function $o(t,e,i,n=0){const s=[],o=w/e;for(let a=0;a<e;a++){const e=o*a+n;s.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return s}function jo(t,e){let i=!1;for(let n=0,s=e.length-1;n<e.length;s=n++){const o=e[n],a=e[s];if(!o||!a)continue;o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}class qo extends po{angle;polygon;sides;constructor(t,e,i,n){super(t,e,i,n),this.sides=n.sides,this.angle=ot(n.angle),this.polygon=$o(t,this.sides,e.width*u,this.angle)}draw(t){const e=this.polygon;for(const[i,n]of e.entries())i?t.lineTo(n.x,n.y):t.moveTo(n.x,n.y);t.closePath()}async init(){}randomPosition(){const t=this.fill,e=this.polygon,i=t?function(t){const e=t[0];if(!e)return null;const i={...e},n={...e};for(const e of t)e.x<i.x&&(i.x=e.x),e.x>n.x&&(n.x=e.x),e.y<i.y&&(i.y=e.y),e.y>n.y&&(n.y=e.y);let s=null;for(let e=0;e<100;e++){const e={x:i.x+$()*(n.x-i.x),y:i.y+$()*(n.y-i.y)};if(jo(e,t)){s=e;break}}return s}(e):function(t){const e=Math.floor($()*t.length),i=t[e];if(!i)return;const n=t[(e+1)%t.length];if(!n)return;const s=$();return{x:i.x+(n.x-i.x)*s,y:i.y+(n.y-i.y)*s}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=$o(t,this.sides,e.width*u,this.angle)}}class Wo{angle=0;sides=5;load(t){H(t)||(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class Qo{generate(t,e,i,n,s){const o=new Wo;return o.load(s),new qo(e,i,n,o)}}async function Zo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{yo(t),t.pluginManager.addEmitterShapeGenerator?.("polygon",new Qo)})}class Yo{id="export-image";async getPlugin(t){const{ExportImagePluginInstance:e}=await Promise.resolve().then(function(){return Ey});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Xo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Yo)})}class Ko{id="export-json";async getPlugin(t){const{ExportJSONPluginInstance:e}=await Promise.resolve().then(function(){return Iy});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Jo(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ko)})}class ta{id="export-video";async getPlugin(t){const{ExportVideoPluginInstance:e}=await Promise.resolve().then(function(){return Ly});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function ea(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ta)})}class ia{drawVector=!0;maxDragDistance=0;maxParticles=200;minParticles=5;particleFactor=.2;spread=30;vectorColor="#ffffff80";velocityFactor=.5;load(t){t&&(ce(this,"spread",t.spread),ce(this,"velocityFactor",t.velocityFactor),ce(this,"particleFactor",t.particleFactor),ce(this,"minParticles",t.minParticles),ce(this,"maxParticles",t.maxParticles),ce(this,"maxDragDistance",t.maxDragDistance),ce(this,"drawVector",t.drawVector),ce(this,"vectorColor",t.vectorColor))}}var na;!function(t){t[t.idle=0]="idle",t[t.aiming=1]="aiming",t[t.fired=2]="fired"}(na||(na={}));const sa="cannon";class oa extends Ls{maxDistance=0;#Y;#X={origin:A.origin,current:A.origin,active:!1};#K=void 0;#J=na.idle;constructor(t){super(t)}clear(t,e){}init(){const t=this.container.actualOptions.interactivity?.modes.cannon??new ia;this.#Y={spread:ot(t.spread),maxDragDistance:t.maxDragDistance,velocityFactor:t.velocityFactor,particleFactor:t.particleFactor,minParticles:t.minParticles,maxParticles:t.maxParticles,drawVector:t.drawVector,vectorColor:t.vectorColor}}interact(t,e){const i=t.mouse,n=i.position,s=i.clicking,o=i.downPosition;s&&o&&o!==this.#K&&this.#J===na.idle&&(this.#K=o,this.#X={origin:{x:o.x,y:o.y},current:{x:o.x,y:o.y},active:!0},this.#J=na.aiming),this.#J===na.aiming&&n&&(this.#X.current={x:n.x,y:n.y},this.#tt()),s||this.#J!==na.aiming||(this.#X.active=!1,this.#et(),this.#J=na.idle)}isEnabled(t){const e=this.container,i=e.actualOptions.interactivity?.events;if(!i?.onClick.enable)return!1;const n=i.onClick.mode;return!!(Array.isArray(n)?n.includes(sa):n===sa)&&(this.#J!==na.idle||t.mouse.clicking)}loadModeOptions(t,...e){ue(t,"cannon",ia,...e)}reset(t,e){}#tt(){this.container.canvas.render.draw(t=>{const e=this.#Y;if(!e)return;const{origin:i,current:n}=this.#X,s=this.container.retina.pixelRatio,o=nt(i,n),a=e.maxDragDistance>0?Math.min(o,e.maxDragDistance*s):o,r=o>0?a/o:0,c=i.x+(n.x-i.x)*r,l=i.y+(n.y-i.y)*r;t.save(),t.strokeStyle=e.vectorColor,t.lineWidth=2*s,t.beginPath(),t.moveTo(i.x,i.y),t.lineTo(c,l),t.stroke();const h=Math.max(4,.05*a)*s;t.beginPath(),t.arc(i.x,i.y,h,0,w),t.strokeStyle=e.vectorColor,t.lineWidth=2*s,t.stroke(),t.restore()})}#et(){const t=this.#Y;if(!t)return;const{origin:e,current:i}=this.#X,n=this.container.retina.pixelRatio,s=nt(e,i),o=t.maxDragDistance>0?Math.min(s,t.maxDragDistance*n):s;if(o<2)return;const a=1/n,r=(d=i.x,u=i.y,p=e.x,g=e.y,Math.atan2(g-u,p-d)),c=o*a*t.velocityFactor,l=Math.min(t.maxParticles,Math.max(t.minParticles,Math.round(o*t.particleFactor))),h=180/Math.PI;var d,u,p,g;for(let i=0;i<l;i++){const i=r+j(-t.spread,t.spread),n=j(c*_,c);this.container.particles.addParticle(e,{move:{enable:!0,speed:n,direction:i*h}})}}}async function aa(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalCannon",t=>Promise.resolve(new oa(t)))})}class ra{options;pauseOnStop=!1;replaceCursor=!1;stopDelay=0;load(t){H(t)||(void 0!==t.options&&(this.options=_t({},t.options)),ce(this,"replaceCursor",t.replaceCursor),ce(this,"pauseOnStop",t.pauseOnStop),ce(this,"stopDelay",t.stopDelay))}}const ca="particle";class la extends Ls{maxDistance=0;#it;#nt;#st;constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container,i=e.actualOptions;if(!e.retina.reduceFactor)return;const n=t.mouse.position,s=i.interactivity?.modes.particle;if(!s)return;const o=s.pauseOnStop&&(t.mouse.position===this.#nt||t.mouse.position?.x===this.#nt?.x&&t.mouse.position?.y===this.#nt?.y),a=s.stopDelay;if(this.#nt=n?{...n}:void 0,this.#nt)if(o){if(this.#it)return;this.#it=setTimeout(()=>{if(this.#st){if(s.replaceCursor){const e=t.element;e&&(e instanceof Window||e instanceof Document?wt().body.style.cursor="":e.style.cursor="")}this.#st.destroy(!0),this.#st=void 0}},a)}else{if(this.#it&&(clearTimeout(this.#it),this.#it=void 0),!this.#st){const i=_t(s.options,{move:{enable:!1}});if(this.#st=e.particles.addParticle(this.#nt,i),s.replaceCursor){const e=t.element;e&&(e instanceof Window||e instanceof Document?wt().body.style.cursor="none":e.style.cursor="none")}}this.#st&&(this.#st.position.x=this.#nt.x,this.#st.position.y=this.#nt.y)}}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&(n.clicking&&n.inside&&!!n.position&&xt(ca,s.onClick.mode)||n.inside&&!!n.position&&xt(ca,s.onHover.mode))}loadModeOptions(t,...e){ue(t,"particle",ra,...e)}reset(){}}async function ha(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalParticle",t=>Promise.resolve(new la(t)))})}class da extends Ls{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{const i=this.container;if("pop"!==t)return;const n=e.mouse.clickPosition;if(!n)return;const s=i.particles.grid.queryCircle(n,i.retina.pixelRatio);if(s.length)for(const t of s)t.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&xt("pop",s.onClick.mode)}reset(){}}async function ua(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalPop",t=>Promise.resolve(new da(t)))})}class pa{drawAfter(t){const{context:e}=t;e.restore()}drawBefore(t){const{context:e,particle:i}=t;e.save();const n="number"==typeof i.filterBlur?`${i.filterBlur}px`:i.filterBlur,s=i.filterBrightness,o=i.filterContrast,a=i.filterDropShadow,r=i.filterGrayscale,c="number"==typeof i.filterHueRotate?`${i.filterHueRotate}deg`:i.filterHueRotate,l=i.filterInvert,h=i.filterOpacity,d=i.filterSaturate,u=i.filterSepia,p=i.filterUrl,g=n?`blur(${n})`:"",f=H(s)?"":`brightness(${s})`,y=H(o)?"":`contrast(${o})`,m=a?`drop-shadow(${a})`:"",w=H(r)?"":`grayscale(${r})`,v=H(c)?"":`hue-rotate(${c})`,b=H(l)?"":`invert(${l})`,x=H(h)?"":`opacity(${h})`,S=H(d)?"":`saturate(${d})`,P=H(u)?"":`sepia(${u})`,M=p?`url(${p})`:"";e.filter=`${g} ${f} ${y} ${m} ${w} ${v} ${b} ${x} ${S} ${P} ${M}`.trim()}particleInit(t,e){const i=e.effectData;i&&(e.filterBlur=i.blur,e.filterBrightness=i.brightness,e.filterContrast=i.contrast,e.filterDropShadow=i.dropShadow,e.filterGrayscale=i.grayscale,e.filterHueRotate=i.hueRotate,e.filterInvert=i.invert,e.filterOpacity=i.opacity,e.filterSaturate=i.saturate,e.filterSepia=i.sepia,e.filterUrl=i.url)}}async function ga(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("filter",()=>Promise.resolve(new pa))})}const fa=(t,e,i)=>t+i*(e-t),ya=t=>t*t*(3-2*t),ma=t=>t-Math.floor(t);class wa{#ot=29.537;#at=127.1;#rt=311.7;#ct=78.233;#lt=37.719;#ht=43758.5453;noise2d(t,e){const i=Math.floor(t),n=Math.floor(e),s=i+1,o=n+1,a=ya(t-i),r=ya(e-n),c=this.#dt(i,n),l=this.#dt(s,n),h=this.#dt(i,o),d=this.#dt(s,o),u=fa(c,l,a),p=fa(h,d,a);return fa(u,p,r)}noise3d(t,e,i){const n=Math.floor(t),s=Math.floor(e),o=Math.floor(i),a=n+1,r=s+1,c=o+1,l=ya(t-n),h=ya(e-s),d=ya(i-o),u=this.#ut(n,s,o),p=this.#ut(a,s,o),g=this.#ut(n,r,o),f=this.#ut(a,r,o),y=this.#ut(n,s,c),m=this.#ut(a,s,c),w=this.#ut(n,r,c),v=this.#ut(a,r,c),b=fa(u,p,l),x=fa(g,f,l),S=fa(y,m,l),P=fa(w,v,l),M=fa(b,x,h),C=fa(S,P,h);return fa(M,C,d)}noise4d(t,e,i,n){const s=Math.floor(t),o=Math.floor(e),a=Math.floor(i),r=Math.floor(n),c=s+1,l=o+1,h=a+1,d=r+1,u=ya(t-s),p=ya(e-o),g=ya(i-a),f=ya(n-r),y=this.#pt(s,o,a,r),m=this.#pt(c,o,a,r),w=this.#pt(s,l,a,r),v=this.#pt(c,l,a,r),b=this.#pt(s,o,h,r),x=this.#pt(c,o,h,r),S=this.#pt(s,l,h,r),P=this.#pt(c,l,h,r),M=this.#pt(s,o,a,d),C=this.#pt(c,o,a,d),_=this.#pt(s,l,a,d),k=this.#pt(c,l,a,d),O=this.#pt(s,o,h,d),T=this.#pt(c,o,h,d),D=this.#pt(s,l,h,d),A=this.#pt(c,l,h,d),V=fa(y,m,u),E=fa(w,v,u),I=fa(b,x,u),z=fa(S,P,u),R=fa(M,C,u),L=fa(_,k,u),G=fa(O,T,u),F=fa(D,A,u),H=fa(V,E,p),N=fa(I,z,p),B=fa(R,L,p),U=fa(G,F,p),$=fa(H,N,g),j=fa(B,U,g);return fa($,j,f)}seed(t){const e=1e4*Math.sin(t);this.#at=ma(15731*e),this.#rt=ma(789221*e),this.#ct=ma(1376312589*e),this.#lt=ma(974634777*e),this.#ot=ma(592558533*e),this.#ht=43758.5453}#dt(t,e){const i=Math.sin(t*this.#at+e*this.#rt)*this.#ht;return 2*(i-Math.floor(i))-1}#ut(t,e,i){const n=Math.sin(t*this.#at+e*this.#rt+i*this.#ct)*this.#ht;return 2*(n-Math.floor(n))-1}#pt(t,e,i,n){const s=Math.sin(t*this.#at+e*this.#rt+i*this.#lt+n*this.#ot)*this.#ht;return 2*(s-Math.floor(s))-1}}class va{#gt;constructor(){this.#gt=new wa}noise2d(t,e,i=5,n=.5,s=2){let o=0,a=1,r=1,c=0;for(let l=0;l<i;l++)o+=this.#gt.noise2d(t*a,e*a)*r,c+=r,r*=n,a*=s;return o/c}noise3d(t,e,i,n=5,s=.5,o=2){let a=0,r=1,c=1,l=0;for(let h=0;h<n;h++)a+=this.#gt.noise3d(t*r,e*r,i*r)*c,l+=c,c*=s,r*=o;return a/l}noise4d(t,e,i,n,s=5,o=.5,a=2){let r=0,c=1,l=1,h=0;for(let d=0;d<s;d++)r+=this.#gt.noise4d(t*c,e*c,i*c,n*c)*l,h+=l,l*=o,c*=a;return r/h}seed(t){this.#gt.seed(t)}}const ba=1,xa=0,Sa=0,Pa=1,Ma=0,Ca=0,_a={draw:!1,size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4,z:4e4}};class ka{container;field;noiseGen;noiseW;options;#y;constructor(t,e){this.container=t,this.noiseGen=e,this.field=[],this.noiseW=0,this.#y=A.origin,this.options=_t({},_a)}generate(t){const e=t.getPosition(),{size:i}=this.options,n=1/i,s=Math.max(Math.floor(e.x*n),0),o=Math.max(Math.floor(e.y*n),0),a=Math.max(Math.floor(e.z*n),0),{field:r}=this,c=r[s]?.[o]?.[a];return c?(this.#y.x=c.x,this.#y.y=c.y):(this.#y.x=0,this.#y.y=0),this.#y}init(){this.#ft()}reset(){}update(){this.#yt(),this.noiseW+=this.options.increment,this.options.draw&&this.container.canvas.render.draw(t=>{this.#mt(t)})}#yt(){const t=this.field,e=this.noiseGen,i=this.options,n=this.noiseW,s=i.factor.length,o=i.factor.angle;for(let a=0;a<i.columns;a++){const r=t[a];if(r)for(let t=0;t<i.rows;t++){const c=r[t];if(c)for(let r=0;r<i.layers;r++){const l=c[r];l&&(l.length=e.noise4d(a*s+i.offset.x,t*s+i.offset.y,r*s+i.offset.z,n),l.angle=e.noise4d(a*o,t*o,r*o,n)*w)}}}}#mt(t){const{field:e,options:i}=this;for(let n=0;n<i.columns;n++){const s=e[n];if(s)for(let e=0;e<i.rows;e++){const i=s[e];if(!i)continue;const o=i[0];if(!o)continue;const{angle:a,length:r}=o;t.setTransform(ba,xa,Sa,Pa,n*this.options.size,e*this.options.size),t.rotate(a),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*r),t.stroke(),t.setTransform(ba,xa,Sa,Pa,Ma,Ca)}}}#wt(){const{columns:t,rows:e,layers:i}=this.options;this.field=new Array(t);for(let n=0;n<t;n++){const t=new Array(e);for(let n=0;n<e;n++){const e=new Array(i);for(let t=0;t<i;t++)e[t]=A.origin;t[n]=e}this.field[n]=t}}#vt(){const t=this.container,e=t.actualOptions.particles.move.path.options,{options:i}=this;i.width=t.canvas.size.width,i.height=t.canvas.size.height,i.size=e.size>0?e.size:_a.size,i.increment=e.increment>0?e.increment:_a.increment,i.draw=!!e.draw;const n=e.offset;i.offset.x=n?.x??_a.offset.x,i.offset.y=n?.y??_a.offset.y,i.offset.z=n?.z??_a.offset.z;const s=e.factor;i.factor.angle=s?.angle??_a.factor.angle,i.factor.length=s?.length??_a.factor.length,i.seed=e.seed,this.noiseGen.seed(i.seed??$()),i.columns=Math.floor(i.width/i.size)+1,i.rows=Math.floor(i.height/i.size)+1,i.layers=Math.floor(t.zLayers/i.size)+1,this.#wt()}#ft(){this.noiseW=0,this.#vt(),addEventListener("resize",()=>{this.#vt()})}}class Oa extends ka{constructor(t){const e=new va;super(t,{noise4d:(t,i,n,s)=>e.noise4d(t,i,n,s),seed:t=>{e.seed(t)}})}}async function Ta(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("fractalNoise",t=>Promise.resolve(new Oa(t)))})}class Da{count;delay;duration;wait=!1;load(t){H(t)||(ce(this,"count",t.count),le(this,"delay",t.delay),le(this,"duration",t.duration),ce(this,"wait",t.wait))}}class Aa{mass=0;radius=0;load(t){H(t)||(ce(this,"mass",t.mass),ce(this,"radius",t.radius))}}class Va extends De{density=5;limit=new Aa;value=50;load(t){H(t)||(super.load(t),ce(this,"density",t.density),I(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Ea{enable=!1;quantity=4;load(t){if(H(t))return;ce(this,"enable",t.enable);const e=t.quantity;I(e)&&Number.isFinite(e)&&(this.quantity=Math.min(Math.max(Math.trunc(e),0),1e3))}}class Ia{color;destroy;draggable;life;name;opacity;orbits;position;size;split;constructor(){this.color=new ve,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Da,this.size=new Va,this.split=new Ea}load(t){H(t)||(void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,ce(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=tt(t.position.x)),void 0!==t.position.y&&(this.position.y=tt(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.split&&this.split.load(t.split),ce(this,"destroy",t.destroy),ce(this,"orbits",t.orbits))}}const za="absorbers",Ra="absorber-split";class La extends Ls{handleClickMode;maxDistance;#Q=!1;#bt;#W;constructor(t,e){super(t),this.maxDistance=0,this.#W=e,this.#W.initContainer(t),this.handleClickMode=(t,i)=>{const n=this.container,s=n.actualOptions.interactivity.modes.absorbers,{clickPosition:o}=i.mouse;if(t===Ra){if(!o)return;const t=e.getArray(n).filter(t=>nt(t.position,o)<t.size).sort((t,e)=>nt(t.position,o)-nt(e.position,o))[0];return void(t?.options.split.enable&&this.#W.splitAbsorber(n,t))}if(t!==za||!s)return;if(o){if(e.getArray(n).some(t=>nt(t.position,o)<t.size))return}const a=St(s)??new Ia;this.#W.addAbsorber(n,a,o)}}clear(){}init(){}interact(t,e){const i=this.#W.getArray(this.container),n=t.mouse;for(const t of i)if(t.options.draggable){if(n.clicking&&n.downPosition){if(!this.#Q){nt(t.position,n.downPosition)<=t.size&&(this.#Q=!0,this.#bt=t)}}else this.#Q=!1,this.#bt=void 0;this.#Q&&this.#bt===t&&n.position&&(t.position.x=n.position.x,t.position.y=n.position.y)}}isEnabled(t,e){const i=this.container,n=i.actualOptions,s=t.mouse,o=(e?.interactivity??n.interactivity).events;return!(e||!s.clicking||!this.#W.getArray(i).some(t=>t.options.draggable))||!(!s.clickPosition||!o.onClick.enable)&&(xt(za,o.onClick.mode)||xt(Ra,o.onClick.mode))}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(F(i.absorbers))for(const e of i.absorbers){const i=new Ia;i.load(e),t.absorbers.push(i)}else{const e=new Ia;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Ga=new WeakMap;function Fa(t){const e=t.pluginManager;let i=Ga.get(e);return i||(i=Promise.resolve().then(function(){return Gy}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Ga.delete(e),t}),Ga.set(e,i)),i}class Ha{id="absorbers";#W;constructor(t){this.#W=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return Fy});return new e(t,this.#W)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=Tt(i.absorbers,t=>{const e=new Ia;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return F(e)?!!e.length:!!e}}async function Na(t){await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Fa(t);e.addPlugin(new Ha(i))})}(t),await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Fa(t);Zs(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new La(t,i)))})}(t)}class Ba{bottom;left;right;top;load(t){H(t)||(le(this,"bottom",t.bottom),le(this,"left",t.left),le(this,"right",t.right),le(this,"top",t.top))}}var Ua;!function(t){t.explode="explode",t.none="none",t.split="split"}(Ua||(Ua={}));class $a{maxSizeFactor=3;speed=2;load(t){H(t)||(ce(this,"maxSizeFactor",t.maxSizeFactor),ce(this,"speed",t.speed))}}class ja extends De{value=3}class qa extends De{value={min:4,max:9}}class Wa{count=1;factor=new ja;fillColor;fillColorOffset;particles;rate=new qa;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){H(t)||(void 0!==t.fillColor&&(this.fillColor=ve.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ve.create(this.strokeColor,t.strokeColor)),ce(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=Tt(t.particles,t=>_t({},t)),ce(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 Qa=class{bounds=new Ba;explode=new $a;mode=Ua.none;split=new Wa;load(t){H(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function Za(t,e,i,n){return t&&n?function(t,e){const i=X(e.h??0),n=X(e.s??0),s=X(e.l??0),o=(t.h+i)%360,a=Math.max(0,Math.min(100,t.s+n)),r=Math.max(0,Math.min(100,t.l+s));return be.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(n,t):e?be.create(void 0,e):i?be.create(void 0,i):n?function(t){return be.create(void 0,{value:{hsl:t}})}(n):void 0}function Ya(e,i,n,s){const o=n.options.destroy;if(!o)return;const a=o.split,r=We(e,i,n.options),c=Dt(a.fillColor),l=Dt(a.strokeColor),h=n.getFillColor(),d=n.getStrokeColor();r.move.load({center:{x:n.position.x,y:n.position.y,mode:t.PixelMode.precise}});const u=1/X(a.factor.value),p=r.size;p&&(I(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(s);const g=Dt(r.paint),f=g?.fill,y=g?.stroke,m=Za(a.fillColorOffset,c,f?.color,h),w=Za(a.strokeColorOffset,l,y?.color,d);m&&f&&(f.color=m),w&&y&&(y.color=w);const v=a.sizeOffset?tt(-n.size.value,n.size.value):0,b={x:n.position.x+Y(v),y:n.position.y+Y(v)};return i.particles.addParticle(b,r,n.group,t=>!(t.size.value<.5)&&(t.velocity.length=Y(tt(n.velocity.length,t.velocity.length)),t.splitCount=(n.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Xa{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:s,left:o,right:a,top:r}=n,{destroyBounds:c}=t,l=e.canvas.size;s&&(c.bottom=X(s)*l.height/d),o&&(c.left=X(o)*l.width/d),a&&(c.right=X(a)*l.width/d),r&&(c.top=X(r)*l.height/d)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){ue(t,"destroy",Qa,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case Ua.split:!function(t,e,i){const n=i.options.destroy;if(!n)return;const s=n.split;if(s.count>=0){if(void 0===i.splitCount||i.splitCount>s.count)return;i.splitCount++}const o=X(s.rate.value),a=Dt(s.particles);for(let n=0;n<o;n++)Ya(t,e,i,a)}(this.#p,this.#u,t);break;case Ua.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,n=t.size.value,s=n*e.maxSizeFactor,o=t.getOpacity();t.exploding={initialFillOpacity:o.fillOpacity,initialSize:n,initialStrokeOpacity:o.strokeOpacity,maxSize:s,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=o.fillOpacity,t.strokeOpacity=o.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,n=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*n/60);const s=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*s,t.fillOpacity=i.initialFillOpacity*(1-s),t.strokeOpacity=i.initialStrokeOpacity*(1-s),void(s>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),n=t.destroyBounds;n&&(void 0!==n.bottom&&i.y>=n.bottom||void 0!==n.left&&i.x<=n.left||void 0!==n.right&&i.x>=n.right||void 0!==n.top&&i.y<=n.top)&&t.destroy()}}async function Ka(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Xa(t.pluginManager,e)))})}class Ja extends po{constructor(t,e,i,n){super(t,e,i,n)}draw(t){const e=this.position,i=this.size,n=w;t.ellipse(e.x,e.y,i.width*u,i.height*u,0,0,n)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[n,s]=[t.width*u,t.height*u],o=((t,e)=>{const i=$()*_,n=Math.atan(e/t*Math.tan(w*i)),s=$();return s<_?n:s<.5?Math.PI-n:s<.75?Math.PI+n:-n})(n,s),a=(h=o,(c=n)*(l=s)/Math.sqrt((l*Math.cos(h))**2+(c*Math.sin(h))**2)),r=e?a*Math.sqrt($()):a;var c,l,h;return{position:{x:i.x+r*Math.cos(o),y:i.y+r*Math.sin(o)}}}}class tr{generate(t,e,i,n,s){return new Ja(e,i,n,s)}}async function er(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{yo(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new tr)})}var ir;function nr(t,e){return t+e*($()-u)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(ir||(ir={}));class sr extends po{constructor(t,e,i,n){super(t,e,i,n)}draw(t){const e=this.position,i=this.size,n=i.width*u,s=i.height*u;t.rect(e.x-n,e.y-s,i.width,i.height)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:nr(e.x,i.width),y:nr(e.y,i.height)}};{const t=i.width*u,n=i.height*u,s=function(t){return L(ir,Math.floor($()*t),ir.BottomLeft)}(4),o=2*($()-u);switch(s){case ir.TopLeft:return{position:{x:e.x+o*t,y:e.y-n}};case ir.TopRight:return{position:{x:e.x-t,y:e.y+o*n}};case ir.BottomRight:return{position:{x:e.x+o*t,y:e.y+n}};case ir.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*n}}}}}}class or{generate(t,e,i,n,s){return new sr(e,i,n,s)}}async function ar(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{yo(t),t.pluginManager.addEmitterShapeGenerator?.("square",new or)})}class rr{momentumFactor=.03;preserveMomentum=false;load(t){H(t)||(ce(this,"momentumFactor",t.momentumFactor),ce(this,"preserveMomentum",t.preserveMomentum))}}const cr=16.666666666666668;class lr extends Ls{maxDistance=0;#xt;#St;#Pt;#Mt;#Ct;#_t=[];#kt=!1;#Ot;constructor(t){super(t)}clear(t,e){}init(){}interact(t,e){const i=t.mouse,n=i.position;if(n&&(this.#Ct=n),this.#Pt){const t=performance.now();i.clicking?this.#St=void 0:this.#St??=t;const e=void 0===this.#xt&&void 0!==this.#St&&t-this.#St>=50;if(!i.inside||this.#Tt(i)||e)return this.#Dt(),void(this.#kt=!1);const s=n??this.#Ct;if(!s)return;this.#_t.push({x:s.x,y:s.y,t:t}),this.#_t.length>5&&this.#_t.shift();const o=s.x+(this.#Mt?.x??0),a=s.y+(this.#Mt?.y??0);return this.#Pt.position.x=o-this.#Pt.offset.x,this.#Pt.position.y=a-this.#Pt.offset.y,this.#Pt.velocity.x=0,this.#Pt.velocity.y=0,this.#Pt.initialPosition.x=this.#Pt.position.x,this.#Pt.initialPosition.y=this.#Pt.position.y,void(this.#Pt.misplaced=!1)}if(!i.clicking)return this.#Dt(),void(this.#kt=!1);if(this.#kt)return;this.#kt=!0;const s=i.downPosition??n??this.#Ct,o=this.#At(t,s);if(!o||!n)return void(o||(this.#kt=!1));const a=o.getPosition();this.#Pt=o,this.#xt=i.clickTime,this.#Mt={x:a.x-n.x,y:a.y-n.y},this.#Ot={x:o.velocity.x,y:o.velocity.y},this.#St=void 0,this.#_t=[{x:n.x,y:n.y,t:performance.now()}],o.velocity.x=0,o.velocity.y=0,o.position.x=a.x-o.offset.x,o.position.y=a.y-o.offset.y,o.initialPosition.x=o.position.x,o.initialPosition.y=o.position.y,o.misplaced=!1}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!this.#Pt&&!this.#kt)||!!s?.onClick.enable&&n.clicking&&!!n.position&&xt("drag",s.onClick.mode)}loadModeOptions(t,...e){ue(t,"drag",rr,...e)}reset(t,e){}#At(t,e){if(!e)return;const i=this.container.particles.filter(e=>this.isEnabled(t,e));let n,s=1/0;for(const t of i){const i=nt(t.getPosition(),e),o=t.getRadius();!Number.isFinite(i)||!Number.isFinite(o)||i>o||i>=s||(n=t,s=i)}return n}#Tt(t){return void 0!==this.#xt&&void 0!==t.clickTime&&t.clickTime!==this.#xt}#Dt(){if(this.#Pt){const t=this.container.actualOptions.interactivity?.modes.drag;if((t?.preserveMomentum??!1)&&this.#_t.length>=2){const e=this.#_t[0],i=this.#_t[this.#_t.length-1];if(e&&i){const n=i.t-e.t;if(n>0){const s=t?.momentumFactor??.03;this.#Pt.velocity.x=(i.x-e.x)/n*cr*s,this.#Pt.velocity.y=(i.y-e.y)/n*cr*s}else this.#Ot&&(this.#Pt.velocity.x=this.#Ot.x,this.#Pt.velocity.y=this.#Ot.y)}else this.#Ot&&(this.#Pt.velocity.x=this.#Ot.x,this.#Pt.velocity.y=this.#Ot.y)}else this.#Ot&&(this.#Pt.velocity.x=this.#Ot.x,this.#Pt.velocity.y=this.#Ot.y)}this.#Pt=void 0,this.#xt=void 0,this.#St=void 0,this.#Mt=void 0,this.#Ct=void 0,this.#_t=[],this.#Ot=void 0}}async function hr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalDrag",t=>Promise.resolve(new lr(t)))})}class dr{x=0;y=0;load(t){t&&(ce(this,"x",t.x),ce(this,"y",t.y))}}class ur{value;weights=new dr;load(t){t&&(t.weights&&(this.weights??=new dr,this.weights.load(t.weights)),H(t.value)||(this.value=tt(t.value)))}}class pr{h=new ur;l=new ur;s=new ur;load(t){t&&(t.h&&(this.h??=new ur,this.h.load(t.h)),t.s&&(this.s??=new ur,this.s.load(t.s)),t.l&&(this.l??=new ur,this.l.load(t.l)))}}let gr=class{colorCoords=new pr;delay=1;particles;pauseOnStop=!1;quantity=1;load(t){H(t)||(ce(this,"delay",t.delay),ce(this,"quantity",t.quantity),ce(this,"pauseOnStop",t.pauseOnStop),void 0!==t.particles&&(this.particles=_t({},t.particles)),t.colorCoords&&(this.colorCoords??=new pr,this.colorCoords.load(t.colorCoords)))}};const fr="trail";class yr extends Ls{maxDistance=0;#Vt;#nt;#p;constructor(t,e){super(e),this.#p=t,this.#Vt=0}clear(){}init(){}interact(t,e){const i=this.container;if(!i.retina.reduceFactor)return;const n=i.actualOptions,s=n.interactivity?.modes.trail;if(!s)return;const o=s.delay*p/this.container.retina.reduceFactor;if(this.#Vt<o&&(this.#Vt+=e.value),this.#Vt<o)return;const a=t.mouse.position,r=!(s.pauseOnStop&&(a===this.#nt||a?.x===this.#nt?.x&&a?.y===this.#nt?.y));if(this.#nt=a?{...a}:void 0,r&&a){let t=s.particles;const e=s.colorCoords;if(e){const{width:n,height:o}=i.canvas.size,r={x:a.x/n,y:a.y/o},c=t=>!!(t?.weights?.x??t?.weights?.y),l=(t,e,i)=>{if(!c(t))return;const n=t?.weights,s=r.x*(n?.x??0)+r.y*(n?.y??0),o=t?.value??e,a=K(o??0),l=J(o??i),h=a+s*(l-a);return Math.min(l,Math.max(a,h))},h=s.particles?.paint?Dt(s.particles.paint):void 0,d=h?.fill,u=d?ci(this.#p,be.create(void 0,d.color)):void 0,p=l(e.h,u?.h,P),g=l(e.s,u?.s,M),f=l(e.l,u?.l,C);void 0===p&&void 0===g&&void 0===f||(t=_t({},s.particles,{paint:{fill:{color:{value:{h:p??u?.h,s:g??u?.s,l:f??u?.l}}}}}))}i.particles.push(s.quantity,a,t)}this.#Vt-=o}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&(n.clicking&&n.inside&&!!n.position&&xt(fr,s.onClick.mode)||n.inside&&!!n.position&&xt(fr,s.onHover.mode))}loadModeOptions(t,...e){ue(t,"trail",gr,...e)}reset(){}}async function mr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalTrail",e=>Promise.resolve(new yr(t.pluginManager,e)))})}var wr;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(wr||(wr={}));class vr{enable=!1;value=0;load(t){H(t)||(ce(this,"enable",t.enable),le(this,"value",t.value))}}class br{backColor;darken=new vr;enable=!1;enlighten=new vr;mode=wr.vertical;speed=25;load(t){H(t)||(void 0!==t.backColor&&(this.backColor=ve.create(this.backColor,t.backColor)),this.darken.load(t.darken),ce(this,"enable",t.enable),this.enlighten.load(t.enlighten),ce(this,"mode",t.mode),le(this,"speed",t.speed))}}class xr{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,n=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:n?Math.sin(e.angle):void 0}}init(e){!function(e,i){const n=i.options.roll;if(n?.enable)if(i.roll={enable:n.enable,horizontal:n.mode===wr.horizontal||n.mode===wr.both,vertical:n.mode===wr.vertical||n.mode===wr.both,angle:$()*w,speed:X(n.speed)/360},n.backColor)i.backColor=ci(e,n.backColor);else if(n.darken.enable&&n.enlighten.enable){const e=$()>=u?t.AlterType.darken:t.AlterType.enlighten;i.roll.alter={type:e,value:X(e===t.AlterType.darken?n.darken.value:n.enlighten.value)}}else n.darken.enable?i.roll.alter={type:t.AlterType.darken,value:X(n.darken.value)}:n.enlighten.enable&&(i.roll.alter={type:t.AlterType.enlighten,value:X(n.enlighten.value)});else i.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,e)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ue(t,"roll",br,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,n=t.roll;if(!n||!i?.enable)return;const s=n.speed*e.factor,o=w;n.angle+=s,n.angle>o&&(n.angle-=o)}(t,e)}}async function Sr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new xr(t.pluginManager)))})}class Pr{enable=!1;mode="destination-out";load(t){H(t)||(ce(this,"mode",t.mode),ce(this,"enable",t.enable))}}class Mr{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Hy});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.blend;n?.load||(e.blend=n=new Pr),n.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Pr,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Cr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Mr)})}class _r{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;i.circleRange??={min:0,max:w};const s=i.circleRange;e.arc(g.x,g.y,n,s.min,s.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,n=i?.angle??{max:360,min:0};e.circleRange=G(n)?{min:ot(n.min),max:ot(n.max)}:{min:0,max:ot(n)}}}async function kr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new _r))})}var Or;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Or||(Or={}));const Tr=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Dr=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ar{accepts(t){return t.startsWith("#")}handleColor(t){return this.#Et(t.value)}handleRangeColor(t){return this.#Et(t.value)}parseString(t){return this.#Et(t)}#Et(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Tr,(t,e,i,n,s)=>e+e+i+i+n+n+(void 0===s?"":s+s)),i=Dr.exec(e);return i?{a:i[Or.a]?Number.parseInt(i[Or.a],16)/255:1,b:Number.parseInt(i[Or.b]??"0",16),g:Number.parseInt(i[Or.g]??"0",16),r:Number.parseInt(i[Or.r]??"0",16)}:void 0}}async function Vr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ar)})}var Er;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Er||(Er={}));const Ir=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class zr{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 pi(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return pi({h:X(e.h),l:X(e.l),s:X(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ir.exec(t);return e?fi({a:e.length>4?ut(e[Er.a]):1,h:Number.parseInt(e[Er.h]??"0",10),l:Number.parseInt(e[Er.l]??"0",10),s:Number.parseInt(e[Er.s]??"0",10)}):void 0}}async function Rr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new zr)})}function Lr(e,i){const n=e.value,s=e.animation,o={delayTime:X(s.delay)*p,enable:s.enable,value:X(e.value)*i,max:J(n)*i,min:K(n)*i,loops:0,maxLoops:X(s.count),time:0};if(s.enable){switch(o.decay=1-X(s.decay),s.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=$()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=s.mode===t.AnimationMode.auto;switch(s.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=Y(o),e&&(o.status=$()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function Gr(e,i,n,s,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;i.time??=0;const h=i.delayTime??0;if(!(h>0&&i.time<h&&(i.time+=o.value,i.time<h))){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&&(n?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(n?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,n,s,o){switch(i){case t.DestroyType.max:n>=o&&e.destroy();break;case t.DestroyType.min:n<=s&&e.destroy()}}(e,s,i.value,r,c),e.destroyed||(i.value=Q(i.value,r,c))}}class Fr extends ye{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||ce(this,"destroy",t.destroy)}}class Hr extends Ve{animation=new Fr;value=1;load(t){if(H(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Nr{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Lr(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=X(i.speed)/d*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=$()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){ue(t,"opacity",Hr,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Gr(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Br(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Nr(t)))})}const Ur={[t.OutModeDirection.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[t.OutModeDirection.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[t.OutModeDirection.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[t.OutModeDirection.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class $r{modes;#u;#It;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#It=e.plugins.filter(t=>!!t.particleBounce)}update(e,i,n,s){if(!this.modes.includes(s))return;for(const t of this.#It)if(t.particleBounce?.(e,n,i))return;const o=e.getPosition(),a=e.offset,r=e.getRadius(),c=Ct(o,r),l=this.#u.canvas.size,h=!e.isInsideCanvasForOutMode(s,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||!(e.direction in Ur))return;const i=Ur[e.direction],n=e.bounds,s=e.canvasSize[i.canvas],o=e.particle.position,a=e.particle.velocity[i.axis];if(i.negative&&n[i.negativeEdge]<0?o[i.axis]=e.size+e.offset[i.axis]:!i.negative&&n[i.positiveEdge]>s&&(o[i.axis]=s-e.size-e.offset[i.axis]),!e.outOfCanvas||!(i.negative&&a<0||!i.negative&&a>0))return;e.particle.velocity[i.axis]*=-X(e.particle.options.bounce[i.bounce].value);const r=e.offset[i.axis]+e.size;o[i.axis]=i.negative?r:s-r,e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:c,canvasSize:l,offset:a,outOfCanvas:h,size:r})}}class jr{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,n,s){if(this.modes.includes(s)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(s,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=et(e.position,e.moveCenter),{x:n,y:s}=e.velocity;if(n<0&&t>e.moveCenter.radius||s<0&&i>e.moveCenter.radius||n>=0&&t<-e.moveCenter.radius||s>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class qr{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,n,s){if(!this.modes.includes(s))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const o=e.options.move.gravity,a=this.#u,r=a.canvas.size,c=e.getRadius();if(o.enable){const n=e.position;(!o.inverse&&n.y>r.height+c&&i===t.OutModeDirection.bottom||o.inverse&&n.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;Pt(e.position,a.canvas.size,g,c,i)||e.destroy()}}}const Wr=A.origin;class Qr{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,n,s){if(!this.modes.includes(s))return;const o=this.#u;if(e.outType===t.ParticleOutType.inside)this.#zt(e,o);else{if(e.isInsideCanvasForOutMode(s,i))return;e.outType===t.ParticleOutType.outside?this.#Rt(e):this.#Lt(e,o,i)}}#zt(t,e){const{x:i,y:n}=t.velocity;Wr.setTo(g),Wr.length=t.moveCenter.radius,Wr.angle=t.velocity.angle+Math.PI,Wr.addTo(t.moveCenter);const{dx:s,dy:o}=et(t.position,Wr);if(i<=0&&s>=0||n<=0&&o>=0||i>=0&&s<=0||n>=0&&o<=0)return;t.position.x=Math.floor(Y({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(Y({min:0,max:e.canvas.size.height}));const{dx:a,dy:r}=et(t.position,t.moveCenter);t.direction=Math.atan2(-r,-a),t.velocity.angle=t.direction,t.justWarped=!0}#Lt(e,i,n){const s=e.options.move.warp,o=i.canvas.size,a=e.getRadius(),r={bottom:o.height+a+e.offset.y,left:-a-e.offset.x,right:o.width+a+e.offset.x,top:-a-e.offset.y},c=Ct(e.position,a);n===t.OutModeDirection.right&&c.left>o.width+e.offset.x?(e.position.x=r.left,e.initialPosition.x=e.position.x,s||(e.position.y=$()*o.height,e.initialPosition.y=e.position.y),e.justWarped=!0):n===t.OutModeDirection.left&&c.right<-e.offset.x&&(e.position.x=r.right,e.initialPosition.x=e.position.x,s||(e.position.y=$()*o.height,e.initialPosition.y=e.position.y),e.justWarped=!0),n===t.OutModeDirection.bottom&&c.top>o.height+e.offset.y?(s||(e.position.x=$()*o.width,e.initialPosition.x=e.position.x),e.position.y=r.top,e.initialPosition.y=e.position.y,e.justWarped=!0):n===t.OutModeDirection.top&&c.bottom<-e.offset.y&&(s||(e.position.x=$()*o.width,e.initialPosition.x=e.position.x),e.position.y=r.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0)}#Rt(t){t.position.x=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=et(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class Zr{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#Gt(e,t.OutMode.bounce,t=>new $r(t)),this.#Gt(e,t.OutMode.out,t=>new Qr(t)),this.#Gt(e,t.OutMode.destroy,t=>new jr(t)),this.#Gt(e,t.OutMode.none,t=>new qr(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const n=e.options.move.outModes;e.justWarped=!1,this.#Ft(e,i,n.bottom??n.default,t.OutModeDirection.bottom),this.#Ft(e,i,n.left??n.default,t.OutModeDirection.left),this.#Ft(e,i,n.right??n.default,t.OutModeDirection.right),this.#Ft(e,i,n.top??n.default,t.OutModeDirection.top)}#Gt(t,e,i){const n=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)(n,e)&&this.updaters.set(e,i(this.#u))}#Ft(t,e,i,n){for(const s of this.updaters.values())s.update(t,n,e,i)}}async function Yr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Zr(t)))})}class Xr{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,n=Dt(i.paint,t.id,i.reduceDuplicates);this.#Ht(n,t,e),this.#Nt(n,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:n,strokeColor:s}=t,o=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),a=!!n&&(void 0!==s?.h.value&&s.h.enable||void 0!==s?.s.value&&s.s.enable||void 0!==s?.l.value&&s.l.enable);return!t.destroyed&&!t.spawning&&(o||a)}update(t,e){this.isEnabled(t)&&(_i(t.fillColor,e,this.#u.hdr),_i(t.strokeColor,e,this.#u.hdr))}#Ht(t,e,i){const n=t?.fill,s=t?.color,o=s??void 0;if(!n)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const a=be.create(void 0===o?void 0:be.create(void 0,o),n.color);e.fillEnabled=n.enable,e.fillOpacity=X(n.opacity),e.fillAnimation=a.animation;const r=ci(this.#p,a);r&&(e.fillColor=Pi(r,e.fillAnimation,i.retina.reduceFactor))}#Nt(t,e,i){const n=t?.stroke,s=t?.color,o=s??void 0;if(!n)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const a=be.create(void 0===o?void 0:be.create(void 0,o),n.color);e.strokeWidth=X(n.width)*i.retina.pixelRatio,e.strokeOpacity=X(n.opacity??1),e.strokeAnimation=a.animation;const r=ci(this.#p,a)??e.getFillColor();r&&(e.strokeColor=Pi(r,e.strokeAnimation,i.retina.reduceFactor))}}async function Kr(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Xr(t.pluginManager,e)))})}var Jr;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Jr||(Jr={}));const tc=/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 ec{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=tc.exec(t);return e?{a:e.length>4?ut(e[Jr.a]):1,b:parseInt(e[Jr.b]??"0",10),g:parseInt(e[Jr.g]??"0",10),r:parseInt(e[Jr.r]??"0",10)}:void 0}}async function ic(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ec)})}class nc extends ye{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||ce(this,"destroy",t.destroy)}}class sc extends Ve{animation=new nc;value=3;load(t){if(super.load(t),H(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class oc{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/d*e.retina.reduceFactor,n.sync||(t.size.velocity*=$()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){ue(t,"size",sc,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Lr(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&&Gr(t,t.size,!0,t.options.size.animation.destroy,e)}}async function ac(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new oc(t)))})}async function rc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([Cr(t),Vr(t),Rr(t),ic(t),Li(t),kr(t),Kr(t),Br(t),Yr(t),ac(t)])})}const cc=new Map;async function lc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{for(const[e,i]of cc)t.pluginManager.addEasing(e,i)})}cc.set("ease-in-quad",t=>t**2),cc.set("ease-out-quad",t=>1-(1-t)**2),cc.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const hc=["emoji"];const dc='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class uc{#Bt=new Map;destroy(){for(const[t,e]of this.#Bt)e instanceof ImageBitmap&&e.close(),this.#Bt.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#Bt.get(e);i&&function(t,e){const{context:i,opacity:n}=t,s=i.globalAlpha,o=e.width,a=o*u;i.globalAlpha=n,i.drawImage(e,-a,-a,o,o),i.globalAlpha=s}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!hc.some(t=>xt(t,e.type)))return;const i=[ko(dc)];Tt(hc.map(t=>e.options[t])[0],t=>{t.font&&i.push(ko(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const n=Dt(i.value,e.randomIndexData);if(!n)return;const s="string"==typeof n?{font:i.font??dc,padding:i.padding??0,value:n}:{font:dc,padding:0,...i,...n},o=s.font,a=s.value,r=`${a}_${o}`;if(this.#Bt.has(r))return void(e.emojiDataKey=r);const c=2*s.padding,l=J(e.size.value),h=l+c,d=2*h,u=new OffscreenCanvas(d,d),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${o}`,p.textBaseline="middle",p.textAlign="center",p.fillText(a,h,h);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#Bt.set(r,g),e.emojiDataKey=r}}async function pc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(hc,()=>Promise.resolve(new uc))})}const gc=A.origin;function fc(t,e,i,n,s,o,a){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(s,o);for(const e of c){const{dx:s,dy:o,distance:c}=et(e.position,i),l=r.speed*r.factor,h=Q(t.getEasing(r.easing)(1-c/n)*l,1,r.maxSpeed);gc.x=c?s/c*h:l,gc.y=c?o/c*h:l,a?.(e),e.position.subFrom(gc)}}let yc=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){H(t)||(ce(this,"distance",t.distance),ce(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),ce(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),ce(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const mc="attract";let wc=class extends Ls{handleClickMode;#Ut;#$t;#p;#jt;constructor(t,e){super(e),this.#p=t,this.#$t=0,this.#Ut=new Set,this.#jt=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.attract;if(s&&t===mc){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},s.duration*p)}}}get maxDistance(){return this.#$t}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#$t=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#Ut.clear();const e=this.container.actualOptions,i=t.status===Hs,n=e.interactivity?.events;if(!n)return;const{enable:s,mode:o}=n.onHover,{enable:a,mode:r}=n.onClick;i&&s&&xt(mc,o)?function(t,e,i,n,s){const o=i.mouse.position,a=e.retina.attractModeDistance;!a||a<0||!o||fc(t,e,o,a,new ae(o.x,o.y,a),t=>n(t),s)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#qt(t)}):a&&xt(mc,r)&&function(t,e,i,n,s){e.attract??={particles:[]};const{attract:o}=e;if(o.finish||(o.count??=0,o.count++,o.count===e.particles.count&&(o.finish=!0)),o.clicking){const o=i.mouse.clickPosition,a=e.retina.attractModeDistance;if(!a||a<0||!o)return;fc(t,e,o,a,new ae(o.x,o.y,a),t=>n(t),s)}else!1===o.clicking&&(o.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#qt(t)}),this.#Wt()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!(n.position&&s?.onHover.enable||n.clickPosition&&s?.onClick.enable))return!1;const o=s.onHover.mode,a=s.onClick.mode;return xt(mc,o)||xt(mc,a)}loadModeOptions(t,...e){ue(t,"attract",yc,...e)}reset(){}#Wt(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#jt.size)return;const e=Date.now(),i=t.delay*p,n=Math.max(.001,Math.min(1,t.speed));for(const[s,o]of this.#jt){if(this.#Ut.has(s))continue;if(s.destroyed){this.#jt.delete(s);continue}const a=o.target;if(e-o.lastInteractionTime<i)continue;let r=a.x-s.position.x,c=a.y-s.position.y,l=a.z-s.position.z;if(t.follow&&s.options.move.enable){const{x:t,y:e,z:i}=s.velocity,n=t*t+e*e+i*i;if(n>0){const s=(r*t+c*e+l*i)/n;r-=t*s,c-=e*s,l-=i*s}}s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=a.x,s.position.y=a.y,s.position.z=a.z,this.#jt.delete(s))}}#qt(t){this.#Ut.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#jt.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#jt.set(t,n)),n.lastInteractionTime=i}};async function vc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new wc(t.pluginManager,e)))})}const bc=Math.PI*u;function xc(t,e,i,n,s){const o=t.particles.grid.query(n,s);for(const t of o)n instanceof ae?Ot(kt(t),{position:e,mass:i**2*bc,velocity:A.origin,factor:A.origin}):n instanceof re&&Mc(t,Ct(e,i))}function Sc(t,e,i,n){Ws(i,e,(e,i)=>{!function(t,e,i,n){const s=wt().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,o=t.retina.pixelRatio,a={x:(s.offsetLeft+s.offsetWidth*u)*o,y:(s.offsetTop+s.offsetHeight*u)*o},r=s.offsetWidth*u*o,c=10*o,l=i.type===Os.circle?new ae(a.x,a.y,r+c):new re(s.offsetLeft*o-c,s.offsetTop*o-c,s.offsetWidth*o+2*c,s.offsetHeight*o+2*c);n(a,r,l)})}(t,e,i,(e,i,s)=>{xc(t,e,i,s,n)})})}function Pc(t){const e={bounced:!1},{pSide:i,pOtherSide:n,rectSide:s,rectOtherSide:o,velocity:a,factor:r}=t;return n.min<o.min||n.min>o.max||n.max<o.min||n.max>o.max||(i.max>=s.min&&i.max<=(s.max+s.min)*u&&a>0||i.min<=s.max&&i.min>(s.max+s.min)*u&&a<0)&&(e.velocity=a*-r,e.bounced=!0),e}function Mc(t,e){const i=Ct(t.getPosition(),t.getRadius()),n=t.options.bounce,s=Pc({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:X(n.horizontal.value)});s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const o=Pc({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:X(n.vertical.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}class Cc{distance=200;load(t){H(t)||ce(this,"distance",t.distance)}}const _c="bounce";class kc extends Ls{#$t;constructor(t){super(t),this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#$t=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===Hs;if(!i)return;const s=i.onHover.enable,o=i.onHover.mode,a=i.onDiv;n&&s&&xt(_c,o)?function(t,e,i){const n=10*t.retina.pixelRatio,s=e.mouse.position,o=t.retina.bounceModeDistance;!o||o<0||!s||xc(t,s,o,new ae(s.x,s.y,o+n),i)}(this.container,t,e=>this.isEnabled(t,e)):Sc(this.container,a,_c,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const o=s.onDiv;return!!n.position&&s.onHover.enable&&xt(_c,s.onHover.mode)||qs(_c,o)}loadModeOptions(t,...e){ue(t,"bounce",Cc,...e)}reset(){}}async function Oc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new kc(t)))})}class Tc{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!H(t)){if(ce(this,"distance",t.distance),ce(this,"duration",t.duration),ce(this,"mix",t.mix),le(this,"opacity",t.opacity),void 0!==t.color){const e=F(this.color)?void 0:this.color;this.color=Tt(t.color,t=>ve.create(e,t))}ce(this,"size",t.size)}}}class Dc extends Tc{selectors=[];load(t){super.load(t),H(t)||ce(this,"selectors",t.selectors)}}class Ac extends Tc{divs;load(t){super.load(t),H(t)||(this.divs=Tt(t.divs,t=>{const e=new Dc;return e.load(t),e}))}}class Vc{div;enabled=!1;fillColor;finalColor;id="bubble";inRange=!1;opacity;priority=100;radius;strokeColor}var Ec;function Ic(t,e,i,n){if(e>=i){return Q(t+(e-i)*n,t,e)}if(e<i){return Q(t-(i-e)*n,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Ec||(Ec={}));const zc="bubble";class Rc extends Ls{handleClickMode;#$t;#Qt=new WeakMap;#p;constructor(t,e){super(e),this.#p=t,this.#$t=0,e.bubble??={},this.handleClickMode=t=>{t===zc&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#$t}clear(t,e,i){const n=this.#Qt.get(t);n?.inRange&&!i||(t.removeModifier(zc),this.#Qt.delete(t))}getOrCreateModifier(t){let e=this.#Qt.get(t);return e||(e=new Vc,this.#Qt.set(t,e)),t.getModifier(e.id)!==e&&t.addModifier(e),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#$t=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,n=i.interactivity?.events;if(!n)return;const s=n.onHover,o=n.onClick,a=s.enable,r=s.mode,c=o.enable,l=o.mode,h=n.onDiv;a&&xt(zc,r)?this.#Zt(t):c&&xt(zc,l)?this.#Yt(t):Ws(zc,h,(i,n)=>{this.#Xt(t,e,i,n)})}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const{onClick:o,onDiv:a,onHover:r}=s,c=qs(zc,a);return!!(c||r.enable&&n.position||o.enable&&n.clickPosition)&&(xt(zc,r.mode)||xt(zc,o.mode)||c)}loadModeOptions(t,...e){ue(t,"bubble",Ac,...e)}reset(t,e){const i=this.#Qt.get(e);i&&(i.enabled=!1,i.inRange=!1)}#Yt(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,s=i.interactivity?.modes.bubble;if(!s||!n)return;e.bubble??={};const o=e.retina.bubbleModeDistance;if(!o||o<0)return;const a=e.particles.grid.queryCircle(n,o,e=>this.isEnabled(t,e)),{bubble:r}=e;for(const i of a){if(!r.clicking)continue;const a=this.getOrCreateModifier(i);a.enabled=!r.durationEnd,a.inRange=!r.durationEnd;const c=nt(i.getPosition(),n),l=(performance.now()-(t.mouse.clickTime??0))/p;l>s.duration&&(r.durationEnd=!0),l>2*s.duration&&(r.clicking=!1,r.durationEnd=!1);const h={bubbleObj:{optValue:e.retina.bubbleModeSize,value:a.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:Ec.size};this.#Kt(i,c,l,h);const d={bubbleObj:{optValue:s.opacity,value:a.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:Ec.opacity};this.#Kt(i,c,l,d),!r.durationEnd&&c<=o?this.#Jt(i,c):(a.fillColor=void 0,a.strokeColor=void 0)}}#Zt(t){const e=this.container,i=t.mouse.position,n=e.retina.bubbleModeDistance;if(!n||n<0||!i)return;const s=e.particles.grid.queryCircle(i,n,e=>this.isEnabled(t,e));for(const e of s){const s=this.getOrCreateModifier(e);s.enabled=!0,s.inRange=!0;const o=nt(e.getPosition(),i),a=1-o/n;o<=n?a>=0&&t.status===Hs&&(this.#te(e,a),this.#ee(e,a),this.#Jt(e,a)):this.reset(t,e),t.status===Fs&&this.reset(t,e)}}#Jt(t,e,i){const n=this.container.actualOptions,s=i??n.interactivity?.modes.bubble,o=this.getOrCreateModifier(t);if(s){if(!o.finalColor){const t=s.color;if(!t)return;const e=Dt(t);o.finalColor=ci(this.#p,e)}if(o.finalColor)if(s.mix){o.fillColor=void 0,o.strokeColor=void 0;const i=t.getFillColor();if(i){const t=li(vi(i,o.finalColor,1-e,e,this.container.hdr));o.fillColor=t,o.strokeColor=t}else o.fillColor=o.finalColor,o.strokeColor=o.finalColor}else o.fillColor=o.finalColor,o.strokeColor=o.finalColor}}#ee(t,e,i){const n=this.container.actualOptions,s=i?.opacity??n.interactivity?.modes.bubble?.opacity;if(!s)return;const o=Ic(t.opacity?.value??1,s,t.opacity?.max??1,e);if(void 0!==o){this.getOrCreateModifier(t).opacity=o}}#te(t,e,i){const n=this.container,s=i?.size?i.size*n.retina.pixelRatio:n.retina.bubbleModeSize;if(void 0===s)return;const o=Ic(t.size.value,s,t.size.max,e);if(void 0!==o){this.getOrCreateModifier(t).radius=o}}#Kt(t,e,i,n){const s=this.container,o=n.bubbleObj.optValue,a=s.actualOptions,r=a.interactivity?.modes.bubble;if(!r||void 0===o)return;const c=r.duration,l=s.retina.bubbleModeDistance,h=n.particlesObj.optValue,d=n.bubbleObj.value,u=n.particlesObj.value??0,p=n.type;if(!l||l<0||o===h)return;s.bubble??={};const g=this.getOrCreateModifier(t);if(s.bubble.durationEnd)d&&(p===Ec.size&&(g.radius=void 0),p===Ec.opacity&&(g.opacity=void 0));else if(e<=l){if((d??u)!==o){const t=u-i*(u-o)/c;p===Ec.size&&(g.radius=t),p===Ec.opacity&&(g.opacity=t)}}else p===Ec.size&&(g.radius=void 0),p===Ec.opacity&&(g.opacity=void 0)}#Xt(t,e,i,n){const s=this.container,o=wt().querySelectorAll(i),a=s.actualOptions.interactivity?.modes.bubble;a&&o.length&&o.forEach(i=>{const o=i,r=s.retina.pixelRatio,c={x:(o.offsetLeft+o.offsetWidth*u)*r,y:(o.offsetTop+o.offsetHeight*u)*r},l=o.offsetWidth*u*r,h=n.type===Os.circle?new ae(c.x,c.y,l):new re(o.offsetLeft*r,o.offsetTop*r,o.offsetWidth*r,o.offsetHeight*r),d=s.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of d){if(!h.contains(t.getPosition()))continue;let i=this.getOrCreateModifier(t);i.enabled=!0,i.inRange=!0;const n=Qs(a.divs,o);i.div&&i.div===o||(this.clear(t,e,!0),i=this.getOrCreateModifier(t),i.enabled=!0,i.inRange=!0,i.div=o),this.#te(t,1,n),this.#ee(t,1,n),this.#Jt(t,1,n)}})}}async function Lc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new Rc(t.pluginManager,e)))})}class Gc{opacity=.5;load(t){H(t)||le(this,"opacity",t.opacity)}}class Fc{distance=80;links=new Gc;radius=60;load(t){H(t)||(ce(this,"distance",t.distance),this.links.load(t.links),ce(this,"radius",t.radius))}}function Hc(t,e,i,n){const s=t.actualOptions,o=s.interactivity?.modes.connect;if(o)return function(t,e,i,n,s){const o=Math.floor(n.getRadius()/i.getRadius()),a=i.getFillColor(),r=n.getFillColor();if(!a||!r)return;const c=i.getPosition(),l=n.getPosition(),h=vi(a,r,i.getRadius(),n.getRadius(),t.hdr),d=e.createLinearGradient(c.x,c.y,l.x,l.y);return d.addColorStop(0,wi(a,t.hdr,s,t.peakNits,t.hdrMode)),d.addColorStop(Q(o,0,1),mi(h,t.hdr,s,t.peakNits,t.hdrMode)),d.addColorStop(1,wi(r,t.hdr,s,t.peakNits,t.hdrMode)),d}(t,e,i,n,o.links.opacity)}function Nc(t,e,i){t.canvas.render.draw(n=>{const s=Hc(t,n,e,i);if(!s)return;const o=e.getPosition(),a=i.getPosition();!function(t,e,i,n,s){Po(t,n,s),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(n,e.retina.linksWidth??0,s,o,a)})}class Bc extends Ls{#$t;constructor(t){super(t),this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#$t=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:n,connectModeRadius:s}=e.retina;if(!n||n<0||!s||s<0||!i)return;const o=Math.abs(s),a=e.particles.grid.queryCircle(i,o,e=>this.isEnabled(t,e));a.forEach((t,i)=>{const s=t.getPosition();for(const o of a.slice(i+1)){const i=o.getPosition(),a=Math.abs(n),r=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);r<a&&c<a&&Nc(e,t,o)}})}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!s?.onHover.enable||!n.position)&&xt("connect",s.onHover.mode)}loadModeOptions(t,...e){ue(t,"connect",Fc,...e)}reset(){}}async function Uc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new Bc(t)))})}function $c(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function jc(t,e,i){Ws(i,e,(e,i)=>{!function(t,e,i){const n=wt().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,s=t.retina.pixelRatio,o={x:(n.offsetLeft+n.offsetWidth*u)*s,y:(n.offsetTop+n.offsetHeight*u)*s},a=n.offsetWidth*u*s,r=10*s,c=i.type===Os.circle?new ae(o.x,o.y,a+r):new re(n.offsetLeft*s-r,n.offsetTop*s-r,n.offsetWidth*s+2*r,n.offsetHeight*s+2*r);$c(t,c)})}(t,e,i)})}class qc{distance=200;load(t){H(t)||ce(this,"distance",t.distance)}}const Wc="destroy";class Qc extends Ls{#$t;constructor(t){super(t),this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#$t=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===Hs;if(!i)return;const s=i.onHover.enable,o=i.onHover.mode,a=i.onDiv;n&&s&&xt(Wc,o)?function(t,e){const i=10*t.retina.pixelRatio,n=e.mouse.position,s=t.retina.destroyModeDistance;!s||s<0||!n||$c(t,new ae(n.x,n.y,s+i))}(this.container,t):jc(this.container,a,Wc)}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const o=s.onDiv;return!!n.position&&s.onHover.enable&&xt(Wc,s.onHover.mode)||qs(Wc,o)}loadModeOptions(t,...e){ue(t,"destroy",qc,...e)}reset(){}}async function Zc(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new Qc(t)))})}class Yc{blink=!1;color;consent=!1;opacity=1;load(t){H(t)||(ce(this,"blink",t.blink),void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"consent",t.consent),le(this,"opacity",t.opacity))}}class Xc{distance=100;links=new Yc;load(t){H(t)||(ce(this,"distance",t.distance),this.links.load(t.links))}}function Kc(t,e,i,n,s){t.canvas.render.draw(o=>{const a=e.getPosition();!function(t,e,i,n,s,o,a=!1,r,c){Po(t,i,n),t.strokeStyle=mi(s,a,o,r,c),t.lineWidth=e,t.stroke()}(o,e.retina.linksWidth??0,a,s,i,n,t.hdr,t.peakNits,t.hdrMode)})}class Jc extends Ls{#$t;#p;constructor(t,e){super(e),this.#p=t,this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#$t=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==Hs)return;const n=t.mouse.position;if(!n)return;const s=e.retina.grabModeDistance;if(!s||s<0)return;const o=e.particles.grid.queryCircle(n,s,e=>this.isEnabled(t,e));for(const t of o){const o=nt(t.getPosition(),n);if(o>s)continue;const a=i.modes.grab.links,r=a.opacity,c=r-o*r/s;if(c<=0)continue;const l=a.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=xi(this.#p,l,t.blink,t.consent)}const h=bi(t,void 0,e.particles.grabLineColor,e.hdr);h&&Kc(e,t,h,c,n)}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&xt("grab",s.onHover.mode)}loadModeOptions(t,...e){ue(t,"grab",Xc,...e)}reset(){}}async function tl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new Jc(t.pluginManager,e)))})}class el{force=2;smooth=10;load(t){H(t)||(ce(this,"force",t.force),ce(this,"smooth",t.smooth))}}class il extends Ls{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#ie(t,e)}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&xt("parallax",s.onHover.mode)}loadModeOptions(t,...e){ue(t,"parallax",el,...e)}reset(){}#ie(t,e){if(!this.isEnabled(t,e))return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.parallax;if(!s)return;const o=s.force,a=t.mouse.position;if(!a)return;const r=i.canvas.size,c=r.width*u,l=r.height*u,h=s.smooth,d=e.getRadius()/o,p=(a.x-c)*d,g=(a.y-l)*d,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function nl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new il(t)))})}const sl="pause";class ol extends Ls{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==sl)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=(e?.interactivity??i.interactivity)?.events;return!!n&&xt(sl,n.onClick.mode)}reset(){}}async function al(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new ol(t)))})}class rl{default=!0;groups=[];particles;quantity=4;load(t){H(t)||(ce(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),le(this,"quantity",t.quantity),this.particles=Tt(t.particles,t=>_t({},t)))}}const cl="push";class ll extends Ls{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==cl)return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.push;if(!s)return;const o=X(s.quantity);if(o<=0)return;const a=St([void 0,...s.groups]),r=_t(void 0!==a?i.actualOptions.particles.groups[a]:void 0,Dt(s.particles));i.particles.push(o,e.mouse.position,r,a)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&xt(cl,s.onClick.mode)}loadModeOptions(t,...e){ue(t,"push",rl,...e)}reset(){}}async function hl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new ll(t)))})}class dl{quantity=2;load(t){H(t)||le(this,"quantity",t.quantity)}}const ul="remove";class pl extends Ls{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==ul)return;const n=X(i.interactivity.modes.remove.quantity);for(let t=0;t<n;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&xt(ul,s.onClick.mode)}loadModeOptions(t,...e){ue(t,"remove",dl,...e)}reset(){}}async function gl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new pl(t)))})}class fl{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){H(t)||(ce(this,"distance",t.distance),ce(this,"duration",t.duration),ce(this,"easing",t.easing),ce(this,"factor",t.factor),ce(this,"speed",t.speed),ce(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class yl extends fl{selectors=[];load(t){super.load(t),H(t)||ce(this,"selectors",t.selectors)}}class ml extends fl{divs;load(t){super.load(t),H(t)||(this.divs=Tt(t.divs,t=>{const e=new yl;return e.load(t),e}))}}const wl="repulse";let vl=class extends Ls{handleClickMode;#ne;#Ut;#$t;#se;#p;#jt;constructor(t,e){super(e),this.#p=t,this.#$t=0,this.#se=A.origin,this.#Ut=new Set,this.#ne=A.origin,this.#jt=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.repulse;if(!s||t!==wl)return;e.repulse??={particles:[]};const o=e.repulse;o.clicking=!0,o.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);o.particles=[],o.finish=!1,setTimeout(()=>{e.destroyed||(o.clicking=!1)},s.duration*p)}}get maxDistance(){return this.#$t}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#$t=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#Ut.clear();const e=this.container.actualOptions,i=t.status===Hs,n=e.interactivity?.events;if(!n)return;const s=n.onHover,o=s.enable,a=s.mode,r=n.onClick,c=r.enable,l=r.mode,h=n.onDiv;i&&o&&xt(wl,a)?this.#oe(t):c&&xt(wl,l)?this.#ae(t):Ws(wl,h,(e,i)=>{this.#re(t,e,i)}),this.#Wt()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const o=s.onDiv,a=s.onHover,r=s.onClick,c=qs(wl,o);if(!(c||a.enable&&n.position||r.enable&&n.clickPosition))return!1;const l=a.mode,h=r.mode;return xt(wl,l)||xt(wl,h)||c}loadModeOptions(t,...e){ue(t,"repulse",ml,...e)}reset(){}#ae(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const n=e.repulse??{particles:[]};if(n.finish||(n.count??=0,n.count++,n.count===e.particles.count&&(n.finish=!0)),n.clicking){const s=e.retina.repulseModeDistance;if(!s||s<0)return;const o=Math.pow(s/6,3),a=t.mouse.clickPosition;if(void 0===a)return;const r=new ae(a.x,a.y,o),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:s,distance:r}=et(a,t.position),c=r**2,l=-o*i.speed/c;c<=o&&(this.#qt(t),n.particles.push(t),this.#ne.x=e,this.#ne.y=s,this.#ne.length=l,t.velocity.setTo(this.#ne))}}else if(!1===n.clicking){for(const t of n.particles)t.velocity.setTo(t.initialVelocity);n.particles=[]}}#oe(t){const e=this.container,i=t.mouse.position,n=e.retina.repulseModeDistance;!n||n<0||!i||this.#ce(t,i,n,new ae(i.x,i.y,n))}#ce(t,e,i,n,s){const o=this.container,a=o.particles.grid.query(n,e=>this.isEnabled(t,e)),r=o.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:h,maxSpeed:d}=r,u=this.#p.getEasing(c),p=(s?.speed??l)*h;for(const t of a){const{dx:n,dy:s,distance:o}=et(t.position,e),a=Q(u(1-o/i)*p,0,d);this.#se.x=o?n/o*a:p,this.#se.y=o?s/o*a:p,this.#qt(t),t.position.addTo(this.#se)}}#Wt(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#jt.size)return;const e=Date.now(),i=t.delay*p,n=Math.max(.001,Math.min(1,t.speed));for(const[s,o]of this.#jt){if(this.#Ut.has(s))continue;if(s.destroyed){this.#jt.delete(s);continue}const a=o.target;if(e-o.lastInteractionTime<i)continue;t.follow&&s.options.move.enable&&(a.x+=s.velocity.x,a.y+=s.velocity.y,a.z+=s.velocity.z);const r=a.x-s.position.x,c=a.y-s.position.y,l=a.z-s.position.z;s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=a.x,s.position.y=a.y,s.position.z=a.z,this.#jt.delete(s))}}#re(t,e,i){const n=this.container,s=n.actualOptions.interactivity?.modes.repulse;if(!s)return;const o=wt().querySelectorAll(e);o.length&&o.forEach(e=>{const o=e,a=n.retina.pixelRatio,r={x:(o.offsetLeft+o.offsetWidth*u)*a,y:(o.offsetTop+o.offsetHeight*u)*a},c=o.offsetWidth*u*a,l=i.type===Os.circle?new ae(r.x,r.y,c):new re(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.offsetHeight*a),h=Qs(s.divs,o);this.#ce(t,r,c,l,h)})}#qt(t){this.#Ut.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#jt.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#jt.set(t,n)),n.lastInteractionTime=i,e.follow&&t.options.move.enable&&(n.target.x+=t.velocity.x,n.target.y+=t.velocity.y,n.target.z+=t.velocity.z)}};async function bl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new vl(e,t)))})}class xl{factor=3;radius=200;load(t){H(t)||(ce(this,"factor",t.factor),ce(this,"radius",t.radius))}}class Sl{enabled=!1;id="slow";priority=100;speedFactor=1}const Pl="slow";class Ml extends Ls{#$t;#Qt=new WeakMap;constructor(t){super(t),this.#$t=0}get maxDistance(){return this.#$t}clear(t,e,i){const n=this.#Qt.get(t);n?.enabled&&!i||(t.removeModifier(Pl),this.#Qt.delete(t))}getOrCreateModifier(t){let e=this.#Qt.get(t);return e||(e=new Sl,this.#Qt.set(t,e)),t.getModifier(e.id)!==e&&t.addModifier(e),e}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#$t=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&xt(Pl,s.onHover.mode)}loadModeOptions(t,...e){ue(t,"slow",xl,...e)}reset(t,e){const i=this.#Qt.get(e);i&&(i.enabled=!1);const n=this.container,s=n.actualOptions,o=t.mouse.position,a=n.retina.slowModeRadius,r=s.interactivity?.modes.slow;if(!r||!a||a<0||!o)return;const c=nt(o,e.getPosition()),l=c/a,h=r.factor;if(c>a)return;const d=this.getOrCreateModifier(e);d.enabled=!0,d.speedFactor=l/h}}async function Cl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new Ml(t)))})}const _l=["image","images"],kl=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Ol(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,s().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function Tl(t){if("svg"!==t.type)return void await Ol(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(s().error("Image not found"),t.error=!0),t.loading=!1}function Dl(t,e,i,n,s=!1,o,a){const r=function(t,e,i,n=!1,s,o){const{svgData:a}=t;if(!a)return"";const r=wi(e,n,i,s,o);if(a.includes("fill"))return a.replaceAll(kl,()=>r);const c=a.indexOf(">");return`${a.substring(0,c)} fill="${r}"${a.substring(c)}`}(t,i,n.opacity?.value??1,s,o,a),c={color:i,data:{...t,svgData:r},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([r],{type:"image/svg+xml"}),n=URL.createObjectURL(i),s=new Image;s.addEventListener("load",()=>{c.loaded=!0,c.element=s,e(c),URL.revokeObjectURL(n)});s.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(n);const i={...t,error:!1,loading:!0};await Ol(i),c.loaded=!0,c.element=i.element,e(c)})()}),s.src=n})}const Al="TSP-2001",Vl="TSP-2002",El="TSP-2003",Il="TSP-2004";class zl{#u;#s;constructor(t,e){this.#s=t,this.#u=e}draw(t){const{context:e,radius:i,particle:n,opacity:s}=t,o=n.image,a=o?.element;if(o){if(e.globalAlpha=s,a){const t=o.ratio,n={x:-i,y:-i},s=2*i;e.drawImage(a,n.x,n.y,s,s/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#s.loadImage)return;const i=[];for(const n of e.preload)i.push(this.#s.loadImage(t,n));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!_l.includes(t.shape))return;const i=t.shapeData;if(!i)return;const n=this.#s.getImages?.(e),s=n?.find(t=>t.name===i.name||t.source===i.src);s||this.#le(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#s.getImages?.(t),n=e.shapeData;if(!n)return;const s=e.getFillColor(),o=i?.find(t=>t.name===n.name||t.source===n.src);if(!o)return;const a=n.replaceColor;o.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=o.svgData&&s?await Dl(o,n,s,e,t.hdr,t.peakNits,t.hdrMode):{color:s,data:o,element:o.element,loaded:!0,ratio:n.width&&n.height?n.width/n.height:o.ratio??1,replaceColor:a,source:n.src},i.ratio||(i.ratio=1);const r={image:i,close:n.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#le=async(t,e)=>{if(!this.#s.loadImage)throw new Error(gt(Il));await this.#s.loadImage(t,{name:e.name,replaceColor:e.replaceColor,src:e.src})}}class Rl{height;name;replaceColor;src="";width;load(t){H(t)||(ce(this,"height",t.height),ce(this,"name",t.name),ce(this,"replaceColor",t.replaceColor),ce(this,"src",t.src),ce(this,"width",t.width))}}class Ll{id="image-preloader";#s;constructor(t){this.#s=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return Ny});return new e(this.#s,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const n=e.preload;for(const t of i.preload){const e=n.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new Rl;e.load(t),n.push(e)}}}needsPlugin(){return!0}}async function Gl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error(gt(Al));if(!i.name&&!i.src)throw new Error(gt(Vl));t.images??=new Map;const n=t.getImages(e);if(!n.some(t=>t.name===i.name||t.source===i.src))try{const s={name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let o;n.push(s),t.images.set(e,n),o=i.replaceColor?Tl:Ol,await o(s)}catch{throw new Error(gt(El,i.name??i.src))}}}(t),t.pluginManager.addPlugin(new Ll(t)),t.pluginManager.addShape(_l,e=>Promise.resolve(new zl(t,e)))})}class Fl extends De{sync=!1;load(t){H(t)||(super.load(t),ce(this,"sync",t.sync))}}class Hl extends De{sync=!1;load(t){H(t)||(super.load(t),ce(this,"sync",t.sync))}}class Nl{count=0;delay=new Fl;duration=new Hl;load(t){H(t)||(ce(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Bl{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const n=i.delay.sync?1:$(),s=i.duration.sync?1:$();t.life={delay:e.retina.reduceFactor?X(i.delay.value)*n/e.retina.reduceFactor*p:0,delayTime:0,duration:e.retina.reduceFactor?X(i.duration.value)*s/e.retina.reduceFactor*p:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){ue(t,"life",Nl,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const n=t.life;let s=!1;if(t.spawning){if(n.delayTime+=e.value,!(n.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,n.delayTime=0,n.time=0}if(-1===n.duration)return;if(s?n.time=0:n.time+=e.value,n.time<n.duration)return;if(n.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=tt(0,i.width),a=tt(0,i.width);t.position.x=Y(o),t.position.y=Y(a),t.spawning=!0,n.delayTime=0,n.time=0,t.reset();const r=t.options.life;r&&(n.delay=X(r.delay.value)*p,n.duration=X(r.duration.value)*p)}(t,e,this.#u.canvas.size)}}async function Ul(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Bl(t)))})}class $l{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.shapeData;e.moveTo(-n,0),e.lineTo(n,0),e.lineCap=s?.cap??"butt"}(t)}getSidesCount(){return 1}}async function jl(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new $l))})}class ql{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!H(t)&&(le(this,"distance",t.distance),ce(this,"enable",t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class Wl extends Gs{#$t;constructor(t){super(t),this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(H(t.attractDistance)){const i=X(t.options.attract.distance);i>this.#$t&&(this.#$t=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,n=t.getPosition(),s=e.particles.grid.queryCircle(n,i);for(const e of s){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:s,dy:o}=et(n,i),a=t.options.attract.rotate,r=s/(1e3*a.x),c=o/(1e3*a.y),l=e.size.value/t.size.value,h=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*h,e.velocity.y+=c*h}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){ue(t,"attract",ql,...e)}reset(){}}async function Ql(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new Wl(t)))})}var Zl;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy",t.fluid="fluid"}(Zl||(Zl={}));class Yl{speed=2;load(t){H(t)||ce(this,"speed",t.speed)}}class Xl{maxForce=2.5;maxNeighbors=64;nearStiffness=.5;radius=30;restDensity=3;stiffness=.5;load(t){H(t)||(le(this,"maxForce",t.maxForce),ce(this,"maxNeighbors",t.maxNeighbors),le(this,"nearStiffness",t.nearStiffness),le(this,"radius",t.radius),le(this,"restDensity",t.restDensity),le(this,"stiffness",t.stiffness))}}class Kl{enable=!0;retries=0;load(t){H(t)||(ce(this,"enable",t.enable),ce(this,"retries",t.retries))}}class Jl{absorb=new Yl;bounce=new He;enable=!1;fluid=new Xl;maxSpeed=50;mode=Zl.bounce;overlap=new Kl;load(t){H(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),ce(this,"enable",t.enable),this.fluid.load(t.fluid),le(this,"maxSpeed",t.maxSpeed),ce(this,"mode",t.mode),this.overlap.load(t.overlap))}}const th=u,eh=1e-4;function ih(t,e,i,n){t.x<e?t.x+=(e-t.x)*th:t.x>i&&(t.x-=(t.x-i)*th),t.y<e?t.y+=(e-t.y)*th:t.y>n&&(t.y-=(t.y-n)*th)}class nh{#he=A.origin;#de;#ue=0;#pe=[];#ge;#fe=0;constructor(){this.#de=t=>{const e=this.#ge,i=t;if(!e||this.#pe.length>=this.#ue||i===e||i.destroyed||i.spawning||!i.options.collisions?.enable||i.options.collisions.mode!==Zl.fluid)return!1;const n=e.getRadius();return Math.abs(Math.round(this.#fe)-Math.round(i.getPosition().z))<=n+i.getRadius()}}separateOverlaps(t,e){const i=this.#pe;t.position.setTo(e);for(let e=0;e<3;e++)for(const e of i)this.#ye(t,e)}solve(t,e){const i=e.options.collisions;if(!i)return;const n=i.fluid,s=t.retina.pixelRatio,o=X(n.radius)*s,a=X(n.stiffness),r=X(n.nearStiffness),c=X(n.restDensity),l=X(n.maxForce),h=n.maxNeighbors,d=e.getRadius(),p=e.position,g=t.canvas.size,f=g.width>0&&g.height>0,y=f?.15*d:0,m=g.width-y,w=g.height-y,v=this.#pe;this.#ge=e,this.#ue=h,this.#fe=e.getPosition().z,this.#me(t,e,o,h);for(let t=0;t<3;t++){const t=e.getPosition();let i=0,n=0;for(const e of v){const s=1-nt(t,e.getPosition())/o,a=s*s;i+=a,n+=a*s}const s=(i-c)*a*u,h=n*r*u;f&&ih(p,y,m,w);for(const i of v){const n=i.getPosition(),a=n.x-t.x,r=n.y-t.y,c=Math.sqrt(a*a+r*r);if(c>o)continue;const g=1-c/o,f=Q(s+h*g,-l,l),y=d+i.getRadius(),m=Math.max(g*f*u,y-c);if(c>eh){const t=1/c;this.#he.x=a*t*m,this.#he.y=r*t*m}else this.#he.x=(e.id+i.id)%2==0?1:-1,this.#he.y=0,this.#he.multTo(m);p.x-=this.#he.x,p.y-=this.#he.y}}this.#me(t,e,o,h),f&&function(t,e,i,n){t.x<e?t.x=e:t.x>i&&(t.x=i),t.y<e?t.y=e:t.y>n&&(t.y=n)}(p,y,m,w),this.separateOverlaps(e,p),this.#we(e),f&&this.#ve(e,y,m,w)}#ve(t,e,i,n){const s=t.position,o=t.velocity;(s.x<=e||s.x>=i)&&(o.x=0),(s.y<=e||s.y>=n)&&(o.y=0)}#we(t){const e=this.#pe,i=t.position,n=t.velocity;let s=0;for(const o of e){const e=o.getPosition(),a=i.x-e.x,r=i.y-e.y,c=a*a+r*r,l=t.getRadius()+o.getRadius();if(!(c>=l*l||c<=eh)&&!(++s<5))return n.x*=.1,void(n.y*=.1)}}#ye(t,e){const i=t.position,n=e.position,s=i.x-n.x,o=i.y-n.y,a=s*s+o*o,r=t.getRadius()+e.getRadius();if(!(a>=r*r))if(a>eh){const t=Math.sqrt(a),e=1/t,n=r-t;i.x+=s*e*n,i.y+=o*e*n}else{const n=(t.id+e.id)%2==0?1:-1;i.x+=n*r}}#me(t,e,i,n){i<=0||n<=0||(this.#pe.length=0,t.particles.grid.queryCircle(e.getPosition(),i,this.#de,this.#pe))}}function sh(t,e,i,n,s,o){if(!t.options.collisions||!i.options.collisions)return;const a=Q(t.options.collisions.absorb.speed*s.factor,0,n);t.size.value=Math.sqrt(e*e+a*a),i.size.value-=a,i.size.value<=o&&(i.size.value=0,i.destroy())}const oh=t=>{t.options.collisions&&(t.collisionMaxSpeed??=X(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function ah(t,e){const i=t.getMass(),n=e.getMass(),s=t.velocity.length,o=e.velocity.length,a=i*s*s+n*o*o;Ot(kt(t),kt(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+n*c*c;if(l>1e-6*a){const i=Math.sqrt(a/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}oh(t),oh(e)}function rh(t,e,i,n){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case Zl.absorb:!function(t,e,i,n){const s=t.getRadius(),o=e.getRadius();!s&&o?t.destroy():s&&!o?e.destroy():s&&o&&(s>=o?sh(t,s,e,o,i,n):sh(e,o,t,s,i,n))}(t,e,i,n);break;case Zl.bounce:ah(t,e);break;case Zl.destroy:!function(t,e){t.unbreakable||e.unbreakable||ah(t,e);const i=t.getRadius(),n=e.getRadius();!i&&n?t.destroy():i&&!n?e.destroy():i&&n&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e);case Zl.fluid:}}class ch extends Gs{#be;#$t;constructor(t){super(t),this.#be=new nh,this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const n=t.options.collisions;if(!n?.enable)return;if(n.mode===Zl.fluid){const e=X(n.fluid.radius);return e>this.#$t&&(this.#$t=e),void this.#be.solve(this.container,t)}const s=this.container,o=t.getPosition(),a=t.getRadius(),r=s.particles.grid.queryCircle(o,2*a);for(const e of r){if(t===e||t.id>=e.id||!e.options.collisions?.enable||n.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const r=e.getPosition(),c=e.getRadius();if(Math.abs(Math.round(o.z)-Math.round(r.z))>a+c)continue;nt(o,r)>a+c||rh(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){ue(t,"collisions",Jl,...e)}reset(t,e){}}const lh="TSP-4001";class hh{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return By});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function dh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addPlugin(new hh),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new ch(t)))})}class uh extends ae{#xe;constructor(t,e,i,n){super(t,e,i),this.#xe=n}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#xe,{x:n,y:s}=t;return super.contains({x:n-e,y:s})||super.contains({x:n+e,y:s})||super.contains({x:n,y:s-i})||super.contains({x:n,y:s+i})||super.contains({x:n-e,y:s-i})||super.contains({x:n+e,y:s+i})||super.contains({x:n-e,y:s+i})||super.contains({x:n+e,y:s-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#xe,n=t.position,s=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of s){const i={x:n.x+e.x,y:n.y+e.y};let s;if(t instanceof ae)s=new ae(i.x,i.y,t.radius);else{const e=t;s=new re(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(s))return!0}return!1}}class ph{blur=5;color=new ve;enable=!1;constructor(){this.color.value="#000"}load(t){H(t)||(ce(this,"blur",t.blur),this.color=ve.create(this.color,t.color),ce(this,"enable",t.enable))}}class gh{color;enable=!1;frequency=1;opacity;load(t){H(t)||(void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"enable",t.enable),ce(this,"frequency",t.frequency),ce(this,"opacity",t.opacity))}}class fh{blink=!1;color=new ve;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new ph;triangles=new gh;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){H(t)||(ce(this,"id",t.id),ce(this,"blink",t.blink),this.color=ve.create(this.color,t.color),ce(this,"consent",t.consent),ce(this,"distance",t.distance),ce(this,"enable",t.enable),ce(this,"frequency",t.frequency),ce(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),ce(this,"width",t.width),ce(this,"warp",t.warp))}}function yh(t,e,i){const{dx:n,dy:s}=et(t,e),o={x:Math.abs(n),y:Math.abs(s)},a={x:Math.min(o.x,i.width-o.x),y:Math.min(o.y,i.height-o.y)};return Math.hypot(a.x,a.y)}class mh extends Gs{#$t;#p;constructor(t,e){super(e),this.#p=t,this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#$t&&(this.#$t=t.linksDistance);const e=t.getPosition(),i=this.container,n=i.canvas.size;if(e.x<g.x||e.y<g.y||e.x>n.width||e.y>n.height)return;const s=t.options.links,o=s.opacity,a=t.retina.linksDistance??0,r=s.warp,c=r?new uh(e.x,e.y,a,n):new ae(e.x,e.y,a),l=i.particles.grid.query(c);for(const i of l){const c=i.options.links;if(t===i||!c?.enable||s.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const l=i.getPosition();if(l.x<g.x||l.y<g.y||l.x>n.width||l.y>n.height)continue;const h=et(e,l).distance,d=r&&c.warp?yh(e,l,n):h,u=Math.min(h,d);if(u>a)continue;const p=(1-u/a)*o;this.#Se(t),t.links.push({destination:i,opacity:p,color:this.#Pe(t,i),isWarped:d<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){ue(t,"links",fh,...e)}reset(){}#Pe(t,e){const i=this.container,n=t.options.links;if(!n)return;return bi(t,e,void 0!==n.id?i.particles.linksColors.get(n.id):i.particles.linksColor,i.hdr)}#Se(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let n=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);n||(n=xi(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=n:e.particles.linksColors.set(i.id,n))}}class wh{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return $y});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function vh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;Zs(t),e.addPlugin(new wh(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new mh(e,t)))})}const bh=new Map;function xh(t,e){const{context:i,radius:n}=t,s=function(t){const e=bh.get(t);if(e)return e;const i=w/t,n=!!(t%2),s=(-Math.PI+(n?0:i))*u,o=[];for(let e=0;e<t;e++){const t=s+e*i;o[e]={x:Math.cos(t),y:Math.sin(t)}}return bh.set(t,o),o}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<s.length;t++){const e=s[t];if(!e)continue;const o=e.x*n,a=e.y*n;t?i.lineTo(o,a):i.moveTo(o,a)}i.closePath()}class Sh{draw(t){const{particle:e,radius:i}=t;xh(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(X(e?.sides??5))}}class Ph extends Sh{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Mh extends Sh{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Ch(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Ph))})}async function _h(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Mh))})}async function kh(t){t.checkVersion("4.5.0"),await Promise.all([Ch(t),_h(t)])}class Oh{decay=0;enable=!1;speed=0;sync=!1;load(t){H(t)||(ce(this,"enable",t.enable),le(this,"speed",t.speed),le(this,"decay",t.decay),ce(this,"sync",t.sync))}}class Th extends De{animation=new Oh;direction=t.RotateDirection.clockwise;path=!1;load(t){H(t)||(super.load(t),ce(this,"direction",t.direction),this.animation.load(t.animation),ce(this,"path",t.path))}}class Dh{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:ot(X(i.value)),min:0,max:w},e.pathRotation=i.path;let n=i.direction;if(n===t.RotateDirection.random){n=Math.floor(2*$())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(n){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const s=i.animation;s.enable&&(e.rotate.decay=1-X(s.decay),e.rotate.velocity=X(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(e.rotate.velocity*=$())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){ue(t,"rotate",Th,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(Gr(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Ah(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Dh(t)))})}class Vh{draw(t){!function(t){const{context:e,radius:i}=t,n=i*Math.SQRT1_2,s=2*n;e.rect(-n,-n,s,s)}(t)}getSidesCount(){return 4}}async function Eh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Vh))})}const Ih=0,zh=0;class Rh{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.sides,o=i.starInset??2;e.moveTo(Ih,zh-n);for(let t=0;t<s;t++)e.rotate(Math.PI/s),e.lineTo(Ih,zh-n*o),e.rotate(Math.PI/s),e.lineTo(Ih,zh-n)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(X(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=X(i?.inset??2)}}async function Lh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Rh))})}async function Gh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([rc(t),(async t=>{await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Rs(i)),i.initializers.interactors??=new Map,i.addInteractor=(t,e)=>{i.initialized||(i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e))},i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error(gt(_s));i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([nl(t),vc(t),Oc(t),Lc(t),Uc(t),Zc(t),tl(t),al(t),hl(t),gl(t),bl(t),Cl(t),Ql(t),dh(t),vh(t)])})(t),lc(t),pc(t),Gl(t),jl(t),kh(t),Eh(t),Lh(t),Ul(t),Kr(t),Ah(t)])})}const Fh=["text","character","char","multiline-text"];function Hh(t,e,i,n,s,o){const a={x:-e.length*i*u,y:i*u+n*i};s&&t.fillText(e,a.x,a.y),o&&t.strokeText(e,a.x,a.y)}class Nh{draw(t){!function(t){const{context:e,particle:i,fill:n,stroke:s,radius:o,opacity:a}=t,r=i.shapeData;if(!r)return;const c=r.value;if(i.textLines??=Dt(c,i.randomIndexData)?.split("\n")??[],i.maxTextLength??=i.textLines.length?Math.max(...i.textLines.map(t=>t.length)):i.textLines[0]?.length??0,!i.textLines.length||!i.maxTextLength)return;const l=i.textLines,h=r.style??"",d=r.weight??"400",u=r.font??"Verdana",p=2*Math.round(o)/(l.length*i.maxTextLength);e.font=`${h} ${d} ${p.toString()}px "${u}"`;const g=e.globalAlpha;e.globalAlpha=a;for(let t=0;t<l.length;t++){const i=l[t];i&&Hh(e,i,p,t,n,s)}e.globalAlpha=g}(t)}async init(t){const e=t.actualOptions;if(Fh.find(t=>xt(t,e.particles.shape.type))){const t=Fh.map(t=>e.particles.shape.options[t]).find(t=>!!t),i=[];Tt(t,t=>{i.push(ko(t.font,t.weight))}),await Promise.all(i)}}particleInit(t,e){if(!e.shape||!Fh.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const n=i.value;n&&(e.textLines=Dt(n,e.randomIndexData)?.split("\n")??[],e.maxTextLength=e.textLines.length?Math.max(...e.textLines.map(t=>t.length)):e.textLines[0]?.length??0)}}async function Bh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Fh,()=>Promise.resolve(new Nh))})}var Uh;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Uh||(Uh={}));class $h{decay=0;enable=!1;speed=0;sync=!1;load(t){H(t)||(ce(this,"enable",t.enable),le(this,"speed",t.speed),le(this,"decay",t.decay),ce(this,"sync",t.sync))}}class jh extends De{animation=new $h;direction=Uh.clockwise;enable=!1;load(t){super.load(t),H(t)||(this.animation.load(t.animation),ce(this,"direction",t.direction),ce(this,"enable",t.enable))}}class qh{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(e){const i=e.options.tilt;if(!i)return;e.tilt={enable:i.enable,value:ot(X(i.value)),sinDirection:$()>=u?1:-1,cosDirection:$()>=u?1:-1,min:0,max:w};let n=i.direction;if(n===Uh.random){n=Math.floor(2*$())>0?Uh.counterClockwise:Uh.clockwise}switch(n){case Uh.counterClockwise:case"counterClockwise":e.tilt.status=t.AnimationStatus.decreasing;break;case Uh.clockwise:e.tilt.status=t.AnimationStatus.increasing}const s=e.options.tilt?.animation;s?.enable&&(e.tilt.decay=1-X(s.decay),e.tilt.velocity=X(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(e.tilt.velocity*=$()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ue(t,"tilt",jh,...e)}update(e,i){this.isEnabled(e)&&e.tilt&&Gr(e,e.tilt,!1,t.DestroyType.none,i)}}async function Wh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new qh(t)))})}class Qh{color;enable=!1;frequency=.05;opacity=1;load(t){H(t)||(void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"enable",t.enable),ce(this,"frequency",t.frequency),le(this,"opacity",t.opacity))}}class Zh{enable=!1;fillColor;frequency=.05;opacity=1;strokeColor;load(t){H(t)||(void 0!==t.fillColor&&(this.fillColor=ve.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ve.create(this.strokeColor,t.strokeColor)),ce(this,"enable",t.enable),ce(this,"frequency",t.frequency),le(this,"opacity",t.opacity))}}class Yh{links=new Qh;particles=new Zh;load(t){H(t)||(this.links.load(t.links),this.particles.load(t.particles))}}class Xh{#u;#p;constructor(t,e){this.#p=t,this.#u=e}getColorStyles(t,e,i,n){const s=t.options,o=this.#u,a=s.twinkle;if(!a)return{};const r=a.particles,c=r.enable&&$()<r.frequency,l=t.options.zIndex,h=(1-t.zIndexFactor)**l.opacityRate,d=c?X(r.opacity)*h:n,u=ci(this.#p,r.fillColor),p=ci(this.#p,r.strokeColor),g=(()=>{if(u)return wi(u,o.hdr,d,o.peakNits,o.hdrMode)})(),f=(()=>{if(p)return wi(p,o.hdr,d,o.peakNits,o.hdrMode)})(),y={},m=c&&(!!g||!!f);return y.fill=m?g:void 0,y.stroke=m?f:void 0,y}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){ue(t,"twinkle",Yh,...e)}update(){}}async function Kh(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("twinkle",e=>Promise.resolve(new Xh(t.pluginManager,e)))})}class Jh{angle=50;move=10;load(t){H(t)||(le(this,"angle",t.angle),le(this,"move",t.move))}}class td{distance=5;enable=!1;speed=new Jh;load(t){if(!H(t)&&(le(this,"distance",t.distance),ce(this,"enable",t.enable),void 0!==t.speed))if(I(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class ed{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:$()*w,angleSpeed:X(e.speed.angle)/360,moveSpeed:X(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=X(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){ue(t,"wobble",td,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:n}=e.options,{wobble:s}=e;if(!n?.enable||!s)return;const o=t.retina.reduceFactor,a=s.angleSpeed*i.factor*o,r=s.moveSpeed*i.factor*o*(e.retina.wobbleDistance??0)/16.666666666666668,c=w,{position:l}=e;s.angle+=a,s.angle>c&&(s.angle-=c),l.x+=r*Math.cos(s.angle),l.y+=r*Math.abs(Math.sin(s.angle))}(this.#u,t,e)}}async function id(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new ed(t)))})}const nd="TSP-2101",sd="TSP-2102",od="TSP-2103",ad="TSP-2104",rd=[0,4,2,1],cd=[8,8,4,2];class ld{data;pos;constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t,e="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let n=t;--n>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var hd,dd;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(hd||(hd={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(dd||(dd={}));function ud(t){return R(dd,t)?t:void 0}function pd(t,e){const i=[];for(let n=0;n<e;n++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function gd(t,e,i){const n=e>>>3,s=7&e;return(t[n]+(t[n+1]<<8)+(t[n+2]<<16)&(1<<i)-1<<s)>>>s}async function fd(t,e,i,n,s,o,a){switch(ud(t.nextByte())){case dd.EndOfFile:return!0;case dd.Image:await async function(t,e,i,n,s,o){const a=e.frames[n(!0)];a.left=t.nextTwoBytes(),a.top=t.nextTwoBytes(),a.width=t.nextTwoBytes(),a.height=t.nextTwoBytes();const r=t.nextByte(),c=!(128&~r),l=!(64&~r);a.sortFlag=!(32&~r),a.reserved=(24&r)>>>3;const h=1<<1+(7&r);c&&(a.localColorTable=pd(t,h));const d=t=>{const{r:n,g:o,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return t!==s(null)?{r:n,g:o,b:r,a:255}:{r:n,g:o,b:r,a:i?Math.trunc((n+o+r)/3):0}},u=(()=>{try{return new ImageData(a.width,a.height,o)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p;if(l){for(let t=0,e=p+1,i=0,n=[[0]],s=0;s<4;s++)if(rd[s]<a.height){let o=0,r=0,c=!1;for(;!c;){const l=t;if(t=gd(g,i,e),i+=e+1,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{t>=n.length?n.push(n[l].concat(n[l][0])):l!==f&&n.push(n[l].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:c}=d(e);u.data.set([t,i,n,c],rd[s]*a.width+cd[s]*r+o%(4*a.width)),o+=4}n.length===1<<e&&e<12&&e++}o===4*a.width*(r+1)&&(r++,rd[s]+cd[s]*r>=a.height&&(c=!0))}}a.image=u,a.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,n=-4;const s=[[0]];for(;;){const o=t;if(t=gd(g,i,e),i+=e,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=s.length?s.push(s[o].concat(s[o][0])):o!==f&&s.push(s[o].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:o}=d(e);n+=4,u.data.set([t,i,s,o],n)}s.length>=1<<e&&e<12&&e++}}a.image=u,a.bitmap=await createImageBitmap(u)}}(t,e,i,n,s,o);break;case dd.Extension:!function(t,e,i,n){switch(ud(t.nextByte())){case dd.GraphicsControlExtension:{const s=e.frames[i(!1)];t.pos++;const o=t.nextByte();s.GCreserved=(224&o)>>>5,s.disposalMethod=L(hd,(28&o)>>>2,hd.Replace),s.userInputDelayFlag=!(2&~o);const a=!(1&~o);s.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&n(r),t.pos++;break}case dd.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case dd.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case dd.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,n,s);break;default:throw new EvalError("undefined block found")}return!1}class yd{#u;#Me;constructor(t){this.#u=t,this.#Me=new Map}destroy(){this.#Me.clear()}draw(t){const{context:e,opacity:i}=t;t.particle.gifData&&(e.globalAlpha=i,function(t,e){const{context:i,radius:n,particle:s,delta:o}=t,a=s.gifData;if(!a)return;const r=new OffscreenCanvas(a.width,a.height),c=r.getContext("2d",e);if(!c)throw new Error(gt(ad));c.imageSmoothingQuality="low",c.imageSmoothingEnabled=!1,c.clearRect(g.x,g.y,r.width,r.height);let l=s.gifFrame??0;const h={x:-a.width*u,y:-a.height*u},d=a.frames[l];if(s.gifTime??=0,d.bitmap){switch(i.scale(n/a.width,n/a.height),d.disposalMethod){case hd.UndefinedA:case hd.UndefinedB:case hd.UndefinedC:case hd.UndefinedD:case hd.Replace:c.drawImage(d.bitmap,d.left,d.top),i.drawImage(r,h.x,h.y),c.clearRect(g.x,g.y,r.width,r.height);break;case hd.Combine:c.drawImage(d.bitmap,d.left,d.top),i.drawImage(r,h.x,h.y);break;case hd.RestoreBackground:c.drawImage(d.bitmap,d.left,d.top),i.drawImage(r,h.x,h.y),c.clearRect(g.x,g.y,r.width,r.height),a.globalColorTable.length?c.putImageData(a.backgroundImage,h.x,h.y):c.putImageData(a.frames[0].image,h.x+d.left,h.y+d.top);break;case hd.RestorePrevious:{const t=c.getImageData(g.x,g.y,r.width,r.height);c.drawImage(d.bitmap,d.left,d.top),i.drawImage(r,h.x,h.y),c.clearRect(g.x,g.y,r.width,r.height),c.putImageData(t,g.x,g.y)}}if(s.gifTime+=o.value,s.gifTime>d.delayTime){if(s.gifTime-=d.delayTime,++l>=a.frames.length){if(null==s.gifLoopCount||--s.gifLoopCount<=0)return;l=0,c.clearRect(g.x,g.y,r.width,r.height)}s.gifFrame=l}i.scale(a.width/n,a.height/n)}}(t,this.#u.canvas.render.settings),e.globalAlpha=1)}loadShape(t){const e=t.shapeData;e?.src&&(this.#Me.has(e.src)||async function(t,e,i,n){n??=!1;const s=await fetch(t);if(!s.ok&&404===s.status)throw new EvalError("file not found");const o=await s.arrayBuffer(),a={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new ld(new Uint8ClampedArray(o));if("GIF89a"!==r.getString(6))throw new Error(gt(nd));a.width=r.nextTwoBytes(),a.height=r.nextTwoBytes();const c=r.nextByte(),l=!(128&~c);a.colorRes=(112&c)>>>4,a.sortFlag=!(8&~c);const h=1<<1+(7&c),d=r.nextByte();a.pixelAspectRatio=r.nextByte(),0!==a.pixelAspectRatio&&(a.pixelAspectRatio=(a.pixelAspectRatio+15)/64),l&&(a.globalColorTable=pd(r,h));const u=(()=>{try{return new ImageData(a.width,a.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error(gt(sd));const{r:p,g:g,b:f}=a.globalColorTable[d];u.data.set(l?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);a.backgroundImage=u;let y=-1,m=!0,w=-1;const v=t=>(t&&(m=!0),y),b=t=>(null!=t&&(w=t),w);try{do{m&&(a.frames.push({left:0,top:0,width:0,height:0,disposalMethod:hd.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),y++,w=-1,m=!1)}while(!await fd(r,a,n,v,b,e));a.frames.length--;for(const t of a.frames){if(t.userInputDelayFlag&&0===t.delayTime){a.totalTime=1/0;break}a.totalTime+=t.delayTime}return a}catch(t){if(t instanceof EvalError)throw new Error(gt(od,y.toString(),t.message),{cause:t});throw t}}(e.src,{colorSpace:"srgb"}).then(t=>{this.#Me.set(e.src,t)}))}particleInit(t,e){const i=e.shapeData;if(!i?.src)return;const n=this.#Me.get(i.src);n?(e.gifData=n,e.gifFrame=0,e.gifTime=0,e.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return Number.NaN}(n),0===e.gifLoopCount&&(e.gifLoopCount=Number.POSITIVE_INFINITY),void 0!==i.loopCount&&(e.gifLoopCount=i.loopCount)):setTimeout(()=>{this.particleInit(t,e)})}}async function md(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["gif","gifs"],t=>Promise.resolve(new yd(t)))})}class wd{count=0;decay=0;delay=0;enable=!1;speed=0;startValue=t.StartValueType.random;sync=!1;load(t){H(t)||(le(this,"count",t.count),ce(this,"enable",t.enable),le(this,"speed",t.speed),ce(this,"sync",t.sync),ce(this,"startValue",t.startValue),le(this,"decay",t.decay),le(this,"delay",t.delay))}}class vd{animation=new wd;value=0;load(t){H(t)||(this.animation.load(t.animation),le(this,"value",t.value))}}class bd{opacity;stop=0;value=new be;load(t){H(t)||(ce(this,"stop",t.stop),this.value=be.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new vd,I(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class xd{count=0;decay=0;delay=0;enable=!1;speed=0;sync=!1;load(t){H(t)||(le(this,"count",t.count),ce(this,"enable",t.enable),le(this,"speed",t.speed),le(this,"decay",t.decay),le(this,"delay",t.delay),ce(this,"sync",t.sync))}}class Sd{animation=new xd;direction=t.RotateDirection.clockwise;value=0;load(t){H(t)||(this.animation.load(t.animation),le(this,"value",t.value),ce(this,"direction",t.direction))}}class Pd{angle=new Sd;colors=[];type=t.GradientType.random;load(t){H(t)||(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map(t=>{const e=new bd;return e.load(t),e})),ce(this,"type",t.type))}}class Md{#u;#p;constructor(t,e){this.#p=t,this.#u=e}getColorStyles(e,i,n,s){const o=e.gradient;if(!o)return{};const a=this.#u,r=o.angle.value,c=o.type===t.GradientType.radial?i.createRadialGradient(g.x,g.y,0,g.x,g.y,n):i.createLinearGradient(Math.cos(r)*-n,Math.sin(r)*-n,Math.cos(r)*n,Math.sin(r)*n);for(const{stop:t,value:e,opacity:i}of o.colors){const n={h:e.h.value,s:e.s.value,l:e.l.value};c.addColorStop(t,wi(n,a.hdr,i?.value??s,a.peakNits,a.hdrMode))}return{fill:c}}init(e){const i=Dt(e.options.gradient);if(!i)return;const n=this.#u,{angle:s}=i;e.gradient={angle:{value:X(s.value),enable:s.animation.enable,velocity:X(s.animation.speed)/360*n.retina.reduceFactor,decay:1-X(s.animation.decay),delayTime:X(s.animation.delay)*p,max:w,min:0,time:0},type:i.type,colors:[]};let o=i.angle.direction;switch(o===t.RotateDirection.random&&(o=$()>u?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise),o){case t.RotateDirection.counterClockwise:case"counterClockwise":e.gradient.angle.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.gradient.angle.status=t.AnimationStatus.increasing}const a=e.options.reduceDuplicates;for(const s of i.colors){const i=ci(this.#p,s.value,e.id,a);if(!i)continue;const o=Pi(i,s.value.animation,n.retina.reduceFactor),r={stop:s.stop,value:o,opacity:s.opacity?{enable:s.opacity.animation.enable,max:J(s.opacity.value),min:K(s.opacity.value),status:t.AnimationStatus.increasing,value:X(s.opacity.value),velocity:X(s.opacity.animation.speed)/d*n.retina.reduceFactor,decay:1-X(s.opacity.animation.decay),delayTime:X(s.opacity.animation.delay)*p,time:0}:void 0},{opacity:c}=r;if(s.opacity&&c){const e=s.opacity.value;c.min=K(e),c.max=J(e);switch(s.opacity.animation.startValue){case t.StartValueType.min:c.value=c.min,c.status=t.AnimationStatus.increasing;break;case t.StartValueType.max:c.value=c.max,c.status=t.AnimationStatus.decreasing;break;case t.StartValueType.random:default:c.value=Y(c),c.status=$()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}}e.gradient.colors.push(r)}}isEnabled(t){return!t.destroyed&&!t.spawning&&(!!t.gradient?.angle.enable||(t.gradient?.colors.some(t=>t.value.h.enable||t.value.s.enable||t.value.l.enable)??!1))}loadOptions(t,...e){for(const i of e){if(!i?.gradient)continue;const e=i.gradient;t.gradient=Tt(e,t=>{const e=new Pd;return e.load(t),e})}}update(e,i){!function(e,i){const{gradient:n}=e;if(n){Gr(e,n.angle,!1,t.DestroyType.none,i);for(const s of n.colors)_i(s.value,i),s.opacity&&Gr(e,s.opacity,!0,t.DestroyType.none,i)}}(e,i,this.#u.hdr)}}async function Cd(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("gradient",e=>Promise.resolve(new Md(t.pluginManager,e)))})}const _d=[A.create(1,g.y),A.create(g.x,1),A.create(-1,g.y),A.create(g.x,-1)],kd=[2,3,0,1];class Od{options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.options={cellSize:40,graph:void 0,autoMaze:!1}}generate(t){const e=this.options.cellSize;t.grid??={direction:Math.trunc($()*_d.length),speed:t.velocity.length,cellPosition:{x:Math.floor(t.position.x/e),y:Math.floor(t.position.y/e)}};const i=t.grid,n={x:Math.floor(t.position.x/e),y:Math.floor(t.position.y/e)};if(n.x!==i.cellPosition.x||n.y!==i.cellPosition.y){i.cellPosition.x=n.x,i.cellPosition.y=n.y;const t=`${n.x},${n.y}`,e=this.options.graph?.[t];if(e&&e.length>0)i.direction=e[Math.trunc($()*e.length)];else if(!this.options.graph){const t=Math.trunc(3*$())-1;i.direction=(i.direction+t+4)%_d.length}}t.velocity.x=0,t.velocity.y=0;const s=_d[i.direction];return this.#y.x=s.x*i.speed,this.#y.y=s.y*i.speed,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;if(this.options.cellSize=t.cellSize??this.options.cellSize,this.options.autoMaze=t.autoMaze??this.options.autoMaze,this.options.graph=t.graph,this.options.autoMaze){const t=this.#u.canvas.size,e=this.options.cellSize,i={width:Math.ceil(t.width/e),height:Math.ceil(t.height/e)};this.options.graph=this.#Ce(i)}}reset(t){delete t.grid}update(){}#Ce({height:t,width:e}){const i={},n=[];for(let e=0;e<t;e++)n[e]=[];const s=[{x:g.x,y:g.y}];for(;s.length>0;){const{x:o,y:a}=s[s.length-1];n[a][o]||(n[a][o]=!0);const r=[0,1,2,3].sort(()=>$()-.5);let c=!1;for(const l of r){const r={x:o+(0===l?1:2===l?-1:0),y:a+(1===l?1:3===l?-1:0)};if(!(r.x<0||r.y<0||r.x>=e||r.y>=t)&&!n[r.y][r.x]){const t=`${o},${a}`,e=`${r.x},${r.y}`;i[t]??=[],i[e]??=[],i[t].push(l),i[e].push(kd[l]),s.push(r),c=!0;break}}c||s.pop()}return i}}async function Td(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("gridPathGenerator",t=>Promise.resolve(new Od(t)))})}class Dd{draw(t){!function(t){const{context:e,radius:i}=t,n=2*i,s=i*u,o=i+s,a=-i,r=-i;e.moveTo(a,r+s),e.quadraticCurveTo(a,r,a+s,r),e.quadraticCurveTo(a+i,r,a+i,r+s),e.quadraticCurveTo(a+i,r,a+o,r),e.quadraticCurveTo(a+n,r,a+n,r+s),e.quadraticCurveTo(a+n,r+i,a+o,r+o),e.lineTo(a+i,r+n),e.lineTo(a+s,r+o),e.quadraticCurveTo(a,r+i,a,r+s)}(t)}}async function Ad(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart"],()=>Promise.resolve(new Dd))})}function Vd(t){const e={b:0,g:0,r:0},i=t.h/60,n=t.s/d,s=t.v/d,o=s*n,a=o*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:o,g:a,b:0}:i>1&&i<=2?r={r:a,g:o,b:0}:i>2&&i<=3?r={r:0,g:o,b:a}:i>3&&i<=4?r={r:0,g:a,b:o}:i>4&&i<=5?r={r:a,g:0,b:o}:i>5&&i<=6&&(r={r:o,g:0,b:a}),r){const t=s-o;e.r=Math.floor((r.r+t)*S),e.g=Math.floor((r.g+t)*S),e.b=Math.floor((r.b+t)*S)}return e}const Ed=/hsva?\(\s*(\d+)°\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Id{accepts(t){return t.startsWith("hsv")}handleColor(t){const e=t.value.hsv??t.value;if("h"in e&&"s"in e&&"v"in e)return Vd(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if("h"in e&&"s"in e&&"v"in e)return Vd({h:X(e.h),s:X(e.s),v:X(e.v)})}parseString(t){if(!this.accepts(t))return;const e=Ed.exec(t),i=1,n=2,s=3,o=5;return e?{a:(a={a:e.length>4?ut(e[o]):1,h:parseInt(e[i]??"0",10),s:parseInt(e[n]??"0",10),v:parseInt(e[s]??"0",10)}).a,...Vd(a)}:void 0;var a}}async function zd(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsv",new Id)})}var Rd;!function(t){t[t.h=1]="h",t[t.w=2]="w",t[t.b=3]="b",t[t.a=5]="a"}(Rd||(Rd={}));const Ld=/hwba?\(\s*(\d{1,3}(?:\.\d+)?(?:deg|rad|grad|turn)?)\s*[\s,]\s*(\d{1,3}(?:\.\d+)?)%\s*[\s,]\s*(\d{1,3}(?:\.\d+)?)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;function Gd(t){const e=t.h/360,i=t.w/100,n=t.b/100,s=i+n;let o,a,r;if(s>=1){const t=i/s;o=t,a=t,r=t}else{const t=t=>{const s=(t+6*e)%6,o=1-i-n,a=Math.max(0,Math.min(s,4-s,1));return 1-n-o*a};o=t(5),a=t(3),r=t(1)}return{r:Math.round(255*o),g:Math.round(255*a),b:Math.round(255*r)}}class Fd{accepts(t){return t.startsWith("hwb")}handleColor(t){const e=t.value.hwb??t.value;if("h"in e&&"w"in e&&"b"in e)return Gd(e)}handleRangeColor(t){const e=t.value.hwb??t.value;if("h"in e&&"w"in e&&"b"in e)return Gd({h:X(e.h),w:X(e.w),b:X(e.b)})}parseString(t){if(!this.accepts(t))return;const e=Ld.exec(t);if(!e)return;const i=e[Rd.h],n=e[Rd.w],s=e[Rd.b];return{a:(o={a:e.length>4?ut(e[Rd.a]):1,h:void 0!==i?Number.parseFloat(i):0,w:void 0!==n?Number.parseFloat(n):0,b:void 0!==s?Number.parseFloat(s):0}).a,...Gd(o)};var o}}async function Hd(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hwb",new Fd)})}class Nd{color=new ve;duration;infectedStage;radius=0;rate=1;constructor(){this.color.value="#ff0000"}load(t){H(t)||(void 0!==t.color&&(this.color=ve.create(this.color,t.color)),this.duration=t.duration,this.infectedStage=t.infectedStage,ce(this,"radius",t.radius),ce(this,"rate",t.rate))}}class Bd{cure;delay;enable;infections;stages;constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){H(t)||(ce(this,"cure",t.cure),ce(this,"delay",t.delay),ce(this,"enable",t.enable),ce(this,"infections",t.infections),void 0!==t.stages&&(this.stages=t.stages.map(t=>{const e=new Nd;return e.load(t),e})))}}class Ud{id="infection";async getPlugin(t){const{InfectionPluginInstance:e}=await Promise.resolve().then(function(){return qy});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.infection;void 0===n?.load&&(e.infection=n=new Bd),n.load(i?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}class $d extends Gs{#$t;constructor(t){super(t),this.#$t=0}get maxDistance(){return this.#$t}clear(){}init(){}interact(t,e,i){const n=this.container.infecter;if(!n)return;if(n.updateInfection(t,i.value),void 0===t.infection?.stage)return;const s=this.container,o=s.actualOptions.infection;if(!o?.enable||o.stages.length<1)return;const a=o.stages[t.infection.stage];if(!a)return;this.#$t=Math.max(this.#$t,a.radius);const r=s.retina.pixelRatio,c=2*t.getRadius()+a.radius*r,l=t.getPosition(),h=a.infectedStage??t.infection.stage,d=s.particles.grid.queryCircle(l,c),u=a.rate,p=d.length;for(const e of d){const i=e;if(!(i===t||i.destroyed||i.spawning||void 0!==i.infection?.stage&&i.infection.stage===t.infection.stage||$()>=u/p))if(void 0===i.infection?.stage)n.startInfection(i,h);else if(i.infection.stage<t.infection.stage)n.updateInfectionStage(i,h);else if(i.infection.stage>t.infection.stage){const e=o.stages[i.infection.stage];if(!e)continue;const s=e.infectedStage??i.infection.stage;n.updateInfectionStage(t,s)}}}isEnabled(){return this.container.actualOptions.infection?.enable??!1}reset(){}}async function jd(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addPlugin(new Ud),t.pluginManager.addInteractor?.("particlesInfection",t=>Promise.resolve(new $d(t)))})}class qd{draw(t){!function(t){const{context:e,radius:i}=t,n=.55*i;e.moveTo(g.x,g.y),e.bezierCurveTo(n,-i,n,i,g.x,g.y),e.moveTo(g.x,g.y),e.bezierCurveTo(-n,-i,g.x-n,i,g.x,g.y)}(t)}}async function Wd(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["infinity"],()=>Promise.resolve(new qd))})}const Qd=255,Zd=.95047,Yd=1,Xd=1.08883,Kd=216/24389,Jd=24389/27,tu=16,eu=116,iu=500,nu=200,su={x:3.2404542,y:-1.5371385,z:-.4985314},ou={x:-.969266,y:1.8760108,z:.041556},au={x:.0556434,y:-.2040259,z:1.0572252},ru=2.4,cu=.0031308,lu=12.92,hu=1.055,du=.055;function uu(t){const e=t.l,i=t.aAxis,n=t.bAxis,s=(e+tu)/eu,o=s+i/iu,a=s-n/nu,r=o**3,c=a**3,l=(r>Kd?r:(eu*o-tu)/Jd)*Zd,h=(e>Jd*Kd?s**3:e/Jd)*Yd,d=(c>Kd?c:(eu*a-tu)/Jd)*Xd,u=su.x*l+su.y*h+su.z*d,p=ou.x*l+ou.y*h+ou.z*d,g=au.x*l+au.y*h+au.z*d,f=t=>{return Math.round(Q((e=t)<=cu?lu*e:hu*Math.pow(e,1/ru)-du,0,1)*Qd);var e};return{r:f(u),g:f(p),b:f(g)}}const pu=/lab\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i;class gu{accepts(t){return t.startsWith("lab")}handleColor(t){const e=t.value.lab??t.value;if("l"in e&&"aAxis"in e&&"bAxis"in e)return uu(e)}handleRangeColor(t){const e=t.value.lab??t.value;if("l"in e&&"aAxis"in e&&"bAxis"in e)return uu({l:X(e.l),aAxis:X(e.aAxis),bAxis:X(e.bAxis)})}parseString(t){if(!this.accepts(t))return;const e=pu.exec(t),i=1,n=3,s=5,o=7;return e?{a:(a={a:e[o]?ut(e[o]):1,aAxis:Number.parseFloat(e[n]??"0"),bAxis:Number.parseFloat(e[s]??"0"),l:Number.parseFloat(e[i]??"0")}).a,...uu(a)}:void 0;var a}}async function fu(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("lab",new gu)})}const yu=255,mu=.95047,wu=1,vu=1.08883,bu=216/24389,xu=24389/27,Su=16,Pu=116,Mu=500,Cu=200,_u={x:3.2404542,y:-1.5371385,z:-.4985314},ku={x:-.969266,y:1.8760108,z:.041556},Ou={x:.0556434,y:-.2040259,z:1.0572252},Tu=2.4,Du=.0031308,Au=12.92,Vu=1.055,Eu=.055;function Iu(t){const e=t.l,i=t.c,n=ot(t.h),s=i*Math.cos(n),o=i*Math.sin(n),a=(e+Su)/Pu,r=a+s/Mu,c=a-o/Cu,l=r**3,h=c**3,d=(l>bu?l:(Pu*r-Su)/xu)*mu,u=(e>xu*bu?a**3:e/xu)*wu,p=(h>bu?h:(Pu*c-Su)/xu)*vu,g=_u.x*d+_u.y*u+_u.z*p,f=ku.x*d+ku.y*u+ku.z*p,y=Ou.x*d+Ou.y*u+Ou.z*p,m=t=>{return Math.round(Q((e=t)<=Du?Au*e:Vu*Math.pow(e,1/Tu)-Eu,0,1)*yu);var e};return{r:m(g),g:m(f),b:m(y)}}const zu=/lch\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i;class Ru{accepts(t){return t.startsWith("lch")}handleColor(t){const e=t.value.lch??t.value;if("l"in e&&"c"in e&&"h"in e)return Iu(e)}handleRangeColor(t){const e=t.value.lch??t.value;if("l"in e&&"c"in e&&"h"in e)return Iu({l:X(e.l),c:X(e.c),h:X(e.h)})}parseString(t){if(!this.accepts(t))return;const e=zu.exec(t),i=1,n=3,s=5,o=7;return e?{a:(a={a:e[o]?ut(e[o]):1,c:Number.parseFloat(e[n]??"0"),h:Number.parseFloat(e[s]??"0"),l:Number.parseFloat(e[i]??"0")}).a,...Iu(a)}:void 0;var a}}async function Lu(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("lch",new Ru)})}class Gu{options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.options={alpha:1.5,scale:1,maxStep:10}}generate(t){t.levy??={angle:$()*Math.PI*2,baseSpeed:t.velocity.length};const e=this.options,i=t.levy;i.angle+=.2*($()-.5);const n=Math.max($(),1e-6),s=e.scale??1,o=e.alpha??1.5;let a=s/Math.pow(n,1/o);void 0!==e.maxStep&&(a=Math.min(a,e.maxStep));const r=i.baseSpeed*a;return t.velocity.x=0,t.velocity.y=0,this.#y.length=r,this.#y.angle=i.angle,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.alpha=t.alpha??this.options.alpha,this.options.scale=t.scale??this.options.scale,this.options.maxStep=t.maxStep??this.options.maxStep}reset(t){delete t.levy}update(){}}async function Fu(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("levyPathGenerator",t=>Promise.resolve(new Gu(t)))})}const Hu=1,Nu=0,Bu=Math.PI*u,Uu=Math.PI*_,$u="light";class ju{start=new ve;stop=new ve;constructor(){this.start.value="#ffffff",this.stop.value="#000000"}load(t){H(t)||(this.start=ve.create(this.start,t.start),this.stop=ve.create(this.stop,t.stop))}}class qu{gradient=new ju;radius=1e3;load(t){H(t)||(this.gradient.load(t.gradient),ce(this,"radius",t.radius))}}class Wu{color=new ve;length=2e3;constructor(){this.color.value="#000000"}load(t){H(t)||(this.color=ve.create(this.color,t.color),ce(this,"length",t.length))}}class Qu{area=new qu;shadow=new Wu;load(t){H(t)||(this.area.load(t.area),this.shadow.load(t.shadow))}}class Zu extends Ls{maxDistance=0;#p;constructor(t,e){super(e),this.#p=t}clear(){}init(){}interact(t){const e=this.container,i=e.actualOptions,n=t;if(!i.interactivity?.events.onHover.enable||"pointermove"!==n.status)return;const s=n.mouse.position;s&&e.canvas.render.draw(t=>{!function(t,e,i){const n=t.actualOptions.interactivity?.modes.light?.area;if(!n)return;e.beginPath(),e.arc(i.x,i.y,n.radius,0,w);const s=e.createRadialGradient(i.x,i.y,0,i.x,i.y,n.radius),o=t.canvas.mouseLight;o?.start&&o.stop&&(s.addColorStop(Nu,mi(o.start,t.hdr,void 0,t.peakNits,t.hdrMode)),s.addColorStop(Hu,mi(o.stop,t.hdr,void 0,t.peakNits,t.hdrMode)),e.fillStyle=s,e.fill())}(e,t,s)})}isEnabled(t,e){const i=this.container,n=t.mouse,s=e?.interactivity??i.actualOptions.interactivity,o=s?.events;if(!o?.onHover.enable||!n.position)return!1;const a=xt($u,o.onHover.mode);if(a&&s?.modes.light){const t=s.modes.light.area.gradient;i.canvas.mouseLight={start:ai(this.#p,t.start),stop:ai(this.#p,t.stop)}}return a}loadModeOptions(t,...e){ue(t,"light",Qu,...e)}reset(){}}class Yu extends Gs{maxDistance;#p;constructor(t,e){super(e),this.#p=t,this.maxDistance=0}clear(){}init(){}interact(t,e){const i=this.container,n=i.actualOptions;if(!n.interactivity?.events.onHover.enable||"pointermove"!==e.status)return;const s=e.mouse.position;s&&i.canvas.render.draw(e=>{!function(t,e,i,n){const s=i.getPosition(),o=t.actualOptions.interactivity?.modes.light?.shadow;if(!o)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,l=w/c,h=-i.getAngle()+Uu,d=[];for(let t=0;t<c;t++)d.push({x:s.x+r*Math.sin(h+l*t)*1,y:s.y+r*Math.cos(h+l*t)*1});const u=[],p=o.length;for(const t of d){const e=Math.atan2(n.y-t.y,n.x-t.x),i={x:t.x+p*Math.sin(-e-Bu),y:t.y+p*Math.cos(-e-Bu)};u.push({end:i,start:t})}const g=mi(a,t.hdr,void 0,t.peakNits,t.hdrMode);for(let t=u.length-1,i=0;t>=0;i=t--){e.beginPath();const n=u[t],s=u[i];n&&s&&(e.moveTo(n.start.x,n.start.y),e.lineTo(s.start.x,s.start.y),e.lineTo(s.end.x,s.end.y),e.lineTo(n.end.x,n.end.y),e.fillStyle=g,e.fill())}}(i,e,t,s)})}isEnabled(t,e){const i=t.interactivity,n=e.mouse,s=i.events;if(!s.onHover.enable||!n.position)return!1;const o=xt($u,s.onHover.mode);if(o&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=ai(this.#p,e.color)}return o}reset(){}}async function Xu(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("externalLight",e=>Promise.resolve(new Zu(t.pluginManager,e))),t.pluginManager.addInteractor?.("particlesLight",e=>Promise.resolve(new Yu(t.pluginManager,e)))})}class Ku{options;position;load(e){H(e)||(e.position&&(this.position={x:e.position.x??50,y:e.position.y??50,mode:e.position.mode??t.PixelMode.percent}),e.options&&(this.options=_t({},e.options)))}}class Ju{id="manual-particles";async getPlugin(t){const{ManualParticlesPluginInstance:e}=await Promise.resolve().then(function(){return Wy});return new e(t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&(e.manualParticles??=[],i?.manualParticles&&(e.manualParticles=i.manualParticles.map(t=>{const e=new Ku;return e.load(t),e})))}needsPlugin(t){return!!t?.manualParticles?.length}}async function tp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ju)})}const ep=["ア","イ","ウ","エ","オ","カ","キ","ク","ケ","コ","サ","シ","ス","セ","ソ","タ","チ","ツ","テ","ト","ナ","ニ","ヌ","ネ","ノ","ハ","ヒ","フ","ヘ","ホ","マ","ミ","ム","メ","モ","ヤ","ユ","ヨ","ラ","リ","ル","レ","ロ","ワ","ヲ","ン","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","ビ","ブ","ベ","ボ","パ","ピ","プ","ペ","ポ","ァ","ィ","ゥ","ェ","ォ","ャ","ュ","ョ","ッ","ー","ヴ","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","日","本","人","大","中","小","上","下","左","右","力","時","空","生","死","無","有","!","@","#","$","%","&","*","+","-","=","?","/","\\","|","<",">","{","}","[","]","(",")"],ip=new WeakMap;function np(){return ep[Math.floor($()*ep.length)]??" "}function sp(t,e){return t+$()*(e-t)}function op(t){const{context:e,radius:i,particle:n,delta:s,fill:o,stroke:a}=t,r=n.shapeData,c=K(r?.interval??100),l=J(r?.interval??2e3),h=function(t,e,i){let n=ip.get(t);return n||(n={char:np(),elapsed:0,interval:sp(e,i)},ip.set(t,n)),n}(n,c,l);h.elapsed+=s.value,h.elapsed>=h.interval&&(h.char=np(),h.elapsed-=h.interval,h.interval=sp(c,l));const d=Math.round(2*i);e.font=`bold ${d}px "Courier New", Courier, monospace`,e.textAlign="center",e.textBaseline="middle",o&&e.fillText(h.char,g.x,g.y),a&&e.strokeText(h.char,g.x,g.y)}class ap{draw(t){op(t)}}async function rp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["matrix"],()=>Promise.resolve(new ap))})}class cp{factor=4;value=!0;load(t){H(t)||(ce(this,"factor",t.factor),ce(this,"value",t.value))}}class lp{disable=!0;reduce=new cp;load(t){H(t)||(ce(this,"disable",t.disable),this.reduce.load(t.reduce))}}class hp{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return Qy});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.motion;n?.load||(e.motion=n=new lp),n.load(i?.motion)}needsPlugin(){return!0}}async function dp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new hp)})}const up=new Map([["aliceblue",{r:240,g:248,b:255}],["antiquewhite",{r:250,g:235,b:215}],["aqua",{r:0,g:255,b:255}],["aquamarine",{r:127,g:255,b:212}],["azure",{r:240,g:255,b:255}],["beige",{r:245,g:245,b:220}],["bisque",{r:255,g:228,b:196}],["black",{r:0,g:0,b:0}],["blanchedalmond",{r:255,g:235,b:205}],["blue",{r:0,g:0,b:255}],["blueviolet",{r:138,g:43,b:226}],["brown",{r:165,g:42,b:42}],["burlywood",{r:222,g:184,b:135}],["cadetblue",{r:95,g:158,b:160}],["chartreuse",{r:127,g:255,b:0}],["chocolate",{r:210,g:105,b:30}],["coral",{r:255,g:127,b:80}],["cornflowerblue",{r:100,g:149,b:237}],["cornsilk",{r:255,g:248,b:220}],["crimson",{r:220,g:20,b:60}],["cyan",{r:0,g:255,b:255}],["darkblue",{r:0,g:0,b:139}],["darkcyan",{r:0,g:139,b:139}],["darkgoldenrod",{r:184,g:134,b:11}],["darkgray",{r:169,g:169,b:169}],["darkgreen",{r:0,g:100,b:0}],["darkgrey",{r:169,g:169,b:169}],["darkkhaki",{r:189,g:183,b:107}],["darkmagenta",{r:139,g:0,b:139}],["darkolivegreen",{r:85,g:107,b:47}],["darkorange",{r:255,g:140,b:0}],["darkorchid",{r:153,g:50,b:204}],["darkred",{r:139,g:0,b:0}],["darksalmon",{r:233,g:150,b:122}],["darkseagreen",{r:143,g:188,b:143}],["darkslateblue",{r:72,g:61,b:139}],["darkslategray",{r:47,g:79,b:79}],["darkslategrey",{r:47,g:79,b:79}],["darkturquoise",{r:0,g:206,b:209}],["darkviolet",{r:148,g:0,b:211}],["deeppink",{r:255,g:20,b:147}],["deepskyblue",{r:0,g:191,b:255}],["dimgray",{r:105,g:105,b:105}],["dimgrey",{r:105,g:105,b:105}],["dodgerblue",{r:30,g:144,b:255}],["firebrick",{r:178,g:34,b:34}],["floralwhite",{r:255,g:250,b:240}],["forestgreen",{r:34,g:139,b:34}],["fuchsia",{r:255,g:0,b:255}],["gainsboro",{r:220,g:220,b:220}],["ghostwhite",{r:248,g:248,b:255}],["gold",{r:255,g:215,b:0}],["goldenrod",{r:218,g:165,b:32}],["gray",{r:128,g:128,b:128}],["green",{r:0,g:128,b:0}],["greenyellow",{r:173,g:255,b:47}],["grey",{r:128,g:128,b:128}],["honeydew",{r:240,g:255,b:240}],["hotpink",{r:255,g:105,b:180}],["indianred",{r:205,g:92,b:92}],["indigo",{r:75,g:0,b:130}],["ivory",{r:255,g:255,b:240}],["khaki",{r:240,g:230,b:140}],["lavender",{r:230,g:230,b:250}],["lavenderblush",{r:255,g:240,b:245}],["lawngreen",{r:124,g:252,b:0}],["lemonchiffon",{r:255,g:250,b:205}],["lightblue",{r:173,g:216,b:230}],["lightcoral",{r:240,g:128,b:128}],["lightcyan",{r:224,g:255,b:255}],["lightgoldenrodyellow",{r:250,g:250,b:210}],["lightgray",{r:211,g:211,b:211}],["lightgreen",{r:144,g:238,b:144}],["lightgrey",{r:211,g:211,b:211}],["lightpink",{r:255,g:182,b:193}],["lightsalmon",{r:255,g:160,b:122}],["lightseagreen",{r:32,g:178,b:170}],["lightskyblue",{r:135,g:206,b:250}],["lightslategray",{r:119,g:136,b:153}],["lightslategrey",{r:119,g:136,b:153}],["lightsteelblue",{r:176,g:196,b:222}],["lightyellow",{r:255,g:255,b:224}],["lime",{r:0,g:255,b:0}],["limegreen",{r:50,g:205,b:50}],["linen",{r:250,g:240,b:230}],["magenta",{r:255,g:0,b:255}],["maroon",{r:128,g:0,b:0}],["mediumaquamarine",{r:102,g:205,b:170}],["mediumblue",{r:0,g:0,b:205}],["mediumorchid",{r:186,g:85,b:211}],["mediumpurple",{r:147,g:112,b:219}],["mediumseagreen",{r:60,g:179,b:113}],["mediumslateblue",{r:123,g:104,b:238}],["mediumspringgreen",{r:0,g:250,b:154}],["mediumturquoise",{r:72,g:209,b:204}],["mediumvioletred",{r:199,g:21,b:133}],["midnightblue",{r:25,g:25,b:112}],["mintcream",{r:245,g:255,b:250}],["mistyrose",{r:255,g:228,b:225}],["moccasin",{r:255,g:228,b:181}],["navajowhite",{r:255,g:222,b:173}],["navy",{r:0,g:0,b:128}],["oldlace",{r:253,g:245,b:230}],["olive",{r:128,g:128,b:0}],["olivedrab",{r:107,g:142,b:35}],["orange",{r:255,g:165,b:0}],["orangered",{r:255,g:69,b:0}],["orchid",{r:218,g:112,b:214}],["palegoldenrod",{r:238,g:232,b:170}],["palegreen",{r:152,g:251,b:152}],["paleturquoise",{r:175,g:238,b:238}],["palevioletred",{r:219,g:112,b:147}],["papayawhip",{r:255,g:239,b:213}],["peachpuff",{r:255,g:218,b:185}],["peru",{r:205,g:133,b:63}],["pink",{r:255,g:192,b:203}],["plum",{r:221,g:160,b:221}],["powderblue",{r:176,g:224,b:230}],["purple",{r:128,g:0,b:128}],["rebeccapurple",{r:102,g:51,b:153}],["red",{r:255,g:0,b:0}],["rosybrown",{r:188,g:143,b:143}],["royalblue",{r:65,g:105,b:225}],["saddlebrown",{r:139,g:69,b:19}],["salmon",{r:250,g:128,b:114}],["sandybrown",{r:244,g:164,b:96}],["seagreen",{r:46,g:139,b:87}],["seashell",{r:255,g:245,b:238}],["sienna",{r:160,g:82,b:45}],["silver",{r:192,g:192,b:192}],["skyblue",{r:135,g:206,b:235}],["slateblue",{r:106,g:90,b:205}],["slategray",{r:112,g:128,b:144}],["slategrey",{r:112,g:128,b:144}],["snow",{r:255,g:250,b:250}],["springgreen",{r:0,g:255,b:127}],["steelblue",{r:70,g:130,b:180}],["tan",{r:210,g:180,b:140}],["teal",{r:0,g:128,b:128}],["thistle",{r:216,g:191,b:216}],["tomato",{r:255,g:99,b:71}],["turquoise",{r:64,g:224,b:208}],["violet",{r:238,g:130,b:238}],["wheat",{r:245,g:222,b:179}],["white",{r:255,g:255,b:255}],["whitesmoke",{r:245,g:245,b:245}],["yellow",{r:255,g:255,b:0}],["yellowgreen",{r:154,g:205,b:50}]]);class pp{accepts(t){return up.has(t.toLowerCase())}handleColor(t){return this.#Et(t.value)}handleRangeColor(t){return this.#Et(t.value)}parseString(t){return this.#Et(t)}#Et(t){if(!t||"string"!=typeof t)return;const e=up.get(t.toLowerCase());if(e)return{...e,a:1};s().error("Color not found",t)}}async function gp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("named",new pp)})}const fp={L:1,a:.3963377774,b:.2158037573},yp={L:1,a:-.1055613458,b:-.0638541728},mp={L:1,a:-.0894841775,b:-1.291485548},wp={l:4.0767416621,m:-3.3077115913,s:.2309699292},vp={l:-1.2684380046,m:2.6097574011,s:-.3413193965},bp={l:-.0041960863,m:-.7034186147,s:1.707614701},xp=2.4,Sp=.0031308,Pp=12.92,Mp=.055,Cp=1.055;function _p(t){const e=t.l/d,i=t.aAxis,n=t.bAxis,s=(fp.L*e+fp.a*i+fp.b*n)**3,o=(yp.L*e+yp.a*i+yp.b*n)**3,a=(mp.L*e+mp.a*i+mp.b*n)**3,r=wp.l*s+wp.m*o+wp.s*a,c=vp.l*s+vp.m*o+vp.s*a,l=bp.l*s+bp.m*o+bp.s*a,h=t=>{return Math.round(Q((e=t)<=Sp?Pp*e:Cp*Math.pow(e,1/xp)-Mp,0,1)*S);var e};return{r:h(r),g:h(c),b:h(l)}}const kp=/oklab\(\s*(\d+(?:\.\d+)?)(%?)\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i;class Op{accepts(t){return t.startsWith("oklab")}handleColor(t){const e=t.value.oklab??t.value;if("l"in e&&"aAxis"in e&&"bAxis"in e)return _p(e)}handleRangeColor(t){const e=t.value.oklab??t.value;if("l"in e&&"aAxis"in e&&"bAxis"in e)return _p({l:X(e.l),aAxis:X(e.aAxis),bAxis:X(e.bAxis)})}parseString(t){if(!this.accepts(t))return;const e=kp.exec(t),i=1,n=2,s=3,o=4,a=5;if(!e)return;const r=Number.parseFloat(e[i]??"0");if(e[n]){if(r<0||r>d)return}else if(r<0||r>1)return;return{a:(c={a:e[a]?ut(e[a]):1,l:r*(e[n]?1:d),aAxis:Number.parseFloat(e[s]??"0"),bAxis:Number.parseFloat(e[o]??"0")}).a,..._p(c)};var c}}async function Tp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("oklab",new Op)})}const Dp={L:1,a:.3963377774,b:.2158037573},Ap={L:1,a:-.1055613458,b:-.0638541728},Vp={L:1,a:-.0894841775,b:-1.291485548},Ep={l:4.0767416621,m:-3.3077115913,s:.2309699292},Ip={l:-1.2684380046,m:2.6097574011,s:-.3413193965},zp={l:-.0041960863,m:-.7034186147,s:1.707614701},Rp=2.4,Lp=.0031308,Gp=12.92,Fp=1.055,Hp=.055;function Np(t){const e=t.l/d,i=t.c,n=ot(t.h),s=i*Math.cos(n),o=i*Math.sin(n),a=(Dp.L*e+Dp.a*s+Dp.b*o)**3,r=(Ap.L*e+Ap.a*s+Ap.b*o)**3,c=(Vp.L*e+Vp.a*s+Vp.b*o)**3,l=Ep.l*a+Ep.m*r+Ep.s*c,h=Ip.l*a+Ip.m*r+Ip.s*c,u=zp.l*a+zp.m*r+zp.s*c,p=t=>{return Math.round(Q((e=t)<=Lp?Gp*e:Fp*Math.pow(e,1/Rp)-Hp,0,1)*S);var e};return{r:p(l),g:p(h),b:p(u)}}const Bp=/oklch\(\s*(\d+(?:\.\d+)?)(%?)\s+(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)(°)?(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i;class Up{accepts(t){return t.startsWith("oklch")}handleColor(t){const e=t.value.oklch??t.value;if("l"in e&&"c"in e&&"h"in e)return Np(e)}handleRangeColor(t){const e=t.value.oklch??t.value;if("l"in e&&"c"in e&&"h"in e)return Np({l:X(e.l),c:X(e.c),h:X(e.h)})}parseString(t){if(!this.accepts(t))return;const e=Bp.exec(t),i=1,n=2,s=3,o=4,a=6;if(!e)return;const r=Number.parseFloat(e[i]??"0");if(e[n]){if(r<0||r>d)return}else if(r<0||r>1)return;return{a:(c={a:e[a]?ut(e[a]):1,c:Number.parseFloat(e[s]??"0"),h:Number.parseFloat(e[o]??"0"),l:r*(e[n]?1:d)}).a,...Np(c)};var c}}async function $p(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("oklch",new Up)})}class jp extends De{value=45;load(t){H(t)||super.load(t)}}class qp{animation=new fe;color;enable=!1;opacity=1;radius;rotation=new jp;width=1;load(t){H(t)||(this.animation.load(t.animation),this.rotation.load(t.rotation),ce(this,"enable",t.enable),le(this,"opacity",t.opacity),le(this,"width",t.width),le(this,"radius",t.radius),void 0!==t.color&&(this.color=ve.create(this.color,t.color)))}}var Wp;!function(t){t.front="front",t.back="back"}(Wp||(Wp={}));const Qp=Math.PI*u,Zp=Math.PI+Qp;class Yp{#u;#p;constructor(t,e){this.#p=t,this.#u=e}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Wp.front)}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Wp.back)}drawOrbit(t,e){const i=this.#u;let n,s;switch(e){case Wp.back:n=Qp,s=Zp;break;case Wp.front:n=Zp,s=Qp;break;default:n=0,s=w}i.canvas.render.draw(e=>{!function(t,e,i,n,s,o,a,r,c,l){if(a<=0)return;const h=i.getPosition();n&&(e.strokeStyle=wi(n,t.hdr,o,t.peakNits,t.hdrMode)),e.lineWidth=a;const d=ot(r);e.beginPath(),e.ellipse(h.x,h.y,s*u,2*s,d,c,l),e.stroke()}(i,e,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??i.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*i.retina.pixelRatio,n,s)})}init(t){const e=this.#u,i=t.options.orbit;i?.enable&&(t.orbitRotation=X(i.rotation.value),t.orbitColor=ci(this.#p,i.color),t.retina.orbitRadius=void 0!==i.radius?X(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?X(i.animation.speed):0,t.orbitWidth=X(i.width),t.orbitOpacity=X(i.opacity))}isEnabled(t){const e=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){ue(t,"orbit",qp,...e)}update(t,e){this.isEnabled(t)&&(t.orbitRotation??=0,t.orbitRotation+=(t.orbitAnimationSpeed??0/w)*e.factor)}}async function Xp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("orbit",e=>Promise.resolve(new Yp(t.pluginManager,e)))})}class Kp{#u;constructor(t){this.#u=t}drawAfter(t){const{particle:e}=t,i=this.#u;if(!e.particlesNextSpawn)return;const n=performance.now();if(n<e.particlesNextSpawn)return;e.particlesNextSpawn=n+(e.particlesSpawnRate??1e3);const s=e.particlesSpawnQuantity??1,o=_t({},e.particlesData?.spawn?.particles),a={...e.getPosition()};for(let t=0;t<s;t++)i.particles.addParticle(a,o)}particleInit(t,e){const i=e.effectData,n=X(i?.spawn?.rate?.delay??1);e.particlesSpawnQuantity=X(i?.spawn?.rate?.quantity??1),e.particlesSpawnRate=(n>0?n:1)*p,e.particlesNextSpawn=performance.now()+e.particlesSpawnRate,e.particlesData=i}}async function Jp(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("particles",t=>Promise.resolve(new Kp(t)))})}class tg extends De{distance=1;duration=1;enabled=!1;factor=1;speed=1;load(t){super.load(t),H(t)||(ce(this,"enabled",t.enabled),le(this,"distance",t.distance),le(this,"duration",t.duration),le(this,"factor",t.factor),le(this,"speed",t.speed))}}class eg extends Gs{#$t;#se;#_e;constructor(t){super(t),this.#$t=0,this.#se=A.origin,this.#_e=A.origin}get maxDistance(){return this.#$t}clear(){}init(){}interact(t){const e=this.container;if(!t.repulse){const i=t.options.repulse;if(!i)return;const n=X(i.distance);n>this.maxDistance&&(this.#$t=n),t.repulse={distance:n*e.retina.pixelRatio,speed:X(i.speed),factor:X(i.factor)}}const i=t.getPosition(),n=e.particles.grid.queryCircle(i,t.repulse.distance),s=1/t.repulse.distance;for(const e of n){if(t===e||e.destroyed)continue;const n=e.getPosition(),{dx:o,dy:a,distance:r}=et(n,i),c=1/r,l=t.repulse.speed*t.repulse.factor;if(r>0){const t=Q((1-Math.pow(r*s,2))*l,0,l)*c;this.#se.x=o*t,this.#se.y=a*t,e.position.addTo(this.#se)}else this.#_e.x=l,this.#_e.y=l,e.position.addTo(this.#_e)}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){ue(t,"repulse",tg,...e)}reset(){}}async function ig(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Zs(t),t.pluginManager.addInteractor?.("particlesRepulse",t=>Promise.resolve(new eg(t)))})}class ng{draw(t){const{context:e,particle:i,radius:n}=t;i.pathData&&nn(e,n,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=_t({},i))}}async function sg(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["path"],()=>Promise.resolve(new ng))})}class og{w;x;y;z;constructor(t,e,i,n){this.x=t,this.y=e,this.z=i,this.w=n}dot2(t,e){return this.x*t+this.y*e}dot3(t,e,i){return this.dot2(t,e)+this.z*i}dot4(t,e,i,n){return this.dot3(t,e,i)+this.w*n}}class ag{#ke;#Oe;#Te;#C;constructor(){this.#ke=[new og(0,1,1,1),new og(0,1,1,-1),new og(0,1,-1,1),new og(0,1,-1,-1),new og(0,-1,1,1),new og(0,-1,1,-1),new og(0,-1,-1,1),new og(0,-1,-1,-1),new og(1,0,1,1),new og(1,0,1,-1),new og(1,0,-1,1),new og(1,0,-1,-1),new og(-1,0,1,1),new og(-1,0,1,-1),new og(-1,0,-1,1),new og(-1,0,-1,-1),new og(1,1,0,1),new og(1,1,0,-1),new og(1,-1,0,1),new og(1,-1,0,-1),new og(-1,1,0,1),new og(-1,1,0,-1),new og(-1,-1,0,1),new og(-1,-1,0,-1),new og(1,1,1,0),new og(1,1,-1,0),new og(1,-1,1,0),new og(1,-1,-1,0),new og(-1,1,1,0),new og(-1,1,-1,0),new og(-1,-1,1,0),new og(-1,-1,-1,0)],this.#Te=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this.#Oe=new Array(512),this.#C=new Array(512)}noise2d(t,e){const i=this.#Oe,n=this.#C;let s=Math.floor(t),o=Math.floor(e);t-=s,e-=o,s&=255,o&=255;const a=i[s+n[o]].dot2(t,e),r=i[s+n[o+1]].dot2(t,e-1),c=i[s+1+n[o]].dot2(t-1,e),l=i[s+1+n[o+1]].dot2(t-1,e-1),h=this.#De(t);return this.#Ae(this.#Ae(a,c,h),this.#Ae(r,l,h),this.#De(e))}noise3d(t,e,i){const n=this.#Oe,s=this.#C;let o=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=o,e-=a,i-=r,o&=255,a&=255,r&=255;const c=n[o+s[a+s[r]]].dot3(t,e,i),l=n[o+s[a+s[r+1]]].dot3(t,e,i-1),h=n[o+s[a+1+s[r]]].dot3(t,e-1,i),d=n[o+s[a+1+s[r+1]]].dot3(t,e-1,i-1),u=n[o+1+s[a+s[r]]].dot3(t-1,e,i),p=n[o+1+s[a+s[r+1]]].dot3(t-1,e,i-1),g=n[o+1+s[a+1+s[r]]].dot3(t-1,e-1,i),f=n[o+1+s[a+1+s[r+1]]].dot3(t-1,e-1,i-1),y=this.#De(t),m=this.#De(e),w=this.#De(i);return this.#Ae(this.#Ae(this.#Ae(c,u,y),this.#Ae(l,p,y),w),this.#Ae(this.#Ae(h,g,y),this.#Ae(d,f,y),w),m)}noise4d(t,e,i,n){const s=this.#Oe,o=this.#C;let a=Math.floor(t),r=Math.floor(e),c=Math.floor(i),l=Math.floor(n);t-=a,e-=r,i-=c,n-=l,a&=255,r&=255,c&=255,l&=255;const h=this.#De(t),d=this.#De(e),u=this.#De(i),p=this.#De(n),g=(t,e,i,n)=>s[a+t+o[r+e+o[c+i+o[l+n]]]],f=g(0,0,0,0).dot4(t,e,i,n),y=g(0,0,0,1).dot4(t,e,i,n-1),m=g(0,0,1,0).dot4(t,e,i-1,n),w=g(0,0,1,1).dot4(t,e,i-1,n-1),v=g(0,1,0,0).dot4(t,e-1,i,n),b=g(0,1,0,1).dot4(t,e-1,i,n-1),x=g(0,1,1,0).dot4(t,e-1,i-1,n),S=g(0,1,1,1).dot4(t,e-1,i-1,n-1),P=g(1,0,0,0).dot4(t-1,e,i,n),M=g(1,0,0,1).dot4(t-1,e,i,n-1),C=g(1,0,1,0).dot4(t-1,e,i-1,n),_=g(1,0,1,1).dot4(t-1,e,i-1,n-1),k=g(1,1,0,0).dot4(t-1,e-1,i,n),O=g(1,1,0,1).dot4(t-1,e-1,i,n-1),T=g(1,1,1,0).dot4(t-1,e-1,i-1,n),D=g(1,1,1,1).dot4(t-1,e-1,i-1,n-1),A=this.#Ae(f,P,h),V=this.#Ae(y,M,h),E=this.#Ae(m,C,h),I=this.#Ae(w,_,h),z=this.#Ae(A,E,u),R=this.#Ae(V,I,u),L=this.#Ae(v,k,h),G=this.#Ae(b,O,h),F=this.#Ae(x,T,h),H=this.#Ae(S,D,h),N=this.#Ae(L,F,u),B=this.#Ae(G,H,u),U=this.#Ae(z,N,d),$=this.#Ae(R,B,d);return this.#Ae(U,$,p)}seed(t){const e=this.#ke,i=this.#Oe,n=this.#C,s=this.#Te;let o=t;o>0&&o<1&&(o*=65536),o=Math.floor(o),o<256&&(o|=o<<8);const a=e.length;for(let t=0;t<256;t++){const r=1&t?s[t]^255&o:s[t]^o>>8&255;n[t]=n[t+256]=r,i[t]=i[t+256]=e[r%a]}}#De(t){return t*t*t*(t*(6*t-15)+10)}#Ae(t,e,i){return(1-i)*t+i*e}}class rg extends ka{constructor(t){const e=new ag;super(t,{noise4d:(t,i,n,s)=>e.noise4d(t,i,n,s),seed:t=>{e.seed(t)}})}}async function cg(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("perlinNoise",t=>Promise.resolve(new rg(t)))})}class lg{dimensions=2;enable=!1;radius=0;retries=30;steps=0;load(t){H(t)||(ce(this,"enable",t.enable),ce(this,"dimensions",t.dimensions),ce(this,"radius",t.radius),ce(this,"retries",t.retries))}}class hg{id="poisson";async getPlugin(t){const{PoissonDiscPluginInstance:e}=await Promise.resolve().then(function(){return Zy});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.poisson;void 0===n?.load&&(e.poisson=n=new lg),n.load(i?.poisson)}needsPlugin(t){return t?.poisson?.enable??!1}}async function dg(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new hg)})}const ug=globalThis;ug.__tsParticlesInternals=ug.__tsParticlesInternals??{},ug.loadPoissonDiscPlugin=dg;const pg="TSP-3001",gg="TSP-3002",fg="TSP-3003";class yg{color=new ve;opacity=1;width=.5;#p;constructor(t){this.#p=t}load(t){H(t)||(this.color=ve.create(this.color,t.color),E(this.color.value)&&(this.opacity=hi(this.#p,this.color.value)??this.opacity),ce(this,"opacity",t.opacity),ce(this,"width",t.width))}}class mg{enable=!1;stroke;constructor(t){this.stroke=new yg(t)}load(t){if(H(t))return;ce(this,"enable",t.enable);const e=t.stroke;this.stroke.load(e)}}var wg,vg,bg;!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}(wg||(wg={}));class xg{arrangement;constructor(){this.arrangement=wg.onePerPoint}load(t){H(t)||ce(this,"arrangement",t.arrangement)}}class Sg{path=[];size;constructor(){this.size={height:0,width:0}}load(t){H(t)||(ce(this,"path",t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}!function(t){t.path="path",t.radius="radius"}(vg||(vg={}));class Pg{radius=10;type=vg.path;load(t){H(t)||(ce(this,"radius",t.radius),ce(this,"type",t.type))}}!function(t){t.inline="inline",t.inside="inside",t.outside="outside",t.none="none"}(bg||(bg={}));class Mg{data;draw;enable=!1;inline=new xg;move=new Pg;position;scale=1;type=bg.none;url;constructor(t){this.draw=new mg(t)}load(t){H(t)||(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),ce(this,"scale",t.scale),ce(this,"type",t.type),void 0!==t.enable?this.enable=t.enable:this.enable=this.type!==bg.none,ce(this,"url",t.url),void 0!==t.data&&(E(t.data)?this.data=t.data:(this.data=new Sg,this.data.load(t.data))),void 0!==t.position&&(this.position=_t({},t.position)))}}class Cg{id="polygon-mask";#p;constructor(t){this.#p=t}async getPlugin(t){const{PolygonMaskInstance:e}=await Promise.resolve().then(function(){return im});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.polygon;void 0===n?.load&&(e.polygon=n=new Mg(this.#p)),n.load(i?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==bg.none)}}async function _g(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Cg(t.pluginManager))})}const kg={sides:6,turnSteps:20,angle:30};class Og{dirsList;options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.dirsList=[],this.options=_t({},kg)}generate(t){const{sides:e,turnSteps:i}=this.options;t.hexStep??=0,t.hexDirection??=6===e?2*(3*$()|0):$()*e|0,t.hexSpeed??=t.velocity.length,t.hexStep%i===0&&(t.hexDirection=$()>.5?(t.hexDirection+1)%e:(t.hexDirection+e-1)%e),t.velocity.x=0,t.velocity.y=0,t.hexStep++;const n=this.dirsList[t.hexDirection];return this.#y.x=n.x*t.hexSpeed,this.#y.y=n.y*t.hexSpeed,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.sides=t.sides>0?t.sides:this.options.sides,this.options.angle=t.angle??this.options.angle,this.options.turnSteps=t.turnSteps>=0?t.turnSteps:this.options.turnSteps,this.#Ve()}reset(t){delete t.hexStep,delete t.hexDirection,delete t.hexSpeed}update(){}#Ve(){const t=this.options;this.dirsList=[];for(let e=0;e<360;e+=360/t.sides){const i=t.angle+e;this.dirsList.push(A.create(Math.cos(i*Math.PI/180),Math.sin(i*Math.PI/180)))}}}async function Tg(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("polygonPathGenerator",t=>Promise.resolve(new Og(t)))})}class Dg{#y;constructor(){this.#y=A.origin}generate(){return this.#y.x=j(-1,1),this.#y.y=j(-1,1),this.#y}init(){}reset(){}update(){}}async function Ag(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("randomPathGenerator",()=>Promise.resolve(new Dg))})}var Vg;!function(t){t.screen="screen",t.window="window",t.canvas="canvas"}(Vg||(Vg={}));class Eg{maxWidth=1/0;mode=Vg.canvas;options={};load(t){H(t)||(H(t.maxWidth)||(this.maxWidth=t.maxWidth),H(t.mode)||(t.mode===Vg.screen?this.mode=Vg.screen:this.mode=Vg.canvas),H(t.options)||(this.options=_t({},t.options)))}}class Ig{id="responsive";async getPlugin(t){const{ResponsivePluginInstance:e}=await Promise.resolve().then(function(){return om});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;if(e.setResponsive=(t,i,n)=>{e.load(n);const s=t/i,o={[Vg.screen]:screen.availWidth,[Vg.window]:innerWidth,[Vg.canvas]:s},a=e.responsive?.find(t=>t.maxWidth>o[t.mode]);return e.load(a?.options),a?.maxWidth},e.responsive??=[],void 0!==i?.responsive)for(const t of i.responsive){const i=new Eg;t&&i.load(t),e.responsive.push(i)}e.responsive.sort((t,e)=>t.maxWidth-e.maxWidth)}needsPlugin(t){return!!t?.responsive?.length}}async function zg(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ig)})}function Rg(t){return t.ribbonParticleDist??8}function Lg(t){return t.ribbonOscillationSpeed??3}function Gg(t){return t.ribbonOscillationDistance??40}function Fg(t){const e=t.shapeData,i=Math.max(4,Math.round(X(e?.count??30))),n=X(e?.particleDist??8),s=X(e?.mass??1),o=X(e?.drag??.05),a=X(e?.velocityInherit??5),r=X(e?.oscillationSpeed??3),c=X(e?.oscillationDistance??40),l=X(e?.angle??45),h=Math.PI/180*l,d=A.create(t.position.x,t.position.y);if(!t.ribbonBounds)return;t.ribbonParticleDist=n,t.ribbonMass=s,t.ribbonDrag=o,t.ribbonVelocityInherit=a,t.ribbonOscillationSpeed=r,t.ribbonOscillationDistance=c,t.ribbonTime=100*$(),t.ribbonOffsets=A.create(Math.cos(h),Math.sin(h)),t.ribbonHead=d,t.ribbonPreviousHead=A.create(d.x,d.y),t.ribbonPreviousPosition=A.create(t.position.x,t.position.y);const p=t.velocity.angle+Math.PI,g=n*u;t.ribbonPoints=new Array(i);for(let e=0;e<i;e++){const i=e*n,s=($()-u)*g,o=p+Math.PI*u;t.ribbonPoints[e]={force:A.origin,position:A.create(d.x+Math.cos(p)*i+Math.cos(o)*s,d.y+Math.sin(p)*i+Math.sin(o)*s),velocity:A.origin}}}function Hg(t){const e=t.ribbonPoints,i=t.ribbonBounds,n=i?.x??0,s=i?.y??0,o=A.create($()*n,-$()*s);if(i)if(e?.length){t.position.x=o.x,t.position.y=o.y,t.ribbonHead=A.create(o.x,o.y),t.ribbonPreviousHead=A.create(o.x,o.y),t.ribbonPreviousPosition=A.create(o.x,o.y),t.ribbonTime=100*$();for(let i=0;i<e.length;i++){const n=e[i];n&&(n.position=A.create(o.x,o.y-i*Rg(t)),n.force=A.origin,n.velocity=A.origin)}}else Fg(t)}function Ng(t,e,i){const n=t.ribbonPoints?.[e];n&&n.force.addTo(i)}function Bg(t,e,i){const n=t.ribbonPoints?.[e];if(!n)return;const s=function(t){return t.ribbonMass??1}(t),o=function(t){return t.ribbonDrag??.05}(t),a=A.create(n.force.x,n.force.y),r=n.velocity.length,c=A.create(n.velocity.x,n.velocity.y);c.multTo(o*s*r),a.subFrom(c);const l=a.div(s);n.position.addTo(n.velocity.mult(i)),n.velocity.addTo(l.mult(i)),n.force=A.origin}function Ug(t){const{particle:e,delta:i}=t,n=e.ribbonPoints,s=e.ribbonOffsets,o=e.ribbonBounds;if(!n?.length||!s||!o)return;const a=Math.min(.02,Math.max(i.value/p,1e-6)),r=function(t){return t.ribbonHead??=A.create(t.position.x,t.position.y),t.ribbonHead}(e),c=function(t){return t.ribbonPreviousHead??=A.create(t.position.x,t.position.y),t.ribbonPreviousHead}(e),l=function(t){return t.ribbonVelocityInherit??5}(e),h=e.options.move.enable;if(e.ribbonTime=(e.ribbonTime??0)+a*Lg(e),h?(r.x=e.position.x+Math.cos(e.ribbonTime)*Gg(e)/Lg(e),r.y=e.position.y):r.x+=Math.cos(e.ribbonTime)*Gg(e)*a,e.justWarped){const t=e.velocity.angle+Math.PI,i=Rg(e),s=n[0];s&&(s.position=A.create(r.x,r.y),s.velocity=A.origin,s.force=A.origin);for(let e=1;e<n.length;e++){const s=n[e];if(!s)continue;const o=e*i;s.position=A.create(r.x+Math.cos(t)*o,r.y+Math.sin(t)*o),s.velocity=A.origin,s.force=A.origin}}const d=Rg(e);if(!Number.isFinite(r.x)||!Number.isFinite(r.y))return void Hg(e);const u=n[0];if(!u)return;u.position=A.create(r.x,r.y);const g=c.x-r.x,f=c.y-r.y,y=Math.sqrt(g*g+f*f),m=Math.min(y/a*l,800);e.ribbonPreviousHead=A.create(r.x,r.y),e.ribbonPreviousPosition=A.create(e.position.x,e.position.y);for(let t=1;t<n.length;t++){const i=n[t],s=n[t-1];if(!i||!s)continue;const o=s.position.sub(i.position).copy();o.normalize(),o.multTo(m),Ng(e,t,o)}for(let t=1;t<n.length;t++)Bg(e,t,a);for(let t=1;t<n.length;t++){const i=n[t],s=n[t-1];if(!i||!s)continue;const o=i.position.sub(s.position).copy();if(o.normalize(),o.multTo(d),i.position=s.position.add(o),!(Number.isFinite(i.position.x)&&Number.isFinite(i.position.y)&&Number.isFinite(i.velocity.x)&&Number.isFinite(i.velocity.y)))return void Hg(e)}}function $g(t,e,i,n,s,o){return(t-i)*(o-n)-(e-n)*(s-i)}function jg(t,e){return A.create((t.x+e.x)*u,(t.y+e.y)*u)}function qg(t,e){t.beginPath(),t.moveTo(e.a.x,e.a.y),t.lineTo(e.b.x,e.b.y),t.lineTo(e.c.x,e.c.y),e.d&&t.lineTo(e.d.x,e.d.y),t.closePath(),e.stroke&&t.stroke(),e.fill&&t.fill()}function Wg(t,e,i,n,s,o,a,r,c){o?(qg(t,{a:e,b:i,c:jg(i,s),fill:r,stroke:c}),qg(t,{a:s,b:n,c:jg(i,s),fill:r,stroke:c})):a?(qg(t,{a:e,b:i,c:jg(e,n),fill:r,stroke:c}),qg(t,{a:s,b:n,c:jg(e,n),fill:r,stroke:c})):qg(t,{a:e,b:i,c:s,d:n,fill:r,stroke:c})}function Qg(e,i,n,s){const{context:o,particle:a,radius:r}=e,c=a.ribbonPoints,l=a.ribbonOffsets,h=a.ribbonBounds,d=e.fill,u=e.stroke;if(!c||!l||!h||c.length<4||!d&&!u)return;const p=l.mult(r),g=a.position,f="string"==typeof o.fillStyle?o.fillStyle:"",y="string"==typeof o.strokeStyle?o.strokeStyle:"",m=function(e,i,n,s,o,a,r,c){let l=e?n:i;if(s?.backColor)l=s.backColor;else if(s?.darken?.enable){const e=Si(o.fillColor);e&&(l=wi(ki(e,t.AlterType.darken,X(s.darken.value)),a,void 0,r,c))}else if(s?.enlighten?.enable){const e=Si(o.fillColor);e&&(l=wi(ki(e,t.AlterType.enlighten,X(s.enlighten.value)),a,void 0,r,c))}return l}(u,f,y,a.shapeData,a,i,n,s);o.lineWidth=1,o.lineJoin="round",o.lineCap="round";for(let t=0;t<c.length-1;t++){const e=c[t],i=c[t+1];if(!e||!i)continue;const n=e.position.add(p),s=i.position.add(p),a=e.position.sub(g),r=i.position.sub(g),l=n.sub(g),y=s.sub(g),w=Math.min(e.position.y,i.position.y,n.y,s.y),v=Math.max(e.position.y,i.position.y,n.y,s.y),b=$g(e.position.x,e.position.y,i.position.x,i.position.y,s.x,s.y)<0?f:m;w>h.y+p.length||v<-p.length||(o.fillStyle=b,u&&(o.strokeStyle=b),0===t?Wg(o,a,r,l,y,!0,!1,d,u):t===c.length-2?Wg(o,a,r,l,y,!1,!0,d,u):Wg(o,a,r,l,y,!1,!1,d,u))}o.fillStyle=f,u&&(o.strokeStyle=y),o.beginPath()}function Zg(t,e,i){!function(t,e,i){t.ribbonBounds=A.create(e,i)}(t,e,i),t.ribbonPoints?.length||Fg(t)}function Yg(t){return Math.max(4,Math.round(X(t.shapeData?.count??30)))}function Xg(e,i,n,s,o,a){const{canvasSize:r,direction:c}=e;return c===t.OutModeDirection.bottom?s<=r.height+a:c===t.OutModeDirection.left?n>=-a:c===t.OutModeDirection.right?i<=r.width+a:c===t.OutModeDirection.top?o>=-a:n>=-a&&o>=-a&&i<=r.width+a&&s<=r.height+a}class Kg{#u;constructor(t){this.#u=t}draw(t){const e=this.#u.canvas.size;Zg(t.particle,e.width,e.height),t.particle.ribbonPoints&&t.particle.ribbonPoints.length!==Yg(t.particle)&&Fg(t.particle),Ug(t),Qg(t,this.#u.hdr,this.#u.peakNits,this.#u.hdrMode)}getSidesCount(t){const e=t.ribbonPoints?.length;return e?Math.max(12,2*e):12}isInsideCanvas(e){const{outMode:i,particle:n,radius:s}=e,o=n.ribbonPoints,a=n.ribbonOffsets,r=n.position,c=i===t.OutMode.destroy||i===t.OutMode.out,l=(a?.length??0)*s,h=Math.max(s,l);if(!c)return Xg(e,r.x-h,r.x+h,r.y-h,r.y+h,0);if(!o?.length||!a)return Xg(e,r.x-h,r.x+h,r.y-h,r.y+h,0);let d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;for(const t of o){const e=t.position.x,i=t.position.y,n=e+a.x*s,o=i+a.y*s;d=Math.min(d,e,n),u=Math.max(u,e,n),p=Math.min(p,i,o),g=Math.max(g,i,o)}if(!(Number.isFinite(d)&&Number.isFinite(p)&&Number.isFinite(u)&&Number.isFinite(g)))return!1;const f=n.ribbonOscillationSpeed&&n.ribbonOscillationDistance?n.ribbonOscillationDistance/n.ribbonOscillationSpeed:0;return Xg(e,d,u,p,g,Math.max(h,n.ribbonParticleDist??0)+f)}loadShape(t){if(!t.shapeData)return;const e=Yg(t);t.ribbonPoints?.length&&t.ribbonPoints.length===e||Fg(t)}particleDestroy(t){delete t.ribbonPoints,delete t.ribbonHead,delete t.ribbonPreviousHead,delete t.ribbonPreviousPosition,delete t.ribbonTime,delete t.ribbonOffsets,delete t.ribbonParticleDist,delete t.ribbonMass,delete t.ribbonDrag,delete t.ribbonVelocityInherit,delete t.ribbonOscillationSpeed,delete t.ribbonOscillationDistance}particleInit(t,e){Zg(e,t.canvas.size.width,t.canvas.size.height)}}async function Jg(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["ribbon"],t=>Promise.resolve(new Kg(t)))})}class tf{draw(t){const{context:e,particle:i,radius:n}=t;!function(t,e,i){let n=e[0],s=e[1];if(!n||!s)return;const o=e.length;t.moveTo((n.x+s.x)*u,(n.y+s.y)*u);for(let a=1;a<=o;a++)n=s,s=e[(a+1)%o],n&&s&&t.arcTo(n.x,n.y,(n.x+s.x)*u,(n.y+s.y)*u,i)}(e,function(t,e,i=0){const n=w/t,s=[];for(let o=0;o<t;o++)s.push({x:Math.cos(o*n+i)*e,y:Math.sin(o*n+i)*e});return s}(i.sides,n),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round(X(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round(X(i?.radius??5))*t.retina.pixelRatio}}async function ef(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["rounded-polygon"],()=>Promise.resolve(new tf))})}class nf{draw(t){const{context:e,particle:i,radius:n}=t,s=n*Math.SQRT1_2,o=2*s,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-s,-s,o,o,a):function(t,e,i,n){const s={x:-e,y:-e,height:i,width:i},o=n,a=n,r=n,c=n,{x:l,y:h,width:d,height:u}=s,p=l+d,g=h+u;t.moveTo(l+o,h),t.lineTo(p-a,h),t.quadraticCurveTo(p,h,p,h+a),t.lineTo(p,h+u-c),t.quadraticCurveTo(p,g,p-c,g),t.lineTo(l+r,g),t.quadraticCurveTo(l,g,l,g-r),t.lineTo(l,h+o),t.quadraticCurveTo(l,h,l+o,h)}(e,s,o,a)}particleInit(t,e){const i=e.shapeData;e.borderRadius=X(i?.radius??5)*t.retina.pixelRatio}}async function sf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["rounded-rect"],()=>Promise.resolve(new nf))})}var of;!function(t){t[t.normal=0]="normal",t[t.reverse=1]="reverse"}(of||(of={}));class af{#u;#Ee;#Ie;#y;#ze;#Re;#Le;#Ge;constructor(e){this.#u=e,this.#Ie=[],this.#ze=!1,this.#Le={width:0,height:0},this.#Re=1,this.#Ee={x:0,y:0,mode:t.PixelMode.percent},this.#Ge=0,this.#y=A.origin}generate(t,e){const i=this.#u.retina.pixelRatio;t.svgDirection??=$()>u?of.normal:of.reverse,t.svgPathIndex??=Math.floor($()*this.#Ie.length),t.svgSpeed??=t.velocity.mult(t.retina.moveSpeed*u).length,t.svgStep??=Y({min:0,max:this.#Ie[t.svgPathIndex].length})*i,t.svgOffset??={width:Y({min:-this.#Ge*u,max:this.#Ge*u})*i,height:Y({min:-this.#Ge*u,max:this.#Ge*u})*i},t.svgInitialPosition??=t.position.copy(),t.velocity.x=0,t.velocity.y=0,t.svgDirection===of.normal?t.svgStep+=t.svgSpeed*e.factor:t.svgStep-=t.svgSpeed*e.factor;let n=this.#Ie[t.svgPathIndex];const s=n.length;t.svgStep>=s?(t.svgPathIndex=t.svgPathIndex+1,t.svgPathIndex>=this.#Ie.length&&(this.#ze?(t.svgPathIndex=this.#Ie.length-1,t.svgDirection=of.reverse):(t.svgPathIndex=0,t.svgStep=0))):t.svgStep<=0&&(t.svgPathIndex=t.svgPathIndex-1,t.svgPathIndex<0&&(this.#ze?(t.svgPathIndex=0,t.svgDirection=of.normal):(t.svgPathIndex=this.#Ie.length-1,n=this.#Ie[t.svgPathIndex],t.svgStep=n.length))),n=this.#Ie[t.svgPathIndex];const o=n.element.getPointAtLength(t.svgStep),a=this.#u.canvas.size,r=At(this.#Ee,a),c=this.#Re*i;return t.position.x=(o.x-this.#Le.width*u)*c+t.svgInitialPosition.x+r.x+t.svgOffset.width,t.position.y=(o.y-this.#Le.height*u)*c+t.svgInitialPosition.y+r.y+t.svgOffset.height,this.#y.x=0,this.#y.y=0,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options,e=t.position??this.#Ee;if(this.#ze=t.reverse??this.#ze,this.#Re=t.scale??1,this.#Ee.x=e.x,this.#Ee.y=e.y,this.#Ee.mode=e.mode,this.#Ge=t.width??0,t.url&&!t.path){const e=t.url;(async()=>{const t=await fetch(e),i=await t.text(),{paths:n,size:s}=function(t){const e=(new DOMParser).parseFromString(t,"image/svg+xml").querySelector("svg");if(!e)return{paths:[],size:{width:0,height:0}};const i=e.querySelectorAll("path"),n=[];for(const t of i)t instanceof SVGPathElement&&n.push({element:t,length:t.getTotalLength()});return{paths:n,size:{width:Number.parseFloat(e.getAttribute("width")??"0"),height:Number.parseFloat(e.getAttribute("height")??"0")}}}(i);this.#Ie=n,this.#Le.width=s.width,this.#Le.height=s.height})()}else if(t.path){const e=t.path;this.#Ie=function(t){const e=wt();return t.map(t=>{const i=e.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),{element:i,length:i.getTotalLength()}})}(t.path.data),this.#Le.height=e.size.height,this.#Le.width=e.size.width}}reset(){}update(){}}async function rf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("svgPathGenerator",t=>Promise.resolve(new af(t)))})}class cf{#u;#p;constructor(t,e){this.#p=t,this.#u=e}drawAfter(t){const{context:e}=t;e.restore()}drawBefore(t){const{particle:e,context:i}=t,n=this.#u,s=e,o=s.shadowColor,a=s.shadowOffset;o&&(i.save(),i.shadowBlur=s.shadowBlur??0,i.shadowColor=mi(o,n.hdr,void 0,n.peakNits,n.hdrMode),i.shadowOffsetX=a?.x??0,i.shadowOffsetY=a?.y??0)}particleInit(t,e){const i=e.effectData,n=ve.create(new ve,i?.color);e.shadowColor=ai(this.#p,n),e.shadowBlur=i?.blur??0,e.shadowOffset=i?.offset??g}}async function lf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("shadow",e=>Promise.resolve(new cf(t.pluginManager,e)))})}class hf extends ka{constructor(t){const e=new Bn;super(t,{noise4d:(t,i,n,s)=>e.noise4d.noise(t,i,n,s),seed:t=>{e.noise4d.seed(t)}})}}async function df(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("simplexNoise",t=>Promise.resolve(new hf(t)))})}const uf="pointerdown",pf="touchstart";class gf{loop=!1;source="";load(t){H(t)||(G(t)?(ce(this,"loop",t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class ff{duration=500;value=[];load(t){H(t)||(ce(this,"duration",t.duration),ce(this,"value",t.value))}}class yf{loop=!1;melodies=[];notes=[];load(t){H(t)||(ce(this,"loop",t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new yf;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new ff;return e.load(t),e})))}}class mf{audio;event=[];filter;melodies;notes=[];load(t){if(!H(t)&&(ce(this,"event",t.event),void 0!==t.audio&&(F(t.audio)?this.audio=t.audio.map(t=>{const e=new gf;return e.load(t),e}):(this.audio=new gf,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new ff;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new yf;return e.load(t),e})),t.filter))if(E(t.filter)){const e=globalThis[t.filter];z(e)&&(this.filter=e)}else this.filter=t.filter}}class wf{height=24;path;style="";svg;width=24;load(t){H(t)||(ce(this,"path",t.path),ce(this,"svg",t.svg),ce(this,"width",t.width),ce(this,"height",t.height))}}class vf{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new wf,this.unmute=new wf,this.volumeDown=new wf,this.volumeUp=new wf,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n    </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n    </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n        <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n    </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n        <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n        <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n        <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n    </g>\n</svg>'}load(t){H(t)||(ce(this,"enable",t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class bf{max=100;min=0;step=10;value=100;load(t){H(t)||(G(t)?(ce(this,"max",t.max),ce(this,"min",t.min),ce(this,"step",t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class xf{autoPlay=!0;enable=!1;events=[];icons=new vf;volume=new bf;load(t){H(t)||(ce(this,"autoPlay",t.autoPlay),ce(this,"enable",t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new mf;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const Sf=new Map;function Pf(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],n=Sf.get(i);return n?n[parseInt(e[3]??"0")]:void 0}Sf.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Sf.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Sf.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Sf.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Sf.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Sf.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Sf.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Sf.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Sf.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Sf.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Sf.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Sf.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Sf.set("pause",[0]);let Mf=!0;const Cf=()=>Mf,_f=()=>{Mf=!1},kf=()=>{removeEventListener(uf,kf),removeEventListener(pf,kf),_f()};class Of{id="sounds";#s;constructor(t){this.#s=t;const e={capture:!0,once:!0};addEventListener(uf,kf,e),addEventListener(pf,kf,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return cm});return new e(t,this.#s)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.sounds;void 0===n?.load&&(e.sounds=n=new xf),n.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function Tf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Of(t))})}var Df;!function(t){t[t.positive=1]="positive",t[t.negative=-1]="negative"}(Df||(Df={}));const Af={maxRadius:{min:10,max:50},angularSpeed:{min:.01,max:.04},radialSpeed:{min:.1,max:.3}};class Vf{options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.options=_t({},Af)}generate(t,e){const i=this.options;t.spiral??={angle:$()*w,radius:0,direction:Df.positive,maxRadius:X(i.maxRadius),angularSpeed:.01*X(i.angularSpeed),radialSpeed:.01*X(i.radialSpeed)};const n=t.spiral;n.angle+=n.angularSpeed*e.factor,n.radius+=n.radialSpeed*n.direction*e.factor,n.radius>n.maxRadius&&n.direction===Df.positive?(n.radius=n.maxRadius,n.direction=Df.negative):n.radius<0&&n.direction===Df.negative&&(n.radius=0,n.direction=Df.positive);const s=Math.cos(n.angle)*n.radius,o=Math.sin(n.angle)*n.radius;return t.position.x+=s,t.position.y+=o,this.#y.x=0,this.#y.y=0,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.maxRadius=t.maxRadius??this.options.maxRadius,this.options.angularSpeed=t.angularSpeed??this.options.angularSpeed,this.options.radialSpeed=t.radialSpeed??this.options.radialSpeed}reset(t){delete t.spiral}update(){}}async function Ef(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("spiralPathGenerator",t=>Promise.resolve(new Vf(t)))})}class If{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;if(void 0===i.spiralInnerRadius||void 0===i.spiralLineSpacing||void 0===i.spiralWidthFactor)return;const s=(n-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*s;t++){const n=t/10,s=i.spiralInnerRadius+i.spiralLineSpacing*n,o={x:s*Math.cos(n),y:s*Math.sin(n)};e.lineTo(o.x,o.y)}}(t)}particleInit(t,e){const i=t.retina.pixelRatio,n=e.shapeData;e.spiralInnerRadius=X(n?.innerRadius??1)*i,e.spiralLineSpacing=X(n?.lineSpacing??1)*i,e.spiralWidthFactor=X(n?.widthFactor??10)}}async function zf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spiral"],()=>Promise.resolve(new If))})}function Rf(t){return t<0?-1:1}class Lf{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;if(void 0===i.squircleExponent||void 0===i.squircleSteps)return;const s=i.squircleSteps,o=w/s,a=2/i.squircleExponent;e.save(),e.scale(n,n),e.beginPath();for(let t=0;t<=s;t++){const i=t*o,n=Math.cos(i),s=Math.sin(i),r=Rf(n)*Math.pow(Math.abs(n),a),c=Rf(s)*Math.pow(Math.abs(s),a);t?e.lineTo(r,c):e.moveTo(r,c)}e.closePath(),e.restore()}(t)}particleInit(t,e){const i=e.shapeData;e.squircleExponent=X(i?.exponent??4),e.squircleSteps=X(i?.steps??64)}}async function Gf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["squircle"],()=>Promise.resolve(new Lf))})}var Ff;!function(t){t.any="any",t.dark="dark",t.light="light"}(Ff||(Ff={}));class Hf{auto=!1;mode=Ff.any;value=!1;load(t){H(t)||(ce(this,"auto",t.auto),ce(this,"mode",t.mode),ce(this,"value",t.value))}}class Nf{default=new Hf;name="";options;load(t){H(t)||(ce(this,"name",t.name),this.default.load(t.default),void 0!==t.options&&(this.options=_t({},t.options)))}}class Bf{id="theme";async getPlugin(t){const{ThemesPluginInstance:e}=await Promise.resolve().then(function(){return lm});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;const n=t=>{if(e.themes)return e.themes.find(e=>e.default.value&&e.default.mode===t)??e.themes.find(t=>t.default.value&&t.default.mode===Ff.any)};if(e.findDefaultTheme=n,e.setTheme=t=>{if(e.themes)if(t){const i=e.themes.find(e=>e.name===t);i&&e.load(i.options)}else{const t=vt("(prefers-color-scheme: dark)"),i=t?.matches,s=n(i?Ff.dark:Ff.light);s&&e.load(s.options)}},e.themes??=[],void 0!==i?.themes)for(const t of i.themes){if(!t)continue;const i=e.themes.find(e=>e.name===t.name);if(i)i.load(t);else{const i=new Nf;i.load(t),e.themes.push(i)}}e.defaultThemes.dark=n(Ff.dark)?.name,e.defaultThemes.light=n(Ff.light)?.name}needsPlugin(t){return!!t?.themes?.length}}async function Uf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Bf)})}class $f{#u;constructor(t){this.#u=t}drawAfter(t){const{context:e,drawPosition:i,drawRadius:n,drawScale:s,particle:o,transformData:a}=t,r=2*n,c=this.#u.retina.pixelRatio,l=o.trail;if(!l||!o.trailLength)return;const h=i,d=o.trailLength*s+n;if(l.push({break:o.justWarped,color:e.fillStyle||e.strokeStyle,position:{x:h.x,y:h.y},transformData:a}),l.length<3)return;const p=Math.floor(d);l.length>p&&l.splice(0,l.length-p);const y=Math.min(l.length,d);e.save(),e.lineCap="butt",e.lineJoin="round";for(let t=y-2;t>0;t--){const i=l[t+1],n=l[t],a=l[t-1];if(!i||!n||!a)continue;const h=i.position,d=n.position,p=a.position,m=o.trailTransform?n.transformData??f:f;if(n.break||i.break||a.break)continue;e.setTransform(m.a,m.b,m.c,m.d,d.x,d.y);const w=(h.x+d.x)*u-d.x,v=(h.y+d.y)*u-d.y,b=(d.x+p.x)*u-d.x,x=(d.y+p.y)*u-d.y;e.beginPath(),e.moveTo(w,v),e.quadraticCurveTo(g.x,g.y,b,x);const S=Math.max(t/y*r,c,(o.trailMinWidth??-1)*s),P=e.globalAlpha;e.globalAlpha=o.trailFade?t/y:1,e.lineWidth=o.trailMaxWidth?Math.min(S,o.trailMaxWidth*s):S,e.strokeStyle=n.color,e.stroke(),e.globalAlpha=P}e.restore()}isInsideCanvas(e){const{canvasSize:i,direction:n,outMode:s,particle:o,radius:a}=e,r=o.position,c=o.trail;let l=r.x-a,h=r.x+a,d=r.y-a,u=r.y+a;if(c?.length){const t=Math.max(a,o.trailMaxWidth??0,o.trailMinWidth??0);for(const e of c)l=Math.min(l,e.position.x-t),h=Math.max(h,e.position.x+t),d=Math.min(d,e.position.y-t),u=Math.max(u,e.position.y+t)}const p=s===t.OutMode.destroy;return n===t.OutModeDirection.bottom?d<=i.height:n===t.OutModeDirection.left?h>=0:n===t.OutModeDirection.right?l<=i.width:n===t.OutModeDirection.top?u>=0:p?h>=0&&u>=0&&l<=i.width&&d<=i.height:r.x+a>=0&&r.y+a>=0&&r.x-a<=i.width&&r.y-a<=i.height}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=X(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?X(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?X(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}async function jf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("trail",t=>Promise.resolve(new $f(t)))})}class qf{color;image;load(t){H(t)||(void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"image",t.image))}}class Wf{enable=!1;fill=new qf;length=10;load(t){H(t)||(ce(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),ce(this,"length",t.length))}}class Qf{id="trail";#p;constructor(t){this.#p=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return hm});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.trail;n?.load||(e.trail=n=new Wf),n.load(i?.trail)}needsPlugin(){return!0}}async function Zf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Qf(t.pluginManager))})}const Yf=Math.PI*u,Xf={waveHeight:{min:0,max:3},waveLength:{min:0,max:5}};class Kf{options;#u;#y;constructor(t){this.#u=t,this.#y=A.origin,this.options=_t({},Xf)}generate(t,e){const i=this.options;t.zigzag??={counter:$(),waveHeight:X(i.waveHeight),waveLength:X(i.waveLength)};const n=.5/t.zigzag.waveLength*e.factor;t.zigzag.counter+=n;const s=t.zigzag.waveHeight*Math.sin(t.zigzag.counter);return t.position.x+=s*Math.cos(t.velocity.angle+Yf),t.position.y+=s*Math.sin(t.velocity.angle+Yf),this.#y.x=0,this.#y.y=0,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.waveLength=t.waveLength??this.options.waveLength,this.options.waveHeight=t.waveHeight??this.options.waveHeight}reset(){}update(){}}async function Jf(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Gi(t),t.pluginManager.addPathGenerator?.("zigZagPathGenerator",t=>Promise.resolve(new Kf(t)))})}class ty{enable=!1;max=5;min=.1;load(t){H(t)||(ce(this,"enable",t.enable),ce(this,"min",t.min),ce(this,"max",t.max))}}class ey{id="zoom";async getPlugin(t){const{ZoomPluginInstance:e}=await Promise.resolve().then(function(){return um});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.zoom;n||(n=new ty,e.zoom=n),n.load(i?.zoom)}needsPlugin(){return!0}}async function iy(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ey)})}async function ny(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([(async t=>{await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{const e=async t=>{await mo(t),await Promise.all([er(t),ar(t)])};await Promise.all([(async t=>{await Gh(t),await Promise.all([hr(t),mr(t),Na(t),e(t)])})(t),Ka(t),Sr(t),Wh(t),Kh(t),id(t),Bh(t)])})}(t),await Promise.all([aa(t),ha(t),ua(t),Xu(t),ig(t),jd(t),zo(t),Uo(t),Zo(t),Ni(t),Ui(t),jn(t),Qn(t),Ta(t),Td(t),Fu(t),cg(t),Tg(t),Ag(t),rf(t),Ef(t),Jf(t),df(t)])})(t),zd(t),Hd(t),fu(t),Lu(t),Tp(t),$p(t),gp(t),Yn(t),Jn(t),es(t),ns(t),os(t),rs(t),hs(t),us(t),gs(t),ys(t),vs(t),xs(t),Ms(t),Ii(t),tn(t),tp(t),dp(t),dg(t),_g(t),zg(t),Tf(t),Uf(t),Zf(t),iy(t),Xo(t),Jo(t),ea(t),Cd(t),Xp(t),ji(t),ga(t),Jp(t),lf(t),jf(t),Di(t),In(t),Rn(t),md(t),Ad(t),Wd(t),rp(t),sg(t),Jg(t),ef(t),sf(t),zf(t),Gf(t)])})}const sy=globalThis;sy.loadAll=ny,sy.tsParticles=Oi;function oy(t,e,i){const n=e[i];void 0!==n&&(t[i]=(t[i]??1)*n)}class ay{#Fe;#He;#Ne;#Be;#Ue;#u;#$e;#je;#qe;#We;#Qe;#Ze;#p;#Ye;#Xe;#Ke={};#Je=[void 0,void 0];#ti={};constructor(t,e,i){this.#p=t,this.#u=e,this.#Be=i,this.#$e=null,this.#Fe=null,this.#He=new Set,this.#Xe=[],this.#Ye=[],this.#Ne=[],this.#Ue=[],this.#qe=[],this.#We=[],this.#Qe=[],this.#Ze={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#je}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(g.x,g.y,this.#Be.size.width,this.#Be.size.height)})}clear(){const e=new Set;for(const t of this.#Ne)if(e.add(t),t.canvasClear?.())return t;for(const i of Object.values(t.DrawLayer))if("number"==typeof i)for(const t of this.#ei(i))if(!e.has(t)&&(e.add(t),t.canvasClear?.()))return t;this.canvasClear()}destroy(){this.stop(),this.#Fe=null,this.#He.clear(),this.#Xe=[],this.#Ye=[],this.#Ne=[],this.#Ue=[],this.#qe=[],this.#We=[],this.#Qe=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Ze[e]=[])}draw(t){const e=this.#$e;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const n=t.getFillColor(),s=t.getStrokeColor();let[o,a]=this.#ii(t);if(o??=n,a??=s,!o&&!a)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#ti,g=this.#Ke,f=o?wi(o,r.hdr,h*d,r.peakNits,r.hdrMode):void 0,y=a?wi(a,r.hdr,u*d,r.peakNits,r.hdrMode):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(n=>{for(const i of this.#Qe)i.drawParticleSetup?.(n,t,e);this.#ni(n,t,i,d,g,p),this.#si({container:r,context:n,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:d,transform:p}),this.#oi(t);for(const i of this.#We)i.drawParticleCleanup?.(n,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const n of this.#qe)this.#ai(i,n,t,e)})}drawParticles(e){const{particles:i,actualOptions:n}=this.#u,s=this.clear();i.update(e),this.draw(o=>{const a=this.#Be.size.width,r=this.#Be.size.height;if(this.#Fe)try{o.drawImage(this.#Fe,g.x,g.y,a,r)}catch{this.#ri("background-element-draw-error","Error drawing background element onto canvas")}const c=n.background;if(c.draw)try{c.draw(o,e)}catch{this.#ri("background-draw-error","Error in background.draw callback")}for(const e of this.#ei(t.DrawLayer.BackgroundMask))e!==s&&e.canvasPaint?.();for(const i of this.#ei(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(o,e);for(const i of this.#ei(t.DrawLayer.PluginContent))i.draw?.(o,e);i.drawParticles(e);for(const i of this.#ei(t.DrawLayer.CanvasCleanup))i.clearDraw?.(o,e),i.drawSettingsCleanup?.(o,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#ci(),this.paint()}initPlugins(){this.#Ne=[],this.#Ue=[],this.#qe=[],this.#Qe=[],this.#We=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Ze[e]=[]);this.#li()}initUpdaters(){this.#Xe=[],this.#Ye=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#Ye.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#Xe.push(t)}paint(){let e=!1;for(const i of this.#ei(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(g.x,g.y,this.#Be.size.width,this.#Be.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const n=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,g.x,g.y,this.#Be.size.width,this.#Be.size.height),i.globalAlpha=n})}setContext(t){this.#$e=t,this.#$e&&(this.#$e.globalCompositeOperation=c)}setContextSettings(t){this.#je=t}stop(){this.draw(t=>{t.clearRect(g.x,g.y,this.#Be.size.width,this.#Be.size.height)})}#oi(t){for(const e of this.#Ye)e.afterDraw?.(t)}#ni(t,e,i,n,s,o){for(const a of this.#Xe){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,n);o&&(s.fill=o),r&&(s.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)oy(o,t,e)}a.beforeDraw?.(e)}}#hi(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#di(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#si(t){const{container:e,context:i,particle:n,delta:s,colorStyles:o,radius:a,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=n.getPosition(),u=n.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=!!n.fillEnabled,f=n.strokeWidth??0;i.lineWidth=f,o.stroke&&(i.strokeStyle=o.stroke);const y={context:i,particle:n,radius:a,drawRadius:1*a,opacity:r,delta:s,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=n.effect?l.get(n.effect):void 0,w=n.shape?h.get(n.shape):void 0;this.#di(m,y),this.#ui(w,y),this.#pi(w,y),this.#gi(w,y),this.#hi(m,y),i.resetTransform()}#ai(t,e,i,n){e.drawParticle&&e.drawParticle(t,i,n)}#pi(t,e){if(!t)return;const{context:i,fill:n,particle:s,stroke:o}=e;s.shape&&(i.beginPath(),t.draw(e),s.shapeClose&&i.closePath(),n&&i.fill(),o&&i.stroke())}#gi(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#ui(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#ei(t){return this.#Ze[t]}#ii(t){let e,i;for(const n of this.#Ue)if(!e&&n.particleFillColor&&(e=ci(this.#p,n.particleFillColor(t))),!i&&n.particleStrokeColor&&(i=ci(this.#p,n.particleStrokeColor(t))),e&&i)break;return this.#Je[0]=e,this.#Je[1]=i,this.#Je}#fi(e){const i=[[t.DrawLayer.BackgroundMask,!!e.canvasPaint],[t.DrawLayer.CanvasSetup,!!e.drawSettingsSetup],[t.DrawLayer.PluginContent,!!e.draw],[t.DrawLayer.CanvasCleanup,!!(e.clearDraw??e.drawSettingsCleanup)]];for(const[t,n]of i)n&&this.#Ze[t].push(e)}#li(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#Ue.push(t),t.drawParticle&&this.#qe.push(t),t.drawParticleSetup&&this.#Qe.push(t),t.drawParticleCleanup&&this.#We.push(t),t.canvasClear&&this.#Ne.push(t),this.#fi(t)}#yi(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}#ci(){const t=this.#u.actualOptions.background;if(this.#Fe=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e&&this.#yi(e)?this.#Fe=e:e?this.#ri("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#ri("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#yi(t.element)&&(this.#Fe=t.element)}#ri(t,e){this.#He.has(t)||(this.#He.add(t),s().warning(e))}}const ry=new WeakMap;function cy(t,e,i=!1){if(!e)return;const n=t.style,s=new Set;for(let t=0;t<n.length;t++){const e=n.item(t);e&&s.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&s.add(i)}for(const t of s){const s=e.getPropertyValue(t);s?n.setProperty(t,s,i?"important":""):n.removeProperty(t)}}class ly{domElement;render;renderCanvas;size;zoom=1;#u;#mi;#wi;#vi;#bi;#p;#xi;#Si;#Pi;#Mi;constructor(t,e){this.#p=t,this.#u=e,this.render=new ay(t,e,this),this.#Pi={height:0,width:0};const i=e.retina.pixelRatio,n=this.#Pi;this.size={height:n.height*i,width:n.width*i},this.#mi=!1,this.#Si=[],this.#xi="none"}get#Ci(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#mi){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#_i();this.render.destroy(),this.#Si=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Mi?this.#Mi:{x:e*u/t,y:i*u/t}}init(){this.#ki(t=>{t.disconnect()}),this.#vi=bt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Oi()}),this.resize(),this.#Ti(),this.#ki(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Di(),this.initBackground(),this.#Ai(),this.render.init()}initBackground(){const e=this.#u,i=e.actualOptions.background,n=this.domElement;if(!n)return;const s=n.style,o=ai(this.#p,i.color);if(o){const n=e.actualOptions.hdr;s.backgroundColor=mi(o,e.hdr,i.opacity,n.peakNits,L(t.HdrMode,n.mode,t.HdrMode.standard))}else s.backgroundColor="";s.backgroundImage=i.image||"",s.backgroundPosition=i.position||"",s.backgroundRepeat=i.repeat||"",s.backgroundSize=i.size||""}initPlugins(){this.#Si=[];for(const t of this.#u.plugins)t.resize&&this.#Si.push(t)}loadCanvas(t){this.#mi&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#mi=!!e&&"true"===e.dataset[a],this.renderCanvas=e?(t=>{const e=ry.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(gt(pt.offscreenCanvasUnsupported));try{const e=t.transferControlToOffscreen();return ry.set(t,e),e}catch{throw new TypeError(gt(pt.offscreenCanvasTransferFailed))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#bi=Vt(i.style));const n=this.#Pi,s=this.renderCanvas;i?(n.height=i.offsetHeight,n.width=i.offsetWidth):(n.height=s.height,n.width=s.width);const o=this.#u.retina.pixelRatio,r=this.size;s.height=r.height=n.height*o,s.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 n=e.canvas.#Pi,s={width:t.offsetWidth,height:t.offsetHeight},o=e.retina.pixelRatio,a={width:s.width*o,height:s.height*o};if(s.height===n.height&&s.width===n.width&&a.height===i.height&&a.width===i.width)return!1;const r={...n};n.height=s.height,n.width=s.width;const c=this.size;return i.width=c.width=a.width,i.height=c.height=a.height,this.#u.started&&e.particles.setResizeFactor({width:n.width/r.width,height:n.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#xi=t,this.#Oi())}setZoom(t,e){this.zoom=t,this.#Mi=e}stop(){this.#ki(t=>{t.disconnect()}),this.#vi=void 0,this.#Vi(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Ei(),e&&await t.refresh()}#Ei(){for(const t of this.#Si)t.resize?.()}#Di(){const e=this.#u,i=e.actualOptions.hdr.enable&&vt("(color-gamut: p3)")?.matches&&vt("(dynamic-range: high)")?.matches;e.hdrMode=L(t.HdrMode,e.actualOptions.hdr.mode,t.HdrMode.standard),e.peakNits=e.actualOptions.hdr.peakNits;const n=this.renderCanvas;if(!n)return void(e.hdr=i??!1);let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...i?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=n.getContext("2d",this.render.settings)}catch{s=null}if(i&&!s){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{s=n.getContext("2d",t)}catch{s=null}}if(this.render.setContext(s),s){const t=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(s);void 0!==t&&(e.hdr="display-p3"===t)}}#Ai(){this.#Vi();const t=vt("(color-gamut: p3)"),e=vt("(dynamic-range: high)"),i=()=>{this.#Di(),this.initBackground()},n=[];t&&(t.addEventListener("change",i),n.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),n.push({handler:i,mql:e})),this.#wi=n}#Ti(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Ci?this.#Ii():this.#_i();for(const i in e.style){if(!i||!(i in e.style))continue;const n=e.style[i];n&&t.style.setProperty(i,n,"important")}}}#Vi(){if(this.#wi){for(const{handler:t,mql:e}of this.#wi)e.removeEventListener("change",t);this.#wi=void 0}}#Oi(){const t=this.domElement;if(!t)return;this.#ki(t=>{t.disconnect()}),this.#Ti(),this.initBackground();const e=this.#xi;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#ki(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#_i(){const t=this.domElement,e=this.#bi;t&&e&&cy(t,e,!0)}#ki(t){this.#vi&&t(this.#vi)}#Ii(){const t=this.domElement;t&&cy(t,zt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class hy{#u;#zi;#Ri;#Li;constructor(t){this.#u=t,this.#zi={visibilityChange:()=>{this.#Gi()},resize:()=>{this.#Fi()}}}addListeners(){this.#Hi(!0)}removeListeners(){this.#Hi(!1)}#Gi(){const t=this.#u;t.actualOptions.pauseOnBlur&&(wt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Fi(){this.#Li&&(clearTimeout(this.#Li),this.#Li=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#Li=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*p)}#Hi(t){const e=this.#zi;this.#Ni(t),Rt(document,h,e.visibilityChange,t,!1)}#Ni(t){const e=this.#zi,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Rt(globalThis,l,e.resize,t);const n=i.canvas.domElement;this.#Ri&&!t?(n&&this.#Ri.unobserve(n),this.#Ri.disconnect(),this.#Ri=void 0):!this.#Ri&&t&&n&&(this.#Ri=new ResizeObserver(t=>{t.some(t=>t.target===n)&&this.#Fi()}),this.#Ri.observe(n))}}function dy(t){if(!xt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function uy(t,e){const i=t%e;return i<0?i+e:i}function py(t,e,i,n){const s=We(i,e,e.actualOptions.particles),o=s.reduceDuplicates;t.effect=Dt(s.effect.type,t.id,o),t.shape=Dt(s.shape.type,t.id,o);const a=s.effect,r=s.shape;if(n){if(n.effect){const e=n.effect.type;if(e&&e!==t.effect){const i=Dt(e,t.id,o);i&&(t.effect=i)}a.load(n.effect)}if(n.shape){const e=n.shape.type;if(e&&e!==t.shape){const i=Dt(e,t.id,o);i&&(t.shape=i)}r.load(n.shape)}}if(t.effect===y){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor($()*i.length)]}if(t.shape===y){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor($()*i.length)]}t.effectData=t.effect?function(t,e,i,n){const s=e.options[t];return _t({close:e.close},Dt(s,i,n))}(t.effect,a,t.id,o):void 0,t.shapeData=t.shape?function(t,e,i,n){const s=e.options[t];return _t({close:e.close},Dt(s,i,n))}(t.shape,r,t.id,o):void 0,s.load(n);const c=t.effectData,l=t.shapeData;return c&&s.load(c.particles),l&&s.load(l.particles),t.effectClose=c?.close??s.effect.close,t.shapeClose=l?.close??s.shape.close,s}class gy{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;#Bi={fillOpacity:1,opacity:1,strokeOpacity:1};#Ui=D.origin;#$i={sin:0,cos:0};#ji={a:1,b:0,c:0,d:1};#u;#Qt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Qt.push(t),this.#Qt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Qt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0;n?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#qi(this.#Wi(Si(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*u}getModifier(t){return this.#Qt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=X(this.opacity?.value??1),n=this.#Wi(void 0,t=>t.opacity)??i;return this.#Bi.fillOpacity=this.fillOpacity??1,this.#Bi.opacity=n*e,this.#Bi.strokeOpacity=this.strokeOpacity??1,this.#Bi}getPosition(){return this.#Ui.x=this.position.x+this.offset.x,this.#Ui.y=this.position.y+this.offset.y,this.#Ui.z=this.position.z,this.#Ui}getRadius(){return this.#Wi(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#$i.sin=Math.sin(t),this.#$i.cos=Math.cos(t),this.#$i}getStrokeColor(){return this.#qi(this.#Wi(Si(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#ji.a=e.cos*(t.a??f.a),this.#ji.b=i?e.sin*(t.b??1):t.b??f.b,this.#ji.c=i?-e.sin*(t.c??1):t.c??f.c,this.#ji.d=e.cos*(t.d??f.d),this.#ji}init(e,i,n,s){const o=this.#u;!function(e,i,n){e.id=i,e.group=n,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,s),this.options=py(this,o,this.#p,n),o.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(o.particleUpdaters,this),this.#Qi(i),this.initialVelocity=this.#Zi(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,function(t,e){let i,n;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(n=e.shapeDrawers.get(t.shape)),n?.loadShape&&n.loadShape(t);const s=n?.getSidesCount;s&&(t.sides=s(t))}(this,o),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(o.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,n=e.effect?t.effectDrawers.get(e.effect):void 0;n?.particleInit?.(t,e),i?.particleInit?.(t,e)}(o,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(o,this)}isInsideCanvas(t){return this.#Yi({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Yi({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=uy(t,w);return e>=Math.PI*u&&e<3*Math.PI*u}if(this.roll.horizontal){const e=uy(t+Math.PI*u,w);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=uy(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.#Qt.findIndex(e=>e.id===t);e>=0&&this.#Qt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Wi(t,e){let i=t;for(const t of this.#Qt)if(t.enabled){const n=e(t);void 0!==n&&(i=n)}return i}#Xi(t,e){let i=0,n=t?D.create(t.x,t.y,e):void 0;const s=this.#u,o=s.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),c=s.canvas.size;for(;;){for(const t of o){const i=t.particlePosition?.(n,this);if(i)return D.create(i.x,i.y,e)}const t=dt({size:c,position:n}),l=D.create(t.x,t.y,e);this.#Ki(l,r,a.left??a.default),this.#Ki(l,r,a.right??a.default),this.#Ji(l,r,a.top??a.default),this.#Ji(l,r,a.bottom??a.default);let h=!0;for(const t of s.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,n=void 0}}#Zi(){const e=this.options.move,i=rt(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const n=ot(X(e.angle.value)),s=ot(X(e.angle.offset)),o={left:s-n*u,right:s+n*u};return e.straight||(i.angle+=Y(tt(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=$()),i}#Ki(e,i,n){dy({outMode:n,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Ji(e,i,n){dy({outMode:n,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#tn(e,i){const n=this.getRadius(),s=this.#u.canvas.size,o=this.position,a=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:a?o.y+n<s.height:o.y-n<s.height,reason:"default"}:e===t.OutModeDirection.left?{inside:a?o.x-n>0:o.x+n>0,reason:"default"}:e===t.OutModeDirection.right?{inside:a?o.x+n<s.width:o.x-n<s.width,reason:"default"}:e===t.OutModeDirection.top?{inside:a?o.y-n>0:o.y+n>0,reason:"default"}:{inside:o.x>=-n&&o.y>=-n&&o.y<=s.height+n&&o.x<=s.width+n,reason:"default"}}#en(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Yi(t){const e=this.#tn(t.direction,t.outMode),i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0,s=this.effect?i.effectDrawers.get(this.effect):void 0,o=n?.isInsideCanvas,a=s?.isInsideCanvas;if(!o&&!a)return e;const r=this.#en(t.direction,t.outMode),c=o?this.#in(o(r),"shape"):void 0,l=a?this.#in(a(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}#qi(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ki(t,this.roll.alter.type,this.roll.alter.value):t:t}#Qi(e){const i=this.#u,n=Math.floor(X(this.options.zIndex.value)),s=this.#Xi(e,Q(n,0,i.zLayers));if(!s)throw new Error(gt(pt.particlePositionNotFound));this.position=s,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...At(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=at(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=A.origin}#in(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class fy{#nn;#sn=new Map;#on=[];#an;#rn;#cn=[];#ln;constructor(t){this.#nn=t,this.#an=0,this.#ln=0}get cellSize(){return this.#nn}set cellSize(t){this.#rn=t}clear(){this.#sn.clear();const t=this.#rn;t&&(this.#nn=t),this.#rn=void 0}insert(t){const{x:e,y:i}=t.getPosition(),n=this.#hn(e,i);this.#sn.has(n)||this.#sn.set(n,[]),this.#sn.get(n)?.push(t)}query(t,e,i=[]){const n=this.#dn(t);if(!n)return i;const s=Math.floor(n.minX/this.#nn),o=Math.floor(n.maxX/this.#nn),a=Math.floor(n.minY/this.#nn),r=Math.floor(n.maxY/this.#nn);for(let n=s;n<=o;n++)for(let s=a;s<=r;s++)this.#un(n,s,t,e,i);return i}queryCircle(t,e,i,n=[]){const s=this.#pn(t.x,t.y,e),o=this.query(s,i,n);return this.#gn(),o}queryRectangle(t,e,i,n=[]){const s=this.#fn(t.x,t.y,e.width,e.height),o=this.query(s,i,n);return this.#gn(),o}#pn(t,e,i){const n=this.#an++;let s=this.#on[n];return s||(s=new ae(t,e,i),this.#on[n]=s),s.reset(t,e,i)}#fn(t,e,i,n){const s=this.#ln++;let o=this.#cn[s];return o||(o=new re(t,e,i,n),this.#cn[s]=o),o.reset(t,e,i,n)}#hn(t,e){return`${Math.floor(t/this.#nn)}_${Math.floor(e/this.#nn)}`}#dn(t){if(t instanceof ae){const e=t.radius,{x:i,y:n}=t.position;return{minX:i-e,maxX:i+e,minY:n-e,maxY:n+e}}if(t instanceof re){const{x:e,y:i}=t.position,{width:n,height:s}=t.size;return{minX:e,maxX:e+n,minY:i,maxY:i+s}}return null}#un(t,e,i,n,s){const o=this.#sn.get(`${t}_${e}`);if(o)for(const t of o)n&&!n(t)||i.contains(t.getPosition())&&s.push(t)}#gn(){this.#an=0,this.#ln=0}}class yy{checkParticlePositionPlugins;#yn;#u;#mn;#wn;#vn;#bn;#xn;#Sn;#Pn;#p;#Mn;#Cn;#_n;#kn;#On;#Tn;constructor(t,e){this.#p=t,this.#u=e,this.#bn=0,this.#yn=[],this.#Mn=[],this.#vn=0,this.#wn=new Map,this.#xn=new Map,this.#Tn=this.#Dn(this.#u.zLayers),this.#mn=new fy(100),this.checkParticlePositionPlugins=[],this.#Sn=[],this.#Pn=[],this.#_n=[],this.#Cn=[],this.#On=[]}get count(){return this.#yn.length}get grid(){return this.#mn}addParticle(e,i,n,o){if(!this.#An(n,this.count))try{const s=this.#Mn.pop()??new gy(this.#p,this.#u);s.init(this.#bn,e,i,n);let a=!0;return o&&(a=o(s)),a?(this.#yn.push(s),this.#Vn(s),this.#bn++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:s}),s):void this.#Mn.push(s)}catch(t){s().warning(`error adding particle: ${t}`)}}clear(){this.#yn=[],this.#xn.clear(),this.#En(this.#u.zLayers)}destroy(){this.#yn=[],this.#Mn.length=0,this.#xn.clear(),this.#Tn=[],this.checkParticlePositionPlugins=[],this.#Sn=[],this.#Pn=[],this.#_n=[],this.#Cn=[],this.#On=[]}drawParticles(t){for(let e=this.#Tn.length-1;e>=0;e--){const i=this.#Tn[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#yn.filter(t)}find(t){return this.#yn.find(t)}get(t){return this.#yn[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#On=[],this.#Pn=[],this.#_n=[],this.#Sn=[],this.#Cn=[],this.#xn.clear(),this.#En(t.zLayers),this.#mn=new fy(100*t.retina.pixelRatio),this.#In(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#In(We(this.#p,this.#u,i),t,i)}await this.#zn()}push(t,e,i,n){for(let s=0;s<t;s++)this.addParticle(e,i,n)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#yn.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,n,s=!0){if(t<0||t>this.count)return;let o=0;for(let a=t;o<e&&a<this.count;a++)this.#Rn(a,i,n,s)&&(a--,o++)}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 n=e[t];if(!n)continue;const s=We(this.#p,this.#u,n);this.#Ln(s,i,t)}this.#Ln(t.particles,i)}setResizeFactor(t){this.#kn=t}update(t){this.#mn.clear();for(const e of this.#On)e.update?.(t);const e=this.#Gn(t);for(const e of this.#_n)e.postUpdate?.(t);if(this.#Fn(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#kn=void 0}#Hn(...t){this.#Mn.push(...t)}#Ln(e,i,n,s){const o=e.number;if(!o.density.enable)return void this.#In(e,n,s);const a=this.#Nn(o.density),r=o.value,c=o.limit.value>0?o.limit.value:r,l=Math.min(r,c)*a+i,h=Math.min(this.count,this.filter(t=>t.group===n).length);void 0===n?this.#vn=o.limit.value*a:this.#wn.set(n,{limit:o.limit.value*a,mode:L(t.LimitMode,o.limit.mode,t.LimitMode.delete)}),h<l?this.push(Math.abs(l-h),void 0,e,n):h>l&&this.removeQuantity(h-l,n)}#In(e,i,n){if(void 0===i){this.#vn=e.number.limit.value;const t=this.#u.actualOptions.particles.groups;for(const e of this.#wn.keys())e in t||this.#wn.delete(e)}else{const s=n?.number?.limit?.value??e.number.limit.value;s>0?this.#wn.set(i,{limit:s,mode:L(t.LimitMode,n?.number?.limit?.mode??e.number.limit.mode,t.LimitMode.delete)}):this.#wn.delete(i)}}#An(e,i){const n=this.#vn,s=this.#u.actualOptions.particles.number.limit.mode;if(n>0&&s===t.LimitMode.wait&&i>=n)return!0;const o=void 0===e?void 0:this.#wn.get(e);if(o&&o.limit>0&&o.mode===t.LimitMode.wait){if(this.filter(t=>t.group===e).length>=o.limit)return!0}if(o&&o.limit>0&&o.mode===t.LimitMode.delete){const t=this.filter(t=>t.group===e).length+1-o.limit;t>0&&this.removeQuantity(t,e)}if(n>0&&s===t.LimitMode.delete){const t=this.count+1-n;t>0&&this.#Bn(t)}return!1}#Dn(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Un(t){const e=this.#Tn.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Nn(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,n=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*n**2):1}async#$n(){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#zn(){await this.#jn(),await this.#$n();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,n=i.groups;for(const t in n){const e=n[t];if(e)for(let n=this.count,s=0;s<e.number.value&&n<i.number.value;n++,s++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#jn(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#On.push(e),e.particleUpdate&&this.#Pn.push(e),e.postUpdate&&this.#_n.push(e),e.particleReset&&this.#Sn.push(e),e.postParticleUpdate&&this.#Cn.push(e)}#Vn(t){const e=this.#Un(t.position.z),i=this.#Tn[e];i&&(i.push(t),this.#xn.set(t.id,e))}#Bn(t){this.removeAt(0,t,void 0,void 0,!1)}#Rn(e,i,n,s=!0){const o=this.#yn[e];return!!o&&((!s||o.group===i)&&(this.#yn.splice(e,1),this.#qn(o),o.destroy(n),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:o}),this.#Hn(o),!0))}#qn(t){const e=this.#xn.get(t.id)??this.#Un(t.position.z),i=this.#Tn[e];if(!i)return void this.#xn.delete(t.id);const n=i.findIndex(e=>e.id===t.id);n>=0&&i.splice(n,1),this.#xn.delete(t.id)}#En(t){const e=Math.max(Math.floor(t),1);if(this.#Tn.length===e)for(const t of this.#Tn)t.length=0;else this.#Tn=this.#Dn(e)}#Wn(t){const e=this.#Un(t.position.z),i=this.#xn.get(t.id);if(void 0===i)return void this.#Vn(t);if(i===e)return;const n=this.#Tn[i];if(n){const e=n.findIndex(e=>e.id===t.id);e>=0&&n.splice(e,1)}const s=this.#Tn[e];if(s){if(s.push(t),s.length>=2){const e=s[s.length-2];e&&t.id<e.id&&s.sort((t,e)=>t.id-e.id)}this.#xn.set(t.id,e)}else this.#xn.set(t.id,e)}#Gn(t){const e=new Set,i=this.#kn;for(const n of this.#yn){i&&!n.ignoresResizeRatio&&(n.position.x*=i.width,n.position.y*=i.height,n.initialPosition.x*=i.width,n.initialPosition.y*=i.height),n.ignoresResizeRatio=!1;for(const t of this.#Sn)t.particleReset?.(n);for(const e of this.#Pn){if(n.destroyed)break;e.particleUpdate?.(n,t)}n.destroyed?e.add(n):this.#mn.insert(n)}return e}#Fn(t,e){for(const i of this.#yn)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.#Cn)e.postParticleUpdate?.(i,t);this.#Wn(i)}}}class my{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,n=t.canvas,s=n.domElement;s&&(n.size.width=s.offsetWidth*i,n.size.height=s.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,n=e.move,s=n.distance,o=t.retina;o.maxSpeed=X(n.gravity.maxSpeed)*i,o.moveDrift=X(n.drift)*i,o.moveSpeed=X(n.speed)*i;const a=o.maxDistance;a.horizontal=void 0===s.horizontal?void 0:s.horizontal*i,a.vertical=void 0===s.vertical?void 0:s.vertical*i}}function wy(t){return!t.destroyed}function vy(t,e,...i){const n=new Qe(t,e);return ge(n,...i),n}var by=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;#Vt;#Qn;#Zn={value:0,factor:0};#Yn;#Xn;#Kn;#Jn;#ts;#es;#is;#ns;#ss;#os;#as;#p;#rs;#cs;constructor(e){const{dispatchCallback:i,pluginManager:n,id:s,onDestroy:o,sourceOptions:a}=e;this.#p=n,this.#Yn=i,this.#ss=o,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#rs=!1,this.#Vt=0,this.#Kn=0,this.#ns=0,this.#ts=!0,this.started=!1,this.destroyed=!1,this.#as=!0,this.#is=0,this.zLayers=100,this.pageHidden=!1,this.#cs=a,this.#es=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new my(this),this.canvas=new ly(this.#p,this),this.particles=new yy(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#os=vy(this.#p,this),this.actualOptions=vy(this.#p,this),this.#Jn=new hy(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#as&&!this.pageHidden&&wy(this)}get options(){return this.#os}get sourceOptions(){return this.#cs}addLifeTime(t){this.#ns+=t}alive(){return!this.#Kn||this.#ns<=this.#Kn}destroy(e=!0){if(wy(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.#ss(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Yn(t,{container:this,data:e})}draw(t){if(!wy(this))return;let e=t;this.#Xn=q(t=>{e&&(this.#is=void 0,e=!1),this.#ls(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const n=await i.export(t,e);if(n.supported)return n.blob}s().error(`Export plugin with type ${t} not found`)}async init(){if(!wy(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#os=vy(this.#p,this,this.#es,this.sourceOptions),this.actualOptions=vy(this.#p,this,this.#os),this.#zn(e),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:n,fpsLimit:s,smooth:o,zLayers:a}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=L(t.HdrMode,r.mode,t.HdrMode.standard),this.peakNits=r.peakNits,this.zLayers=a,this.#Kn=X(n)*p,this.#Vt=X(i)*p,this.#ns=0,this.fpsLimit=s>0?s:120,this.#rs=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await Gt(this,t.initializers.effects),this.shapeDrawers=await Gt(this,t.initializers.shapes),this.particleUpdaters=await Lt(this,t.initializers.updaters)}pause(){if(wy(this)&&(void 0!==this.#Xn&&(W(this.#Xn),this.#Xn=void 0),!this.#as)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#as=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!wy(this))return;const i=this.#as||e;if(!this.#ts||this.actualOptions.autoPlay){if(this.#as&&(this.#as=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ts=!1}async refresh(){if(wy(this))return this.stop(),this.start()}async reset(t){if(wy(this))return this.#es=t,this.#cs=t,this.#os=vy(this.#p,this,this.#es,this.sourceOptions),this.actualOptions=vy(this.#p,this,this.#os),this.refresh()}async start(){wy(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Jn.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Qn=setTimeout(()=>{i()},this.#Vt)}))}stop(){if(wy(this)&&this.started){this.#Qn&&(clearTimeout(this.#Qn),this.#Qn=void 0),this.#ts=!0,this.started=!1,this.#Jn.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.#cs=this.#os,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#zn(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))}#ls(t){try{if(!this.#rs&&void 0!==this.#is&&t<this.#is+p/this.fpsLimit)return void this.draw(!1);if(this.#is??=t,function(t,e,i=60,n=!1){t.value=e,t.factor=n?60/i:60*e/p}(this.#Zn,t-this.#is,this.fpsLimit,this.#rs),this.addLifeTime(this.#Zn.value),this.#is=t,this.#Zn.value>p)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Zn),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){s().error("error in animation loop",t)}}}});var xy=Object.freeze({__proto__:null,BackgroundMaskPluginInstance:class{layer=t.DrawLayer.BackgroundMask;#u;#hs;#ds;#us;#ps;#gs=new Set;#p;constructor(t,e){this.#p=t,this.#u=e}canvasClear(){const t=this.#u.actualOptions.backgroundMask;return!!t?.enable&&this.canvasPaint()}canvasPaint(){const{backgroundMask:t}=this.#u.actualOptions;if(!t?.enable)return!1;const e=this.#u.canvas;e.render.canvasClear();const i=t.cover;let n=!1;const s=this.#ps;if(s&&(n=!0,e.render.draw(t=>{try{t.drawImage(s,g.x,g.y,e.size.width,e.size.height)}catch{this.#fs("mask-element-draw-error","Error drawing background mask cover element onto canvas")}})),i.draw){n=!0;const t=i.draw;e.render.draw(e=>{try{t(e,{value:0,factor:1})}catch{this.#fs("mask-draw-error","Error in mask cover.draw callback")}})}return n||(this.#ds?e.render.paintImage(this.#ds.image,this.#ds.opacity):e.render.paintBase(this.#hs)),!0}destroy(){this.#ps=null,this.#gs.clear()}drawSettingsCleanup(t){this.#us&&(t.globalCompositeOperation=this.#us)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.backgroundMask;this.#us=e,t.globalCompositeOperation=i?.enable?i.composite:e}async init(){this.#gs.clear(),await this.#ys(),this.#ms()}#ys=async()=>{const t=this.#u.actualOptions,e=t.backgroundMask?.cover,i=e?.color;if(i){const t=ai(this.#p,i);if(t){const i={...t,a:e.opacity};this.#hs=mi(i,this.#u.hdr,i.a,this.#u.peakNits,this.#u.hdrMode)}}else if(e?.image){const t=e.image;await new Promise((i,n)=>{const s=wt().createElement("img");s.addEventListener("load",()=>{this.#ds={image:s,opacity:e.opacity},i()}),s.addEventListener("error",()=>{n(new Error("Error loading image"))}),s.src=t})}};#fs=(t,e)=>{this.#gs.has(t)||(this.#gs.add(t),s().warning(`[tsParticles BackgroundMask] ${e}`))};#ms=()=>{const t=this.#u.actualOptions.backgroundMask?.cover;if(this.#ps=null,t?.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#ps=e:e?this.#fs("mask-element-not-supported",`Mask cover element "${t.element}" matched a non-drawable element (expected canvas, video, or img)`):this.#fs("mask-element-not-found",`Mask cover element selector "${t.element}" not found in the DOM`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#ps=t.element)}}});function Sy(t,e,i,n,s,o,a){!function(t,e){const i=t.options,n=i.move.path;if(!n.enable)return;const s=t.pathDelay??0;if(t.lastPathTime<=s)return void(t.lastPathTime+=e.value);const o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);n.clamp&&(t.velocity.x=Q(t.velocity.x,-1,1),t.velocity.y=Q(t.velocity.y,-1,1));t.lastPathTime-=s}(t,a);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;s&&i&&(t.velocity.x+=s*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*a.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const h=t.velocity.mult(i);r?.enable&&n>0&&(!r.inverse&&h.y>=0&&h.y>=n||r.inverse&&h.y<=0&&h.y<=-n)&&(h.y=c*n,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(o);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*o,p.y+=Math.cos(p.y*Math.sin(p.x))*o)}var Py=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,n=i.gravity,s=i.path;if(e.moveDecay=1-X(i.decay),e.pathDelay=X(s.delay.value)*p,s.generator){let t=this.pathGenerators.get(s.generator);t||(t=this.availablePathGenerators.get(s.generator),t&&(this.pathGenerators.set(s.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:n.enable,acceleration:X(n.acceleration),inverse:n.inverse},function(e,i){const n=i.options.move.spin;if(!n.enable)return;const s=n.position??{x:50,y:50},o={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},a=nt(i.getPosition(),o),r=X(n.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:o,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:$()*w,radius:a,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const n=e.options.move;if(!n.enable)return;const s=this.#u,o=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),a=s.retina.reduceFactor,r=e.retina.moveSpeed,c=e.retina.moveDrift,l=e.size.max,h=r*(n.size?e.getRadius()/l:1)*o*(i.factor||1)*u,d=e.retina.maxSpeed;n.spin.enable?function(e,i,n,s){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,a={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*a.x(i.spin.angle)*s,i.position.y=i.spin.center.y+i.spin.radius*a.y(i.spin.angle)*s,i.spin.radius+=i.spin.acceleration*s;const r=Math.max(e.canvas.size.width,e.canvas.size.height),c=r*u;i.spin.radius>c?(i.spin.radius=c,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*n*(1-i.spin.radius/r)}(s,e,h,a):Sy(e,n,h,d,c,a,i),function(t){const e=t.initialPosition,{dx:i,dy:n}=et(e,t.position),s=Math.abs(i),o=Math.abs(n),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(!r&&!c)return;if((r&&s>=r||c&&o>=c)&&!t.misplaced)t.misplaced=!!r&&s>r||!!c&&o>c,r&&(t.velocity.x=t.velocity.y*u-t.velocity.x),c&&(t.velocity.y=t.velocity.x*u-t.velocity.y);else if((!r||s<r)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,n=t.velocity;r&&(i.x<e.x&&n.x<0||i.x>e.x&&n.x>0)&&(n.x*=-$()),c&&(i.y<e.y&&n.y<0||i.y>e.y&&n.y>0)&&(n.y*=-$())}}(e)}preInit(){return this.#ws()}redrawInit(){return this.#ws()}update(){for(const t of this.pathGenerators.values())t.update()}async#ws(){const t=this.#p;if(t.initializers.pathGenerators){this.availablePathGenerators=await Gt(this.#u,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});function My(t,e,i,n,s,o){const{height:a,width:r}=e,c=a*r,l=function(t){for(let e=t.length-1;e>=0;e--){const i=Math.floor($()*e),n=t[e],s=t[i];s!==n&&(void 0!==s&&void 0!==n&&(t[e]=s,t[i]=n))}return t}(Cy(c)),h=Math.min(c,t.actualOptions.particles.number.value),p=t.canvas.size;let g=0;const f=p.width*i.x/d-r*n*u,y=p.height*i.y/d-a*n*u;for(;g<h&&l.length;){const i=0,a=l.pop()??i,c={x:a%r,y:Math.floor(a/r)},h=e.pixels[c.y];if(!h)continue;const d=h[c.x];if(!d)continue;if(!o(d))continue;const u={x:c.x*n+f,y:c.y*n+y},p={};s.color&&(p.paint={fill:{color:{value:d},enable:!0}}),s.opacity&&(p.opacity={value:d.a}),t.particles.addParticle(u,p),g++}}const Cy=t=>[...Array(t).keys()];var _y=Object.freeze({__proto__:null,CanvasMaskPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.canvasMask;if(!e?.enable)return;let i={pixels:[],height:0,width:0};const n=e.pixels.offset;if(e.image){const s=e.image.src;if(!s)return;i=await Co(s,n,t.canvas.render.settings)}else if(e.text){const s=e.text,o=_o(s,n,s.fill,t.canvas.render.settings);if(H(o))return;i=o}else if(e.element??e.selector){const s=e.element??(e.selector&&wt().querySelector(e.selector));if(!s)return;const o=s.getContext("2d",t.canvas.render.settings);if(!o)return;i=Mo(o,s,n)}My(t,i,e.position,e.scale,e.override,e.pixels.filter)}}});class ky{#vs=!0;#bs;#u;#zi;#xs;#Ss;constructor(t,e){this.#u=t,this.#bs=[],this.#xs=e,this.#Ss=new Map,this.#zi={mouseDown:()=>{this.#Ps()},mouseLeave:()=>{this.#Ms()},mouseMove:t=>{this.#Cs(t)},mouseUp:t=>{this.#_s(t)},touchStart:t=>{this.#ks(t)},touchMove:t=>{this.#Cs(t)},touchEnd:t=>{this.#Os(t)},touchCancel:t=>{this.#Os(t)},touchEndClick:t=>{this.#Ts(t)},visibilityChange:()=>{this.#Gi()}}}addListeners(){this.#Hi(!0)}init(){this.#bs.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#bs.push(t)}removeListeners(){this.#Hi(!1)}#Ds(t){const e=this.#u,i=this.#xs,n=e.actualOptions;if(this.#vs){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const s=n.interactivity?.events.onClick;if(!s?.mode)return;Tt(s.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#Ms()},500)}#Gi(){this.#Ms()}#As(t){const e=this.#zi,i=this.#u,n=this.#xs,s=i.actualOptions,o=n.interactivityData.element;if(!o)return;const a=o,r=i.canvas;r.setPointerEvents(a===r.domElement?"initial":"none"),Rt(o,Hs,e.mouseMove,t),Rt(o,Ns,e.touchStart,t),Rt(o,Us,e.touchMove,t),Rt(o,Bs,s.interactivity?.events.onClick.enable?e.touchEndClick:e.touchEnd,t),Rt(o,"pointerup",e.mouseUp,t),Rt(o,"pointerdown",e.mouseDown,t),Rt(o,Fs,e.mouseLeave,t),Rt(o,$s,e.touchCancel,t)}#Hi(t){const e=this.#zi,i=this.#u,n=this.#xs,s=i.actualOptions,o=s.interactivity?.detectsOn,a=i.canvas.domElement;o===Ts.window?n.interactivityData.element=wt():o===Ts.parent&&a?n.interactivityData.element=a.parentElement??a.parentNode:n.interactivityData.element=a,this.#As(t),Rt(document,h,e.visibilityChange,t,!1)}#Ps(){const{interactivityData:t}=this.#xs,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#_s(t){const e=this.#u,i=this.#xs,n=e.actualOptions,{mouse:s}=i.interactivityData;s.inside=!0;const o=s.position;if(o&&n.interactivity?.events.onClick.enable){let e=!1;for(const t of this.#bs)if(e=t.clickPositionValid?.(o)??!1,e)break;e||this.#Ds(t)}s.clicking=!1}#Ms(){const{interactivityData:t}=this.#xs,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Fs,e.inside=!1,e.clicking=!1}#Cs(t){const e=this.#u,i=this.#xs,n=e.actualOptions,s=i.interactivityData,o=e.canvas.domElement;if(!s.element)return;let a;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this.#vs=!0;const e=t;if(s.element===wt()){if(o){const t=o.getBoundingClientRect();a={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(n.interactivity?.detectsOn===Ts.parent){const t=e.target,i=e.currentTarget;if(o){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=o.getBoundingClientRect();a={x:e.offsetX+2*n.left-(s.left+r.left),y:e.offsetY+2*n.top-(s.top+r.top)}}else a={x:e.offsetX,y:e.offsetY}}else e.target===o&&(a={x:e.offsetX,y:e.offsetY})}else if(this.#vs="touchmove"!==t.type,o){const e=t,i=e.touches[e.touches.length-1],n=o.getBoundingClientRect();if(!i)return;a={x:i.clientX-n.left,y:i.clientY-n.top}}const r=e.retina.pixelRatio;a&&(a.x*=r,a.y*=r),s.mouse.position=a,s.status=Hs}#Os(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ss.delete(t.identifier);this.#Ms()}#Ts(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ss.delete(t.identifier);this.#_s(t)}#ks(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ss.set(t.identifier,performance.now());this.#Cs(t);const{mouse:n}=this.#xs.interactivityData;n.clicking=!0,n.downPosition=n.position}}class Oy{interactivityData;interactors;#Vs;#u;#Jn;#Es;#Is;#zs;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactors=[],this.#Es=[],this.#zs=[],this.#Vs=new Map,this.#Jn=new ky(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Is=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Rs(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const n=i.element;if(!n)return;const s=(i,n,s)=>{if(e.destroyed)return;const o=e.retina.pixelRatio,a={x:n.x*o,y:n.y*o},r=e.particles.grid.queryCircle(a,s*o);t(i,r)};let o=!1,a=!1;this.#Vs.set("click",t=>{if(e.destroyed)return;const i=t,n={x:i.offsetX,y:i.offsetY};s(t,n,1)}),this.#Vs.set(Ns,()=>{e.destroyed||(o=!0,a=!1)}),this.#Vs.set(Us,()=>{e.destroyed||(a=!0)}),this.#Vs.set(Bs,t=>{if(!e.destroyed){if(o&&!a){const i=t,n=i.touches[i.touches.length-1];if(!n)return;const o=e.canvas.domElement,a=o?o.getBoundingClientRect():void 0,r={x:n.clientX-(a?a.left:0),y:n.clientY-(a?a.top:0)};s(t,r,Math.max(n.radiusX,n.radiusY))}o=!1,a=!1}}),this.#Vs.set($s,()=>{e.destroyed||(o=!1,a=!1)});for(const[t,e]of this.#Vs)n.addEventListener(t,e)}addListeners(){this.#Jn.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Vs)e.element?.removeEventListener(t,i);this.#Vs.clear()}}externalInteract(t){for(const e of this.#Es){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.#Es)i.handleClickMode?.(t,e)}init(){this.#Jn.init();for(const t of this.interactors){switch(t.type){case Ds.external:this.#Es.push(t);break;case Ds.particles:this.#zs.push(t)}t.init()}}async initInteractors(){const t=this.#p;t.initializers.interactors&&(this.interactors=await Lt(this.#u,t.initializers.interactors),this.#Es=[],this.#zs=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Es)i.clear(t,e);for(const n of this.#zs)n.isEnabled(t,i)&&n.interact(t,i,e)}removeListeners(){this.#Jn.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Es)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#zs)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Is&&this.#Is.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Is&&this.#Is.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.cellSize=t*e.retina.pixelRatio}#Rs(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 Ty=Object.freeze({__proto__:null,InteractivityPluginInstance:class{#u;constructor(t,e){e.addClickHandler=t=>{e.interactionManager?.addClickHandler(t)},e.interactionManager=new Oy(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,n=new zs(i);n.load(i.actualOptions.interactivity),n.load(e.options.interactivity),e.interactivity=n}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()}}});const Dy=new Map;var Ay=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Dy.set(t,e)}getShapeGenerator(t){return Dy.get(t)}getSupportedShapeGenerators(){return Dy.keys()}}});var Vy=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ls;#p;constructor(t){this.#Ls=new Map,this.#p=t}async addEmitter(t,e,i){return this.addEmitters(t,[{options:e,position:i}]).then(t=>t[0])}async addEmitters(t,e){const{EmitterInstance:i}=await Promise.resolve().then(function(){return fm}),n=[];for(const{options:s,position:o}of e){const e=new io;e.load(s);const a=new i(this.#p,t,e=>{this.removeEmitter(t,e)},e,o);await a.init(),this.getArray(t).push(a),n.push(a)}return n}clear(t){this.initContainer(t),this.#Ls.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ls.get(t);return e||(e=[],this.#Ls.set(t,e)),e}initContainer(t){this.#Ls.has(t)||(this.#Ls.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||I(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.addEmitters=async e=>this.addEmitters(t,e),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Ey=Object.freeze({__proto__:null,ExportImagePluginInstance:class{#u;constructor(t){this.#u=t}async export(t,e){const i={supported:!1};if("image"===t)i.supported=!0,i.blob=await this.#Gs(e);return i}async#Gs(t){const e=this.#u.canvas.domElement;if(e)return new Promise(i=>{e.toBlob(t=>{i(t||void 0)},t.type??"image/png",t.quality)})}}});var Iy=Object.freeze({__proto__:null,ExportJSONPluginInstance:class{#u;constructor(t){this.#u=t}async export(t){const e={supported:!1};if("json"===t)e.supported=!0,e.blob=await this.#Fs();return e}#Fs=async()=>{const t=JSON.stringify(this.#u.actualOptions,(t,e)=>{if(!t.startsWith("_"))return e},2);return Promise.resolve(new Blob([t],{type:"application/json"}))}}});const zy=["webm","ogg","mp4","x-matroska"],Ry=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];var Ly=Object.freeze({__proto__:null,ExportVideoPluginInstance:class{#u;#Hs=[];constructor(t){this.#u=t,this.#Hs=function(){const t=t=>MediaRecorder.isTypeSupported(t),e=[];return zy.forEach(i=>{const n=`video/${i}`;Ry.forEach(i=>{[`${n};codecs=${i}`,`${n};codecs=${i.toUpperCase()}`].forEach(i=>{t(i)&&e.push(i)})}),t(n)&&e.push(n)}),e}()}async export(t,e){const i={supported:!1};if("video"===t)i.supported=!0,i.blob=await this.#Ns(e);return i}async#Ns(t){const e=this.#u.canvas.domElement;if(e)return new Promise(i=>{const n=e.captureStream(t.fps??this.#u.actualOptions.fpsLimit),s=t.mimeType??this.#Hs[0],o=new MediaRecorder(n,{mimeType:s}),a=[];o.addEventListener("dataavailable",t=>{a.push(t.data)}),o.addEventListener("stop",()=>{i(new Blob(a,{type:s}))}),o.start(),setTimeout(()=>{o.stop()},t.duration??5e3)})}}});var Gy=Object.freeze({__proto__:null,AbsorbersInstancesManager:class{#Ls;#p;constructor(t){this.#p=t,this.#Ls=new Map}async addAbsorber(t,e,i){return this.addAbsorbers(t,[{options:e,position:i}]).then(t=>t[0])}async addAbsorbers(t,e){const{AbsorberInstance:i}=await Promise.resolve().then(function(){return mm}),n=[];for(const{options:s,position:o}of e){const e=new i(this.#p,t,s,o);this.getArray(t).push(e),n.push(e)}return n}clear(t){this.initContainer(t),this.#Ls.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ls.get(t);return e||(e=[],this.#Ls.set(t,e)),e}initContainer(t){this.#Ls.has(t)||(this.#Ls.set(t,[]),t.getAbsorber??=e=>{const i=this.getArray(t);return void 0===e||I(e)?i[e??0]:i.find(t=>t.name===e)},t.addAbsorber??=(e,i)=>this.addAbsorber(t,e,i),t.addAbsorbers??=e=>this.addAbsorbers(t,e))}removeAbsorber(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}splitAbsorber(t,e){if(!e.options.split.enable)return;const{size:i}=e,n=e.options.split.quantity,s=e.position.x,o=e.position.y;if(this.removeAbsorber(t,e),n<=0)return;const a=.9*i/n;for(let e=0;e<n;e++){const e=$()*w;t.particles.addParticle({x:s+Math.cos(e)*i,y:o+Math.sin(e)*i},{size:{value:a}})}}}});var Fy=Object.freeze({__proto__:null,AbsorbersPluginInstance:class{#u;#W;constructor(t,e){this.#u=t,this.#W=e,this.#W.initContainer(t)}draw(t){for(const e of this.#W.getArray(this.#u))e.draw(t)}async init(){const t=Tt(this.#u.actualOptions.absorbers,async t=>{await this.#W.addAbsorber(this.#u,t)});F(t)?await Promise.all(t):await t}particleUpdate(t,e){const i=this.#W.getArray(this.#u),n=t;if(!i.length)return;const s=n.getPosition(),o=A.origin,a=i.some(t=>t.orbits);for(const t of i)o.addTo(t.getForce(s));const r=a?this.#Bs(i,s):void 0;for(const s of i)if(s.attract(n,e),t.destroyed)return;n.needsNewPosition?this.#Us(n):r?this.#$s(n,e,r,o):n.velocity.addTo(o)}resize(){for(const t of this.#W.getArray(this.#u))t.resize()}stop(){this.#W.clear(this.#u)}update(t){const e=this.#W.getArray(this.#u);for(const i of e)i.update(t);for(const t of e)if(t.shouldSplit()){this.#W.splitAbsorber(this.#u,t);break}}#Bs(t,e){const i=A.origin;let n=0,s=0;for(const o of t){if(!o.orbits)continue;const t=o.position,a=o.getAttraction(e);n+=a,i.x+=t.x*a,i.y+=t.y*a,s+=o.size*a}return n<=0?{center:i,size:0}:(i.x/=n,i.y/=n,{center:i,size:s/n})}#Us(t){t.position.setTo(lt({size:this.#u.canvas.size})),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.absorberOrbitDirection=void 0,t.needsNewPosition=!1}#$s(e,i,n,s){const o=this.#u,{width:a,height:r}=o.canvas.size;e.absorberOrbitDirection??=e.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise;const c=e.absorberOrbitDirection===t.RotateDirection.clockwise?1:-1;if(void 0===e.absorberOrbit){const t=e.getPosition(),i=t.x-n.center.x,s=t.y-n.center.y;e.absorberOrbit=A.create(i,c*s)}else if(e.absorberOrbit.length<=n.size)return void this.#Us(e);const l=e.absorberOrbit.length,h=e.absorberOrbit.angle,d=Math.cos(h),p=c*Math.sin(h);e.velocity.setTo(A.origin);const g=e.options.move.size?e.getRadius()/e.size.max:1,f=e.retina.moveSpeed*g*(i.factor||1)*u,y=n.center.x+l*d,m=n.center.y+l*p;e.position.setTo({x:Q(y,0,a),y:Q(m,0,r)});const w=s.x*d+s.y*p,v=s.x*-p+s.y*d;e.absorberOrbit.length=Math.max(0,l+w),e.absorberOrbit.angle+=(f+v*o.retina.reduceFactor)*(1/360)}}});var Hy=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#us;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.#us&&(t.globalCompositeOperation=this.#us)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#us=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});var Ny=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#s;constructor(t,e){this.#s=t,this.#u=e}destroy(){this.#s.images?.delete(this.#u)}}});var By=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#js(t,e,i)}#js(t,e,i){const n=t.options.collisions;if(!n?.enable)return!1;const s=n.overlap;if(s.enable)return!1;const o=s.retries;if(o>=0&&i>o)throw new Error(gt(lh));return!!this.#u.particles.find(i=>nt(e,i.position)<t.getRadius()+i.getRadius())}}});function Uy(t,e){const i=(n=t.map(t=>t.id),[...n].sort((t,e)=>t-e).join("_"));var n;let s=e.get(i);return void 0===s&&(s=$(),e.set(i,s)),s}var $y=Object.freeze({__proto__:null,LinkInstance:class{#qs=new Map;#u;#Ws;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Ws={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:n}=e;if(!i?.length||!n.links)return;const s=n.links,o=e.retina.linksWidth??0,a=e.getPosition(),r=e.options.twinkle?.links,c=s.triangles.enable,l=c?new Set(i.map(t=>t.destination.id)):null,h=t.globalAlpha;let d="",p=-1,f=-1,y=!1;const m=()=>{y&&(t.stroke(),y=!1)};for(const h of i){if(s.frequency<1&&this.#Qs(e,h.destination)>s.frequency)continue;const i=h.destination.getPosition();if(c&&!h.isWarped&&l&&(m(),this.#Zs(n,e,h,l,a,i,t)),h.opacity<=0||o<=0)continue;if(!s.enable)continue;let w=h.opacity,v=h.color;const b=r?.enable&&$()<r.frequency?ai(this.#p,r.color):void 0;if(r&&b&&(v=b,w=X(r.opacity)),!v){const t=void 0!==s.id?this.#u.particles.linksColors.get(s.id):this.#u.particles.linksColor;v=bi(e,h.destination,t)}if(!v)continue;const x=this.#Ys(v);if(x===d&&o===p&&w===f||(m(),t.strokeStyle=x,t.lineWidth=o,t.globalAlpha=w,d=x,p=o,f=w,t.beginPath(),y=!0),h.isWarped){const e=this.#u.canvas.size,n=i.x-a.x,s=i.y-a.y;let o=g.x,r=g.y;Math.abs(n)>e.width*u&&(o=n>0?-e.width:e.width),Math.abs(s)>e.height*u&&(r=s>0?-e.height:e.height),t.moveTo(a.x,a.y),t.lineTo(i.x+o,i.y+r),t.moveTo(a.x-o,a.y-r),t.lineTo(i.x,i.y)}else t.moveTo(a.x,a.y),t.lineTo(i.x,i.y)}m(),t.globalAlpha=h}init(){return this.#Ws.links.clear(),this.#Ws.triangles.clear(),this.#qs.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#Zs(t,e,i,n,s,o,a){const r=i.destination,c=t.links?.triangles;if(!c?.enable||!r.options.links?.triangles.enable)return;const l=r.links;if(l?.length)for(const h of l){if(h.isWarped||this.#Qs(r,h.destination)>r.options.links.frequency||!n.has(h.destination.id))continue;const l=h.destination;if(this.#Xs(e,r,l)>(t.links?.triangles.frequency??0))continue;const d=c.opacity??(i.opacity+h.opacity)*u,p=ai(this.#p,c.color)??i.color;if(!p||d<=0)continue;const g=l.getPosition();a.save(),a.fillStyle=this.#Ys(p),a.globalAlpha=d,a.beginPath(),a.moveTo(s.x,s.y),a.lineTo(o.x,o.y),a.lineTo(g.x,g.y),a.closePath(),a.fill(),a.restore()}}#Ys(t){const e=`${t.r},${t.g},${t.b}-${this.#u.hdr}-${this.#u.peakNits}-${this.#u.hdrMode}`;let i=this.#qs.get(e);return i||(i=mi(t,this.#u.hdr,void 0,this.#u.peakNits,this.#u.hdrMode),this.#qs.set(e,i)),i}#Qs(t,e){return Uy([t,e],this.#Ws.links)}#Xs(t,e,i){return Uy([t,e,i],this.#Ws.triangles)}}});class jy{#u;constructor(t){this.#u=t}startInfection(t,e){const i=this.#u.actualOptions.infection,{infection:n}=t;if(!i||!n)return;e>i.stages.length||e<0||(n.delay=0,n.delayStage=e)}updateInfection(t,e){const i=this.#u.actualOptions.infection,{infection:n}=t;if(!i||!n)return;const s=i.stages,o=s.length;if(void 0!==n.delay&&void 0!==n.delayStage){const t=n.delayStage;if(t>o||t<0)return;n.delay>=i.delay*p?(n.stage=t,n.time=0,delete n.delay,delete n.delayStage):n.delay+=e}else delete n.delay,delete n.delayStage;if(void 0!==n.stage&&void 0!==n.time){const i=s[n.stage];void 0!==i?.duration&&i.duration>=0&&n.time>i.duration*p?this.#Ks(t):n.time+=e}else delete n.stage,delete n.time}updateInfectionStage(t,e){const i=this.#u.actualOptions,{infection:n}=t;if(!i.infection||!n)return;e>i.infection.stages.length||e<0||void 0!==n.stage&&n.stage>e||(n.stage=e,n.time=0)}#Ks(t){const e=this.#u.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const n=e.stages.length;n<=0||void 0===i.stage||(i.time=0,n<=++i.stage&&(e.cure?(delete i.stage,delete i.time):(i.stage=0,i.time=0)))}}var qy=Object.freeze({__proto__:null,InfectionPluginInstance:class{#u;constructor(t){this.#u=t,this.#u.infecter=new jy(this.#u)}particleFillColor(t){const e=this.#u.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,n=e.infection.stages;return void 0===i?void 0:n[i]?.color}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this.#u.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=St(this.#u.particles.filter(t=>{const e=t;return e.infection??={},void 0===e.infection.stage}));t&&this.#u.infecter?.startInfection(t,0)}}}});var Wy=Object.freeze({__proto__:null,ManualParticlesPluginInstance:class{#u;constructor(t){this.#u=t}particlesDensityCount(){return this.#u.actualOptions.manualParticles?.length??0}particlesInitialization(){const t=this.#u,e=t.actualOptions;return e.manualParticles?.forEach(e=>t.particles.addParticle(e.position?At(e.position,t.canvas.size):void 0,e.options)),!1}}});var Qy=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=vt("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Js(i);i.addEventListener("change",()=>{(async()=>{this.#Js(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Js(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});var Zy=Object.freeze({__proto__:null,PoissonDiscPluginInstance:class{poissonDisc;redrawTimeout;#u;#to;constructor(t){this.#u=t,this.#to=0}async init(){await this.#eo()}particlePosition(t){const e=this.#u.actualOptions.poisson;if(this.poissonDisc&&e?.enable&&!(this.#to>=this.poissonDisc.points.length))return t??this.poissonDisc.points[this.#to++]?.position}resize(){const t=this.#u,e=t.actualOptions.poisson;if(!e?.enable)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout(()=>{(async()=>{this.#u.destroyed||(await this.#eo(),await t.particles.redraw())})()},250)}stop(){delete this.poissonDisc}async#eo(){const t=this.#u,e=t.actualOptions.poisson,i=t.actualOptions.particles,n=t.canvas.size,s=t.retina.pixelRatio;if(!e?.enable)return;this.#to=0;const{PoissonDisc:o}=await Promise.resolve().then(function(){return wm});this.poissonDisc=new o(n,e.radius?e.radius*s:Math.max(J(i["size.value"]??1)*s,Math.sqrt(n.width*n.height/i.number.value)),e.retries,e.dimensions);e.steps>0?this.poissonDisc.steps(e.steps):await this.poissonDisc.run()}}});!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,n,s,o,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=n,this._y1=s,this._x2=o,this._y2=a},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter}  ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,n,s,o,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=n,this._y1=s,this._x2=o,this._y2=a},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=n,this._y1=s},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=n,this._y1=s},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,n,s,o,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=n,this._r2=s,this._angle=o,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,n,s,o,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=n,this._r2=s,this._angle=o,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=n,this._y2=s},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=n,this._y2=s},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,n,s,o){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,n,s,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,n,s,o){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,n,s,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,n,s,o,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,n,s,o,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,n,s,o,a){return new window.SVGPathSegArcRel(void 0,t,e,i,n,s,o,a)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach(function(t){"d"==t.attributeName&&(e=!0)}),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(t){t._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",i=!0;return t.forEach(function(t){i?(i=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`}),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t?.length)return[];const e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};const n=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};n.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},n.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},n.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},n.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},n.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},n.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},n.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},n.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},n.prototype._parseNumber=function(){let t=0,e=0,i=1,n=0,s=1,o=1;const a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,s=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const r=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r){let t=this._currentIndex-1,i=1;for(;t>=r;)e+=i*(this._string.charAt(t--)-"0"),i*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,n+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let c=e+n;return c*=s,t&&(c*=Math.pow(10,o*t)),a!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),c):void 0},n.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},n.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let i,n=this._pathSegTypeFromChar(t);if(n==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(n=this._nextCommandHelper(t,this._previousCommand),n==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=n,n){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};const s=new i,o=new n(t);if(!o.initialCommandIsMoveTo())return[];for(;o.hasMoreData();){const t=o.parseSegment();if(!t)return[];s.appendSegment(t)}return s.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}();const Yy=0,Xy=1;function Ky(t,e,i,n,s=!1,o,a){const r=ai(t,n.color);if(!r)return;const c=i[0];if(c){e.beginPath(),e.moveTo(c.x,c.y);for(const t of i)e.lineTo(t.x,t.y);e.closePath(),e.strokeStyle=mi(r,s,void 0,o,a),e.lineWidth=n.width,e.stroke()}}function Jy(t,e,i,n,s,o=!1,a,r){e.setTransform(f.a,f.b,f.c,f.d,s.x,s.y);const c=ai(t,n.color);c&&(e.strokeStyle=mi(c,o,n.opacity,a,r),e.lineWidth=n.width,e.stroke(i),e.resetTransform())}function tm(t,e,i){const{dx:n,dy:s}=et(i,t),{dx:o,dy:a}=et(e,t),r=(n*o+s*a)/(o**2+a**2),c={x:t.x+o*r,y:t.y+a*r,isOnSegment:r>=Yy&&r<=Xy};return r<Yy?(c.x=t.x,c.y=t.y):r>Xy&&(c.x=e.x,c.y=e.y),c}function em(t,e,i){const{dx:n,dy:s}=et(t,e),o=Math.atan2(s,n),a=A.create(Math.sin(o),-Math.cos(o)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}var im=Object.freeze({__proto__:null,PolygonMaskInstance:class{dimension;offset;paths;raw;redrawTimeout;#u;#io;#p;#Re;constructor(t,e){this.#u=e,this.#p=t,this.dimension={height:0,width:0},this.#io=0,this.#Re=1}clickPositionValid(t){const e=this.#u.actualOptions.polygon;return!!e?.enable&&e.type!==bg.none&&e.type!==bg.inline&&this.#no(t)}draw(t){if(!this.paths?.length)return;const e=this.#u.actualOptions.polygon;if(!e?.enable)return;const i=e.draw;if(!i.enable)return;const n=this.raw;for(const e of this.paths){const s=e.path2d;s&&this.offset?Jy(this.#p,t,s,i.stroke,this.offset,this.#u.hdr,this.#u.peakNits,this.#u.hdrMode):n&&Ky(this.#p,t,n,i.stroke,this.#u.hdr,this.#u.peakNits,this.#u.hdrMode)}}async init(){const t=this.#u,e=t.actualOptions.polygon,i=t.retina.pixelRatio;e&&(this.#io=e.move.radius*i,this.#Re=e.scale*i,e.enable&&await this.#so())}particleBounce(t,e,i){return this.#oo(t,e,i)}particlePosition(t){const e=this.#u.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return _t({},t??this.#ao())}particlesInitialization(){const t=this.#u.actualOptions.polygon;return!(!t?.enable||t.type!==bg.inline||t.inline.arrangement!==wg.onePerPoint&&t.inline.arrangement!==wg.perPoint)&&(this.#ro(),!0)}resize(){const t=this.#u,e=t.actualOptions.polygon;if(!e?.enable||e.type===bg.none)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout(()=>{(async()=>{await this.#so(!0),await t.particles.redraw()})()},250)}stop(){delete this.raw,delete this.paths}#no(t){const e=this.#u,i=e.actualOptions.polygon;if(!i?.enable||i.type===bg.none||i.type===bg.inline)return!0;if(!this.raw)throw new Error(gt(pg));const n=e.canvas.size,s=t?.x??$()*n.width,o=t?.y??$()*n.height;let a=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const i=this.raw[t],n=this.raw[e];if(!i||!n)continue;i.y>o!=n.y>o&&s<(n.x-i.x)*(o-i.y)/(n.y-i.y)+i.x&&(a=!a)}return i.type===bg.inside?a:!a}#co(){if(this.#u.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element.getAttribute("d");if(e){const i=new Path2D(e),n=wt().createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),s=new Path2D,o=n.scale(this.#Re);s.addPath(i,o),t.path2d=s}else delete t.path2d;if(t.path2d??!this.raw)continue;t.path2d=new Path2D;const i=0,n=this.raw[i];n&&(t.path2d.moveTo(n.x,n.y),this.raw.forEach((e,n)=>{n>i&&t.path2d?.lineTo(e.x,e.y)}),t.path2d.closePath())}}async#lo(t,e){const i=this.#u.actualOptions.polygon;if(!i)return;const n=t??i.url,s=e??!1;if(!n||void 0!==this.paths&&!s)return this.raw;const o=await fetch(n);if(!o.ok)throw new Error(gt(gg));return this.#ho(await o.text(),e)}#ro(){if(this.raw)for(const t of this.raw)this.#u.particles.addParticle({x:t.x,y:t.y})}#do(t){const e=this.#u.actualOptions;if(!e.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(gt(fg));let i,n=0;const s=this.paths.reduce((t,e)=>t+e.length,0)/e.particles.number.value;for(const e of this.paths){const o=s*t-n;if(o<=e.length){i=e.element.getPointAtLength(o);break}n+=e.length}const o=this.#Re;return{x:(i?.x??g.x)*o+(this.offset?.x??g.x),y:(i?.y??g.y)*o+(this.offset?.y??g.y)}}#uo(t){if(!this.raw?.length)throw new Error(gt(fg));const e=this.raw[t%this.raw.length];if(e)return{x:e.x,y:e.y}}#po(){if(!this.raw?.length)throw new Error(gt(fg));const t=St(this.raw);if(t)return{x:t.x,y:t.y}}#go(){if(!this.#u.actualOptions.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(gt(fg));const t=St(this.paths);if(!t)return;const e=Math.floor($()*t.length)+1,i=t.element.getPointAtLength(e),n=this.#Re;return{x:i.x*n+(this.offset?.x??g.x),y:i.y*n+(this.offset?.y??g.y)}}async#so(t){const e=this.#u.actualOptions.polygon;if(e){if(e.url)this.raw=await this.#lo(e.url,t);else if(e.data){const i=e.data;let n;if(E(i))n=i;else{const t=t=>`<path d="${t}" />`,e=F(i.path)?i.path.map(t).join(""):t(i.path);n=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${i.size.width.toString()}" height="${i.size.height.toString()}">${e}</svg>`}this.raw=this.#ho(n,t)}this.#co(),this.#u.dispatchEvent("polygonMaskLoaded")}}#ho(t,e){const i=e??!1;if(void 0!==this.paths&&!i)return this.raw;const n=this.#u,s=n.actualOptions.polygon;if(!s)return;const o=(new DOMParser).parseFromString(t,"image/svg+xml"),a=o.getElementsByTagName("svg")[0];if(!a)return;let r=a.getElementsByTagName("path");r.length||(r=o.getElementsByTagName("path")),this.paths=[];for(let t=0;t<r.length;t++){const e=r.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const c=this.#Re;this.dimension.width=Number.parseFloat(a.getAttribute("width")??"0")*c,this.dimension.height=Number.parseFloat(a.getAttribute("height")??"0")*c;const l=s.position??{x:50,y:50},h=n.canvas.size;return this.offset={x:h.width*l.x/d-this.dimension.width*u,y:h.height*l.y/d-this.dimension.height*u},function(t,e,i){const n=[];for(const s of t){const t=s.element.pathSegList,o=t?.numberOfItems??0,a={x:0,y:0};for(let s=0;s<o;s++){const o=t?.getItem(s),r=globalThis.SVGPathSeg;switch(o?.pathSegType){case r.PATHSEG_MOVETO_ABS:case r.PATHSEG_LINETO_ABS:case r.PATHSEG_CURVETO_CUBIC_ABS:case r.PATHSEG_CURVETO_QUADRATIC_ABS:case r.PATHSEG_ARC_ABS:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=o;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=o.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=o.y;break;case r.PATHSEG_LINETO_REL:case r.PATHSEG_MOVETO_REL:case r.PATHSEG_CURVETO_CUBIC_REL:case r.PATHSEG_CURVETO_QUADRATIC_REL:case r.PATHSEG_ARC_REL:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=o;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=o.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=o.y;break;case r.PATHSEG_UNKNOWN:case r.PATHSEG_CLOSEPATH:default:continue}n.push({x:a.x*e+i.x,y:a.y*e+i.y})}}return n}(this.paths,c,this.offset)}#oo(e,i,n){const s=this.#u.actualOptions.polygon;if(!this.raw||!s?.enable||n!==t.OutModeDirection.top)return!1;if(s.type===bg.inside||s.type===bg.outside){let t,i,n;const s=e.getPosition(),o=e.getRadius(),a=1;for(let r=0,c=this.raw.length-a;r<this.raw.length;c=r++){const a=this.raw[r],l=this.raw[c];if(!a||!l)continue;t=tm(a,l,s);const h=et(s,t);if([i,n]=[h.dx,h.dy],h.distance<o)return em(a,l,e.velocity),!0}if(t&&void 0!==i&&void 0!==n&&!this.#no(s)){const i={x:1,y:1},n=2*o,a=-1;return s.x>=t.x&&(i.x=-1),s.y>=t.y&&(i.y=-1),e.position.x=t.x+n*i.x,e.position.y=t.y+n*i.y,e.velocity.mult(a),!0}}else if(s.type===bg.inline){const t=nt(e.initialPosition,e.getPosition()),{velocity:i}=e;if(t>this.#io)return i.x=i.y*u-i.x,i.y=i.x*u-i.y,!0}return!1}#ao(){const t=this.#u,e=t.actualOptions.polygon;if(!e)return;let i;if(e.type===bg.inline)switch(e.inline.arrangement){case wg.randomPoint:i=this.#po();break;case wg.randomLength:i=this.#go();break;case wg.equidistant:i=this.#do(t.particles.count);break;case wg.onePerPoint:case wg.perPoint:default:i=this.#uo(t.particles.count)}else{const e=t.canvas.size;i={x:$()*e.width,y:$()*e.height}}return this.#no(i)?i:this.#ao()}}});var nm,sm,om=Object.freeze({__proto__:null,ResponsivePluginInstance:class{#u;constructor(t){this.#u=t}updateActualOptions(){const t=this.#u;t.actualOptions.responsive=[];const e=t.actualOptions.setResponsive?.(t.canvas.size.width,t.retina.pixelRatio,t.options);return t.responsiveMaxWidth!==e&&(t.responsiveMaxWidth=e,!0)}}});!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(nm||(nm={})),function(t){t.Block="block",t.None="none"}(sm||(sm={}));function am(t){const e=wt().createElement("img"),{clickCb:i,container:n,display:s,iconOptions:o,margin:a,options:r,pos:c,rightOffsets:l}=t,{width:h,path:d,style:u,svg:p}=o;!function(t,e,i,n,s,o,a,r){t.style.userSelect="none",t.style.position="absolute",t.style.top=`${(e+a).toString()}px`,t.style.left=`${(i-a-o).toString()}px`,t.style.display=n,t.style.zIndex=(s+1).toString(),t.style.cssText+=r}(e,c.top+a,c.right-(a*(l.length+1)+h+l.reduce((t,e)=>t+e,0)),s,r.fullScreen.zIndex+1,h,a,u),e.src=d??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(n.canvas.domElement?.parentNode??wt().body).append(e),e.addEventListener("click",()=>{i()}),e}function rm(t){t&&t.remove()}var cm=Object.freeze({__proto__:null,SoundsPluginInstance:class{#fo;#yo;#u;#s;#mo;#wo;#vo;#bo;#xo;#So;constructor(t,e){this.#u=t,this.#s=e,this.#bo=0,this.#yo=[],this.#fo=new Map}async init(){const t=this.#u.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&Cf()){const t=()=>{removeEventListener(uf,t),removeEventListener(pf,t),_f(),this.unmute()},e={capture:!0,once:!0};addEventListener(uf,t,e),addEventListener(pf,t,e)}this.#bo=t.volume.value;const e=t.events;this.#fo=new Map;for(const t of e){if(!t.audio)continue;const e=Tt(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),n=this.#Po(),s=await n.decodeAudioData(i);this.#fo.set(t.source,s)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this.#u.muted||await this.toggleMute()}async start(){const t=this.#u,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.domElement)return;t.muted=!0;const n=t.canvas.domElement,s={top:n.offsetTop,right:n.offsetLeft+n.offsetWidth},{mute:o,unmute:a,volumeDown:r,volumeUp:c}=i.icons,l=async()=>{await this.toggleMute()},h=i.icons.enable?sm.Block:sm.None;this.#wo=am({container:t,options:e,pos:s,display:h,iconOptions:o,margin:10,rightOffsets:[r.width,c.width],clickCb:l}),this.#vo=am({container:t,options:e,pos:s,display:sm.None,iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:l}),this.#xo=am({container:t,options:e,pos:s,display:h,iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:async()=>{await this.volumeDown()}}),this.#So=am({container:t,options:e,pos:s,display:h,iconOptions:c,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Cf()&&i.autoPlay&&await this.unmute()}stop(){this.#u.muted=!0,(async()=>{await this.#Mo(),rm(this.#wo),rm(this.#vo),rm(this.#xo),rm(this.#So)})()}async toggleMute(){const t=this.#u;t.muted=!t.muted,this.#Co(),await this.#_o()}async unmute(){this.#u.muted&&await this.toggleMute()}async volumeDown(){const t=this.#u,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this.#bo=0),this.#bo-=e.volume.step,await this.#ko())}async volumeUp(){const t=this.#u.actualOptions.sounds;t?.enable&&(this.#bo+=t.volume.step,await this.#ko())}#Oo(t){const e=t.createBufferSource();return this.#yo.push(e),e}#To(t){const e=t.createOscillator();return this.#yo.push(e),e}#Po(){const t=this.#u;return t.audioContext??=new AudioContext,t.audioContext}#Do(){const t=this.#u,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.domElement)for(const t of e.events){const e=i=>{i&&(async()=>{const n=t.filter&&!t.filter(i);if(this.#u!==i.container)return;if(this.#u.muted||this.#u.destroyed)return void Tt(t.event,t=>{this.#s.removeEventListener(t,e)});if(n)return;if(t.audio){const e=Dt(t.audio);if(!e)return;this.#Ao(e)}else if(t.melodies){const e=St(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this.#Vo(t.notes,0,e.loop))):await this.#Vo(e.notes,0,e.loop)}else if(t.notes){const e=St(t.notes);if(!e)return;await this.#Vo([e],0,!1)}})()};Tt(t.event,t=>{this.#s.addEventListener(t,e)})}}async#Mo(){const t=this.#u,e=this.#Po();for(const t of this.#yo)this.#Eo(t);this.#mo&&this.#mo.disconnect(),await e.close(),t.audioContext=void 0,this.#u.dispatchEvent(nm.mute)}#Ao(t){const e=this.#fo.get(t.source);if(!e)return;const i=this.#u.audioContext;if(!i)return;const n=this.#Oo(i);n.loop=t.loop,n.buffer=e,n.connect(this.#mo??i.destination),n.start()}async#Io(t,e){if(!this.#mo||this.#u.muted)return;const i=this.#Po(),n=this.#To(i);return n.connect(this.#mo),n.type="sine",n.frequency.value=t,n.start(),new Promise(t=>{setTimeout(()=>{this.#Eo(n),t()},e)})}#zo(){if(this.#u.muted)return;const t=this.#Po(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})}async#Vo(t,e,i){if(this.#u.muted)return;const n=t[e];if(!n)return;const s=Tt(n.value,async(i,n)=>this.#Ro(t,e,n));await(F(s)?Promise.allSettled(s):s);let o=e+1;i&&o>=t.length&&(o%=t.length),await this.#Vo(t,o,i)}async#Ro(t,e,i){const n=t[e];if(!n)return;const o=Dt(n.value,i,!0);if(o)try{const t=Pf(o);if(!I(t))return;await this.#Io(t,n.duration)}catch(t){s().error(t)}}#Eo(t){t.stop(),t.disconnect();this.#yo.splice(this.#yo.indexOf(t),1)}#Lo(){const t=this.#u.actualOptions.sounds;if(!t)return;const e=this.#Po(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/d,this.#mo=i,this.#Do(),this.#u.dispatchEvent(nm.unmute)}#Co(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this.#wo,n=this.#vo;i&&(i.style.display=t.muted?"block":"none"),n&&(n.style.display=t.muted?"none":"block")}async#_o(){const t=this.#u,e=this.#Po();t.muted?(await e.suspend(),await this.#Mo()):(await e.resume(),this.#Lo(),this.#zo())}async#ko(){const t=this.#u,e=t.actualOptions.sounds;if(!e?.enable)return;Q(this.#bo,e.volume.min,e.volume.max);let i=!1;this.#bo<=0&&!t.muted?(this.#bo=0,t.muted=!0,i=!0):this.#bo>0&&t.muted&&(t.muted=!1,i=!0),i&&(this.#Co(),await this.#_o()),this.#mo?.gain&&(this.#mo.gain.value=this.#bo/d)}}});var lm=Object.freeze({__proto__:null,ThemesPluginInstance:class{#u;constructor(t){this.#u=t}init(){const t=this.#u;t.themeMatchMedia=vt("(prefers-color-scheme: dark)");return t.themeHandlers={themeChange:t=>{this.#Go(t)},oldThemeChange:t=>{this.#Go(t)}},t.manageMediaMatch=e=>{const i=t.themeHandlers;i&&t.themeMatchMedia&&Rt(t.themeMatchMedia,"change",i.themeChange,e)},t.loadTheme=async e=>{t.destroyed||(t.currentTheme=e,await t.refresh())},Promise.resolve()}manageListeners(t){const e=this.#u;e.manageMediaMatch?.(t)}async start(){return this.manageListeners(!0),Promise.resolve()}stop(){this.manageListeners(!1)}updateActualOptions(){const t=this.#u;return t.actualOptions.setTheme?.(t.currentTheme),!1}#Go(t){const e=t,i=this.#u,n=i.options,s=n.defaultThemes,o=e.matches?s.dark:s.light,a=n.themes?.find(t=>t.name===o);a?.default.auto&&i.loadTheme?.(o)}}});var hm=Object.freeze({__proto__:null,TrailPluginInstance:class{layer=t.DrawLayer.PluginContent;#u;#p;#Fo;constructor(t,e){this.#u=e,this.#p=t}canvasClear(){const t=this.#u,e=t.actualOptions.trail,i=this.#Fo;if(!e?.enable||!i||e.length<=0)return!1;let n=!1;const s=t.canvas;return i.color?(s.render.paintBase(mi(i.color,t.hdr,i.opacity,t.peakNits,t.hdrMode)),n=!0):i.image&&(s.render.paintImage(i.image,i.opacity),n=!0),n}async init(){try{await this.#Ho()}catch(t){s().error(t)}}async#Ho(){const t=this.#u.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=ai(this.#p,e.color);if(!t)return;this.#Fo={color:{...t},opacity:i}}else await new Promise((t,n)=>{if(!e.image)return;const o=wt().createElement("img");o.addEventListener("load",()=>{this.#Fo={image:o,opacity:i},t()}),o.addEventListener("error",t=>{s().error(t),n(new Error("Error loading image"))}),o.src=e.image})}}});class dm{#u;#No;#zi;#Bo;constructor(t){this.#u=t,this.#No=1,this.#Bo=0,this.#zi={gestureStart:t=>{this.#Uo(t)},gestureChange:t=>{this.#$o(t)},gestureEnd:t=>{this.#jo(t)},wheel:t=>{this.#qo(t)},touchMove:t=>{this.#Wo(t)},touchEnd:()=>{this.#Qo()}}}addListeners(){this.#Hi(!0)}removeListeners(){this.#Hi(!1)}#$o(t){const e=this.#u,i=e.canvas,n=i.domElement;if(!n)return;const s=e.actualOptions.zoom;if(!s?.enable)return;if(!this.#Zo(t,n))return;t.preventDefault();const o=t,a=o.scale??1;if(a===this.#No)return;const r=1+.25*(a/this.#No-1),c=i.zoom,l=Math.max(s.min,Math.min(c*r,s.max)),h=n.getBoundingClientRect(),d=o.clientX??h.left+h.width/2,u=o.clientY??h.top+h.height/2,p=this.#u.retina.pixelRatio,g=(d-h.left)*p,f=(u-h.top)*p;i.setZoom(l,{x:g,y:f}),this.#No=a}#jo(t){const e=this.#u,i=e.canvas.domElement;if(!i)return;const n=e.actualOptions.zoom;n?.enable&&this.#Zo(t,i)&&(t.preventDefault(),this.#No=1)}#Uo(t){const e=this.#u,i=e.canvas.domElement;if(!i)return;const n=e.actualOptions.zoom;n?.enable&&this.#Zo(t,i)&&(t.preventDefault(),this.#No=1)}#qo(t){if(!t.ctrlKey&&!t.metaKey)return;const e=this.#u,i=e.actualOptions.zoom,n=e.canvas,s=n.domElement;if(!s)return;if(!i?.enable)return;if(!this.#Zo(t,s))return;t.preventDefault();const o=t.deltaY>0?.95:1.05,a=n.zoom,r=Math.max(i.min,Math.min(a*o,i.max)),c=s.getBoundingClientRect(),l=this.#u.retina.pixelRatio,h=(t.clientX-c.left)*l,d=(t.clientY-c.top)*l;n.setZoom(r,{x:h,y:d})}#Qo(){this.#Bo=0}#Wo(t){if(2!==t.touches.length)return;t.preventDefault();const e=t.touches[0],i=t.touches[1];if(!e||!i)return;const n=Math.hypot(e.clientX-i.clientX,e.clientY-i.clientY);if(0===this.#Bo)return void(this.#Bo=n);const s=this.#u,o=s.actualOptions.zoom,a=s.canvas,r=a.domElement;if(!r)return;if(!o?.enable)return;if(!this.#Zo(t,r))return;const c=1+.25*(n/this.#Bo-1),l=a.zoom,h=Math.max(o.min,Math.min(l*c,o.max)),d=r.getBoundingClientRect(),u=this.#u.retina.pixelRatio,p=((e.clientX+i.clientX)/2-d.left)*u,g=((e.clientY+i.clientY)/2-d.top)*u;a.setZoom(h,{x:p,y:g}),this.#Bo=n}#Zo(t,e){if(t.target===e)return!0;const i=t;if(i.composedPath().includes(e))return!0;const{clientX:n,clientY:s}=i;if("number"==typeof n&&"number"==typeof s){const t=e.getBoundingClientRect();return n>=t.left&&n<=t.right&&s>=t.top&&s<=t.bottom}return!1}#Hi(t){const e=this.#zi,i=this.#u.canvas.domElement,n=this.#u.actualOptions,s=wt();if(!i)return;if(t&&!n.zoom?.enable)return;const o={passive:!1},a={capture:!0,passive:!1};Rt(s,"gesturestart",e.gestureStart,t,a),Rt(s,"gesturechange",e.gestureChange,t,a),Rt(s,"gestureend",e.gestureEnd,t,a),Rt(s,"wheel",e.wheel,t,a),Rt(i,"gesturestart",e.gestureStart,t,o),Rt(i,"gesturechange",e.gestureChange,t,o),Rt(i,"gestureend",e.gestureEnd,t,o),Rt(i,"wheel",e.wheel,t,o),Rt(i,"touchmove",e.touchMove,t,o),Rt(i,"touchend",e.touchEnd,t,o),Rt(i,"touchcancel",e.touchEnd,t,o)}}var um=Object.freeze({__proto__:null,ZoomPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#e;constructor(t){this.#u=t,this.#e=new dm(t)}destroy(){this.#e.removeListeners()}drawParticleTransform(t){const e=this.#u.canvas,i=e.zoom;if(1===i)return;const n=e.getZoomCenter(),{context:s,position:o,transformData:a}=t,r=n.x+(o.x-n.x)*i,c=n.y+(o.y-n.y)*i;t.drawScale=i,t.drawRadius=t.radius*i,t.drawPosition={x:r,y:c},s.setTransform(a.a*i,a.b*i,a.c*i,a.d*i,r,c)}drawSettingsCleanup(t){1!==this.#u.canvas.zoom&&t.restore()}drawSettingsSetup(t){const e=this.#u.canvas.zoom;if(1===e)return;t.save();const{x:i,y:n}=this.#u.canvas.getZoomCenter();t.translate(i,n),t.scale(e,e),t.translate(-i,-n)}start(){return this.#e.addListeners(),Promise.resolve()}stop(){this.#e.removeListeners()}}});function pm(t,e,i,n){(t.paint??=new Ge).fill={color:be.create(void 0,{value:e}),enable:n,opacity:i}}function gm(t,e,i,n){(t.paint??=new Ge).stroke={color:be.create(void 0,{value:e}),opacity:i,width:n}}var fm=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Yo;#Xo;#Ko;#Kn;#Jo;#ta;#ea;#ia;#na;#vi;#sa;#as;#p;#oa=!1;#aa;#Ri;#ra;#Le;#ca;#la;constructor(e,i,n,s,o){this.#p=e,this.#u=i,this.#aa=n,this.#Yo=0,this.#Xo=0,this.#Ko=0,this.#ia=o,s instanceof io?this.options=s:(this.options=new io,this.options.load(s)),this.#ca=i.retina.reduceFactor?X(this.options.life.delay??0)*p/i.retina.reduceFactor:1/0,this.position=this.#ia??this.#Xi(),this.name=this.options.name,this.fill=this.options.fill,this.#ta=!this.options.life.wait,this.#la=!1;const a=_t({},this.options.particles);if(a.move??={},a.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=ci(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=ci(this.#p,this.options.spawn.stroke.color)),this.#as=!this.options.autoPlay,this.#sa=a,this.#Le=this.#ha(),this.size=this.#Le.mode===t.PixelMode.percent?{width:this.#Le.width/d*this.#u.canvas.size.width,height:this.#Le.height/d*this.#u.canvas.size.height}:{width:this.#Le.width,height:this.#Le.height},this.#na=this.options.life.count??-1,this.#ea=this.#na<=0,this.options.domId){const t=wt().getElementById(this.options.domId);t&&(this.#vi=new MutationObserver(()=>{this.resize()}),this.#Ri=new ResizeObserver(()=>{this.resize()}),this.#vi.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#Ri.observe(t))}const r=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(r.type);c&&(this.#ra=c.generate(this.#u,this.position,this.size,this.fill,r.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}draw(t){if(!this.options.draw||!this.#ra)return;const e=this.#u,i=this.options.spawn.fill?.enable??!0;t.save(),t.beginPath(),i&&(t.fillStyle=this.spawnFillColor?wi(this.spawnFillColor,e.hdr,this.spawnFillOpacity??1,e.peakNits,e.hdrMode):mi({r:0,g:0,b:0},e.hdr,1,e.peakNits,e.hdrMode)),this.spawnStrokeColor&&(t.strokeStyle=wi(this.spawnStrokeColor,e.hdr,this.spawnStrokeOpacity??1,e.peakNits,e.hdrMode),t.lineWidth=this.spawnStrokeWidth??1),this.#ra.draw?.(t),i&&t.fill(),this.spawnStrokeColor&&t.stroke(),t.restore()}externalPause(){this.#as=!0,this.pause()}externalPlay(){this.#as=!1,this.play()}async init(){await(this.#ra?.init())}pause(){this.#as||(this.#Jo=void 0)}play(){if(this.#as)return;if(!(this.#na>0||this.#ea)&&this.options.life.count||!(this.#ta||this.#Ko>=(this.#ca??0)))return;const t=this.#u;if(void 0===this.#Jo){const e=X(this.options.rate.delay);this.#Jo=t.retina.reduceFactor?e*p/t.retina.reduceFactor:1/0}(this.#na>0||this.#ea)&&this.#da()}resize(){const e=this.#u;if(!this.#oa){const t=this.#ia;this.position=t&&Pt(t,e.canvas.size,A.origin)?t:this.#Xi()}this.#Le=this.#ha(),this.size=this.#Le.mode===t.PixelMode.percent?{width:this.#Le.width/d*e.canvas.size.width,height:this.#Le.height/d*e.canvas.size.height}:{width:this.#Le.width,height:this.#Le.height},this.#ra?.resize(this.position,this.size)}setPosition(t){this.#oa=!0,this.position={...t},this.#ra?.resize(this.position,this.size)}update(t){if(this.#as)return;const e=this.#u;this.#ta&&(this.#ta=!1,this.#Ko=this.#ca??0,this.#Xo=this.#Jo??0),this.#la||(this.#la=!0,this.#ua(this.options.startCount)),void 0!==this.#Kn&&(this.#Yo+=t.value,this.#Yo>=this.#Kn&&(this.pause(),void 0!==this.#ca&&(this.#ca=void 0),this.#ea||this.#na--,this.#na>0||this.#ea?(this.position=this.#Xi(),this.#ra?.resize(this.position,this.size),this.#ca=e.retina.reduceFactor?X(this.options.life.delay??0)*p/e.retina.reduceFactor:1/0):this.#pa(),this.#Yo-=this.#Kn,this.#Kn=void 0)),void 0!==this.#ca&&(this.#Ko+=t.value,this.#Ko>=this.#ca&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ko-=this.#ca,this.#ca=void 0)),void 0!==this.#Jo&&(this.#Xo+=t.value,this.#Xo>=this.#Jo&&(this.#ga(),this.#Xo-=this.#Jo))}#Xi(){const t=this.#u;if(this.options.domId){const e=wt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),n=t.retina.pixelRatio;return{x:(i.x+i.width*u)*n,y:(i.y+i.height*u)*n}}}return ht({size:t.canvas.size,position:this.options.position})}#ha(){const e=this.#u;if(this.options.domId){const i=wt().getElementById(this.options.domId);if(i){const n=i.getBoundingClientRect();return{width:n.width*e.retina.pixelRatio,height:n.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new to;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#pa(){this.#vi?.disconnect(),this.#vi=void 0,this.#Ri?.disconnect(),this.#Ri=void 0,this.#aa(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ga(){if(this.#as)return;const t=X(this.options.rate.quantity);this.#ua(t)}#ua(t){const e=Dt(this.#sa)??{},i=this.options.spawn.fill?.color?.animation,n=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,s=void 0===this.options.spawn.fill?.opacity?1:X(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:X(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:X(this.options.spawn.stroke.width),c=this.#u.retina.reduceFactor,l=!!i,h=!!o,d=!!this.#ra,u=l||h,p=u||d,g=u?{h:P,s:M,l:C}:null,f=this.options.shape;for(let l=0;l<t*c;l++){const t=p?_t({},e):e;this.spawnFillOpacity=s,this.spawnFillEnabled=n,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&g&&(this.spawnFillColor.h=this.#fa(i.h,this.spawnFillColor.h,g.h,3.6),this.spawnFillColor.s=this.#fa(i.s,this.spawnFillColor.s,g.s),this.spawnFillColor.l=this.#fa(i.l,this.spawnFillColor.l,g.l)),pm(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&g&&(this.spawnStrokeColor.h=this.#fa(o.h,this.spawnStrokeColor.h,g.h,3.6),this.spawnStrokeColor.s=this.#fa(o.s,this.spawnStrokeColor.s,g.s),this.spawnStrokeColor.l=this.#fa(o.l,this.spawnStrokeColor.l,g.l)),gm(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let c=this.position;if(this.#ra){const e=this.#ra.randomPosition();if(e){c=e.position;const i=f.replace;i.color&&e.color&&pm(t,e.color,i.opacity?e.opacity??1:1,!0)}else c=null}c&&this.#u.particles.addParticle(c,t)}}#da(){if(this.#as)return;const t=void 0!==this.options.life.duration?X(this.options.life.duration):void 0;(this.#na>0||this.#ea)&&void 0!==t&&t>0&&(this.#Kn=t*p)}#fa(t,e,i,n=1){const s=this.#u;if(!t.enable)return e;const o=Y(t.offset),a=X(this.options.rate.delay),r=s.retina.reduceFactor?a*p/s.retina.reduceFactor:1/0;return(e+X(t.speed)*s.fpsLimit/r+o*n)%i}}});const ym=w;var mm=Object.freeze({__proto__:null,AbsorberInstance:class{color;limit;mass;name;opacity;options;orbits;position;size;#u;#Yo;#Ko;#Kn;#ta;#ea;#ya;#ia;#ma;#na;#p;#ca;constructor(t,e,i,n){this.#u=e,this.#p=t,this.#Yo=0,this.#Ko=0,this.#ia=n?A.create(n.x,n.y):void 0,i instanceof Ia?this.options=i:(this.options=new Ia,this.options.load(i)),this.name=this.options.name,this.opacity=this.options.opacity,this.orbits=this.options.orbits,this.size=X(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor,this.#ma=this.size,this.#ya=this.mass;const s=this.options.size.limit;this.limit={radius:s.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:s.mass},this.color=ai(this.#p,this.options.color)??{b:0,g:0,r:0},this.position=this.#ia?.copy()??this.#Xi(),this.#ta=!this.options.life.wait,this.#na=this.options.life.count??-1,this.#ea=this.#na<=0,this.#ca=e.retina.reduceFactor?X(this.options.life.delay??0)*p/e.retina.reduceFactor:1/0}attract(t,e){const i=this.#u,n=this.options,s=t.getPosition(),o=nt(this.position,s);if(o<this.size+t.getRadius()){const s=.033*t.getRadius()*i.retina.pixelRatio*e.factor;this.size>t.getRadius()&&o<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?n.destroy?t.destroy():t.needsNewPosition=!0:n.destroy&&(t.size.value-=s),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=s),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=s*this.options.size.density*i.retina.reduceFactor)}}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(g.x,g.y,this.size,0,ym,!1),t.closePath(),t.fillStyle=mi(this.color,this.#u.hdr,this.opacity,this.#u.peakNits,this.#u.hdrMode),t.fill()}getAttraction(t){const e=Math.max(nt(this.position,t),this.size,0);return Math.min(this.mass/e**2*this.#u.retina.reduceFactor,100)}getForce(t){const e=A.create(this.position.x-t.x,this.position.y-t.y);return e.length=this.getAttraction(t),e}resize(){const t=this.#ia;this.position=t&&Pt(t,this.#u.canvas.size,A.origin)?t:this.#Xi()}shouldSplit(){if(!this.options.split.enable)return!1;const t=this.size>this.#ma||this.mass>this.#ya,e=this.limit.radius>0&&this.size>=this.limit.radius,i=this.limit.mass>0&&this.mass>=this.limit.mass;return t&&(e||i)}update(t){this.#ta&&(this.#ta=!1,this.#Ko=this.#ca??0),void 0!==this.#Kn&&(this.#Yo+=t.value,this.#Yo>=this.#Kn&&(this.#ea||this.#na--,(this.#na>0||this.#ea)&&(this.position=this.#Xi(),this.#ca=this.#u.retina.reduceFactor?X(this.options.life.delay??0)*p/this.#u.retina.reduceFactor:1/0),this.#Yo-=this.#Kn,this.#Kn=void 0)),void 0!==this.#ca&&(this.#Ko+=t.value,this.#Ko>=this.#ca&&(this.#wa(),this.#Ko-=this.#ca,this.#ca=void 0))}#Xi(){const t=ht({size:this.#u.canvas.size,position:this.options.position});return A.create(t.x,t.y)}#wa(){(this.#na>0||this.#ea||!this.options.life.count)&&(this.#ta||this.#Ko>=(this.#ca??0))&&(this.#na>0||this.#ea)&&this.#da()}#da(){const t=void 0!==this.options.life.duration?X(this.options.life.duration):void 0;(this.#na>0||this.#ea)&&void 0!==t&&t>0&&(this.#Kn=t*p)}}});var wm=Object.freeze({__proto__:null,PoissonDisc:class{active;cellSize;cols;dimensions;firstPoint;grid;points;radius;retries;rows;size;constructor(t,e,i,n,s){this.size={...t},this.radius=e,this.retries=i,this.dimensions=n,this.cellSize=Math.floor(this.radius/Math.sqrt(this.dimensions)),this.cols=Math.floor(this.size.width/this.cellSize),this.rows=Math.floor(this.size.height/this.cellSize),this.points=[],this.active=[],this.grid=[],this.firstPoint=s?{...s}:void 0,this.reset()}addPoint(t){const e={position:{...t},gridPosition:{x:Math.floor(t.x/this.cellSize),y:Math.floor(t.y/this.cellSize)}},i=this.points.length,n=this.grid[e.gridPosition.y];n&&(this.points.push(e),n[e.gridPosition.x]=i,this.active.push(i))}getRandom(t,e){return Math.floor($()*(e-t))+t}initialiseGrid(){for(let t=0;t<=this.rows;t++){this.grid[t]=[];const e=this.grid[t];if(e)for(let t=0;t<=this.cols;t++)e[t]=-1}}reset(){if(this.points=[],this.active=[],this.grid=[],this.initialiseGrid(),this.firstPoint)this.addPoint(this.firstPoint);else{const t=0;this.addPoint({x:this.getRandom(t,this.size.width),y:this.getRandom(t,this.size.height)})}}async run(){this.reset();let t=0;for(;this.active.length>0;)this.steps(1),++t%100==0&&await new Promise(t=>setTimeout(t))}steps(t){for(let e=0;e<t;e++)this.active.length<=0||this.#va()}#ba(t,e){const i=e*(w/this.retries),n=this.getRandom(this.radius,2*this.radius),s=Math.cos(i)*n,o=Math.sin(i)*n,a={x:Math.floor(t.position.x+s),y:Math.floor(t.position.y+o)},r=Math.floor(a.x/this.cellSize),c=Math.floor(a.y/this.cellSize);if(a.x<=0||a.x>=this.size.width||a.y<=0||a.y>=this.size.height)return;const l=this.grid[c];if(!l)return;const h=l[r];if(void 0!==h&&!(h>=0)){for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){if(!t&&!e)continue;const i={x:r+e,y:c+t};if(i.x<0||i.y<0||i.x>=this.cols||i.y>=this.rows)continue;const n=this.grid[i.y]?.[i.x];if(void 0===n||n<0)continue;const s=this.points[n];if(s&&nt(a,s.position)<this.radius)return}return a}}#va(){const t=this.getRandom(0,this.active.length);let e=!1;for(let i=0;i<this.retries;i++){const n=this.active[t];if(void 0===n)continue;const s=this.points[n];if(!s)continue;const o=this.#ba(s,i);if(o){e=!0,this.addPoint(o);break}}if(!e){const e=1;this.active.splice(t,e)}}}});t.AnimatableColor=be,t.AnimationOptions=fe,t.AnimationValueWithRandom=Ae,t.Background=xe,t.BaseRange=oe,t.Circle=ae,t.ColorAnimation=me,t.ErrorCodes=pt,t.Fill=_e,t.FullScreen=Se,t.HDROptions=Pe,t.HslAnimation=we,t.Move=Re,t.MoveAngle=ke,t.MoveCenter=Oe,t.MoveGravity=Te,t.MovePath=Ee,t.OptionLoader=pe,t.Options=Qe,t.OptionsColor=ve,t.OutModes=Ie,t.Paint=Ge,t.ParticlesBounce=He,t.ParticlesBounceFactor=Fe,t.ParticlesDensity=Ne,t.ParticlesNumber=Ue,t.ParticlesNumberLimit=Be,t.ParticlesOptions=qe,t.RangedAnimationOptions=ye,t.RangedAnimationValueWithRandom=Ve,t.Rectangle=re,t.ResizeEvent=Me,t.Shape=$e,t.Spin=ze,t.Stroke=Le,t.ValueWithRandom=De,t.Vector=A,t.Vector3d=D,t.ZIndex=je,t.addErrorMessages=function(t){},t.alterHsl=ki,t.animate=q,t.areBoundsInside=Mt,t.calcExactPositionOrRandomFromSize=dt,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/d,y:t.position.y*t.size.height/d}:void 0},t.calcPositionOrRandomFromSize=lt,t.calcPositionOrRandomFromSizeRanged=ht,t.calculateBounds=Ct,t.cancelAnimation=W,t.canvasFirstIndex=0,t.canvasTag=x,t.checkDistance=st,t.circleBounce=Ot,t.circleBounceDataFromParticle=kt,t.clamp=Q,t.cloneStyle=Vt,t.collisionVelocity=ct,t.colorMix=vi,t.colorToRgb=ri,t.countOffset=1,t.decayOffset=1,t.deepExtend=_t,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=c,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=f,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=ot,t.deleteCount=1,t.double=2,t.doublePI=w,t.empty=0,t.executeOnSingleOrMultiple=Tt,t.fullPercent=r,t.generatedAttribute=a,t.generatedFalse=b,t.generatedTrue=v,t.getCanvasFromContainer=Ht,t.getDataFromUrl=Ft,t.getDistance=nt,t.getDistanceSq=it,t.getDistances=et,t.getDomContainer=Nt,t.getErrorMessage=gt,t.getFullScreenStyle=zt,t.getHslAnimationFromHsl=Pi,t.getHslFromAnimation=Si,t.getItemMapFromInitializer=Gt,t.getItemsFromInitializer=Lt,t.getLinkColor=bi,t.getLinkRandomColor=xi,t.getLogger=s,t.getParticleBaseVelocity=rt,t.getParticleDirectionAngle=at,t.getPosition=At,t.getRandom=$,t.getRandomFn=function(){return B},t.getRandomInRange=j,t.getRandomRgbColor=yi,t.getRangeMax=J,t.getRangeMin=K,t.getRangeValue=X,t.getStyleFromHsl=wi,t.getStyleFromRgb=mi,t.hMax=P,t.hMin=0,t.hPhase=60,t.half=u,t.hslToRgb=pi,t.hslToRgbFloat=gi,t.hslaToRgba=fi,t.identity=1,t.inverseFactorNumerator=1,t.isArray=F,t.isBoolean=V,t.isEnumValue=R,t.isFunction=z,t.isInArray=xt,t.isNull=H,t.isNumber=I,t.isObject=G,t.isPointInside=Pt,t.isString=E,t.itemFromArray=St,t.itemFromSingleOrMultiple=Dt,t.lFactor=1,t.lMax=C,t.lMin=0,t.lengthOffset=1,t.loadAll=ny,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const n=e;if("__proto__"===n||"constructor"===n||"prototype"===n)return;const s=t,o=Object.hasOwn(s,n)?s[n]:{};s[n]=_t(o,i)}},t.loadLazyProperty=de,t.loadMinIndex=0,t.loadNestedProperty=he,t.loadOptionProperty=ue,t.loadOptions=ge,t.loadParticlesOptions=We,t.loadProperty=ce,t.loadRandomFactor=1e4,t.loadRangeProperty=le,t.manageListener=Rt,t.maxNits=O,t.midColorValue=m,t.millisecondsToSeconds=p,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=Z,t.none=0,t.one=1,t.originPoint=g,t.parseAlpha=ut,t.percentDenominator=d,t.phaseNumerator=1,t.quarter=_,t.randomColorValue=y,t.randomInRangeValue=Y,t.rangeColorToHsl=ci,t.rangeColorToRgb=ai,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=l,t.rgbMax=S,t.rgbToHsl=li,t.sMax=M,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=wt,t.safeMatchMedia=vt,t.safeMutationObserver=bt,t.setAnimationFunctions=function(t,e){U.nextFrame=t,U.cancel=e},t.setLogger=function(t){t.debug&&(n.debug=i(t.debug)),t.error&&(n.error=i(t.error)),t.info&&(n.info=i(t.info)),t.log&&(n.log=i(t.log)),t.trace&&(n.trace=i(t.trace)),t.verbose&&(n.verbose=i(t.verbose)),t.warning&&(n.warning=i(t.warning))},t.setRandom=function(t=Math.random){B=t},t.setRangeValue=tt,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=hi,t.stringToRgb=di,t.threeQuarter=k,t.toEnumValue=L,t.triple=3,t.tryCountIncrement=1,t.tsParticles=Oi,t.updateColor=_i,t.updateColorValue=Ci,t.visibilityChangeEvent=h,t.zIndexFactorOffset=1}(t.__tsParticlesInternals.bundles.all=t.__tsParticlesInternals.bundles.all||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadAll:(globalThis.__tsParticlesInternals.bundles.all||{}).loadAll,loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.all||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.all||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.all||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.all||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.all||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.all||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.all||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.all||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.all||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.all||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.all||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.all||{});