iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 123 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["44287"],{17743:function(t,i,e){var s=e(13053);t.exports=function(t,i,e){for(var n=0,o=arguments.length>2?e:s(i),a=new t(o);o>n;)a[n]=i[n++];return a}},57145:function(t,i,e){var s=e(31269),n=e(72878),o=e(25091),a=e(12360),r=e(70273),c=e(13053),l=e(72309),h=e(17743),d=Array,u=n([].push);t.exports=function(t,i,e,n){for(var p,f,v,y=a(t),g=o(y),m=s(i,e),w=l(null),_=c(g),b=0;_>b;b++)v=g[b],(f=r(m(v,b,y)))in w?u(w[f],v):w[f]=[v];if(n&&(p=n(y))!==d)for(f in w)w[f]=h(p,w[f]);return w}},39200:function(t,i,e){e(40810)({target:"Object",stat:!0},{hasOwn:e(39129)})},22139:function(t,i,e){var s=e(40810),n=e(57145),o=e(35709);s({target:"Array",proto:!0},{group:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),o("group")},44968:function(t,i,e){e.a(t,(async function(t,s){try{e.d(i,{B:()=>v});e(40251);var n=e(6102),o=e(37885),a=e(83060),r=e(45970),c=e(3853),l=e(80820),h=e(12789),d=e(35371),u=e(605),p=t([c,d,n,o,a,l,h,u]);async function v(t,i=!0){t.checkVersion("3.8.1"),await(0,r.Z)(t,!1),await(0,c.C)(t,!1),await(0,d.T)(t,!1),await(0,n.p)(t,!1),await(0,o.J)(t,!1),await(0,a.z)(t,!1),await(0,l.h)(t,!1),await(0,h.l)(t,!1),await(0,u.q)(t,!1),await t.refresh(i)}[c,d,n,o,a,l,h,u]=p.then?(await p)():p,s()}catch(f){s(f)}}))},39535:function(t,i,e){e.d(i,{X:()=>l});e(71695),e(92745),e(19423),e(40251),e(92519),e(42179),e(89256),e(24931),e(88463),e(57449),e(19814),e(47021);var s=e(66852),n=e(63108),o=e(80786),a=e(7534);function r(t,i,e){const s=i[e];var n;void 0!==s&&(t[e]=(null!==(n=t[e])&&void 0!==n?n:o.E$)*s)}function c(t,i,e=!1){if(!i)return;if(!t)return;const s=t.style;if(!s)return;const n=new Set;for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&n.add(s[o]);for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&n.add(i[o]);for(const o of n){const t=i.getPropertyValue(o);t?s.setProperty(o,t,e?"important":""):s.removeProperty(o)}}class l{constructor(t,i){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters){var i;null===(i=e.afterDraw)||void 0===i||i.call(e,t)}},this._applyPreDrawUpdaters=(t,i,e,s,n,o)=>{for(const c of this._preDrawUpdaters){var a;if(c.getColorStyles){const{fill:o,stroke:a}=c.getColorStyles(i,t,e,s);o&&(n.fill=o),a&&(n.stroke=a)}if(c.getTransformValues){const t=c.getTransformValues(i);for(const i in t)r(o,t,i)}null===(a=c.beforeDraw)||void 0===a||a.call(c,i)}},this._applyResizePlugins=()=>{for(const i of this._resizePlugins){var t;null===(t=i.resize)||void 0===t||t.call(i)}},this._getPluginParticleColors=t=>{let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=(0,a.lN)(this._engine,s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=(0,a.lN)(this._engine,s.particleStrokeColor(t))),i&&e)break;return[i,e]},this._initCover=async()=>{const t=this.container.actualOptions.backgroundMask.cover,i=t.color;if(i){const e=(0,a.tX)(this._engine,i);if(e){const i=Object.assign(Object.assign({},e),{},{a:t.opacity});this._coverColorStyle=(0,a.iz)(i,i.a)}}else await new Promise(((i,e)=>{if(!t.image)return;const s=document.createElement("img");s.addEventListener("load",(()=>{this._coverImage={image:s,opacity:t.opacity},i()})),s.addEventListener("error",(t=>{e(t.error)})),s.src=t.image}))},this._initStyle=()=>{const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const e in i.style){if(!e||!i.style||!Object.prototype.hasOwnProperty.call(i.style,e))continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}},this._initTrail=async()=>{const t=this.container.actualOptions.particles.move.trail,i=t.fill;if(!t.enable)return;const e=o.Kl/t.length;if(i.color){const t=(0,a.tX)(this._engine,i.color);if(!t)return;this._trailFill={color:Object.assign({},t),opacity:e}}else await new Promise(((t,s)=>{if(!i.image)return;const n=document.createElement("img");n.addEventListener("load",(()=>{this._trailFill={image:n,opacity:e},t()})),n.addEventListener("error",(t=>{s(t.error)})),n.src=i.image}))},this._paintBase=t=>{this.draw((i=>(0,s.TQ)(i,this.size,t)))},this._paintImage=(t,i)=>{this.draw((e=>(0,s.C3)(e,this.size,t,i)))},this._repairStyle=()=>{const t=this.element;t&&(this._safeMutationObserver((t=>t.disconnect())),this._initStyle(),this.initBackground(),this._safeMutationObserver((i=>{t&&t instanceof Node&&i.observe(t,{attributes:!0})})))},this._resetOriginalStyle=()=>{const t=this.element,i=this._originalStyle;t&&i&&c(t,i,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&c(t,(0,n.bP)(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=i,this._standardSize={height:0,width:0};const e=t.retina.pixelRatio,l=this._standardSize;this.size={height:l.height*e,width:l.width*e},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,i=t.particles.move.trail,e=this._trailFill;t.backgroundMask.enable?this.paint():i.enable&&i.length>o.By&&e?e.color?this._paintBase((0,a.iz)(e.color,e.opacity)):e.image&&this._paintImage(e.image,e.opacity):t.clear&&this.draw((t=>{(0,s.ZH)(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;null==t||t.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const i=this._context;if(i)return t(i)}drawAsync(t){const i=this._context;if(i)return t(i)}drawParticle(t,i){var e;if(t.spawning||t.destroyed)return;const n=t.getRadius();if(n<=o.L2)return;const r=t.getFillColor(),c=null!==(e=t.getStrokeColor())&&void 0!==e?e:r;let[l,h]=this._getPluginParticleColors(t);l||(l=r),h||(h=c),(l||h)&&this.draw((e=>{var r,c,d,u;const p=this.container,f=p.actualOptions,v=t.options.zIndex,y=o.GR-t.zIndexFactor,g=y**v.opacityRate,m=null!==(r=null!==(c=t.bubble.opacity)&&void 0!==c?c:null===(d=t.opacity)||void 0===d?void 0:d.value)&&void 0!==r?r:o.P2,w=m*g,_=(null!==(u=t.strokeOpacity)&&void 0!==u?u:m)*g,b={},x={fill:l?(0,a.vz)(l,w):void 0};x.stroke=h?(0,a.vz)(h,_):x.fill,this._applyPreDrawUpdaters(e,t,n,w,x,b),(0,s.zv)({container:p,context:e,particle:t,delta:i,colorStyles:x,backgroundMask:f.backgroundMask.enable,composite:f.backgroundMask.composite,radius:n*y**v.sizeRate,opacity:w,shadow:t.options.shadow,transform:b}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,i,e){this.draw((n=>(0,s.$F)(n,t,i,e)))}drawPlugin(t,i){this.draw((e=>(0,s.Zw)(e,t,i)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=(0,n.yf)((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(t){(0,n.jl)().error(t)}this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,i=this.element;if(!i)return;const e=i.style;if(e){if(t.color){const i=(0,a.tX)(this._engine,t.color);e.backgroundColor=i?(0,a.iz)(i,t.opacity):""}else e.backgroundColor="";e.backgroundImage=t.image||"",e.backgroundPosition=t.position||"",e.backgroundRepeat=t.repeat||"",e.backgroundSize=t.size||""}}initPlugins(){this._resizePlugins=[];for(const i of this.container.plugins.values()){var t;i.resize&&this._resizePlugins.push(i),(null!==(t=i.particleFillColor)&&void 0!==t?t:i.particleStrokeColor)&&this._colorPlugins.push(i)}}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const e of this.container.particles.updaters){var t,i;e.afterDraw&&this._postDrawUpdaters.push(e),(null!==(t=null!==(i=e.getColorStyles)&&void 0!==i?i:e.getTransformValues)&&void 0!==t?t:e.beforeDraw)&&this._preDrawUpdaters.push(e)}}loadCanvas(t){this._generated&&this.element&&this.element.remove(),this._generated=t.dataset&&o.YU in t.dataset?"true"===t.dataset[o.YU]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=(0,n.fN)(this.element.style);const i=this._standardSize;i.height=t.offsetHeight,i.width=t.offsetWidth;const e=this.container.retina.pixelRatio,s=this.size;t.height=s.height=i.height*e,t.width=s.width=i.width*e,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>t.disconnect())),this.container.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){const t=this.container.actualOptions;this.draw((i=>{t.backgroundMask.enable&&t.backgroundMask.cover?((0,s.ZH)(i,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()}))}resize(){if(!this.element)return!1;const t=this.container,i=t.canvas._standardSize,e={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:e.width*s,height:e.height*s};if(e.height===i.height&&e.width===i.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const o=Object.assign({},i);i.height=e.height,i.width=e.width;const a=this.size;return this.element.width=a.width=n.width,this.element.height=a.height=n.height,this.container.started&&t.particles.setResizeFactor({width:i.width/o.width,height:i.height/o.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>(0,s.ZH)(t,this.size)))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}}},80237:function(t,i,e){e.a(t,(async function(t,s){try{e.d(i,{W:()=>w});e(63721),e(71695),e(40251),e(47021);var n=e(32767),o=e(80786),a=e(63108),r=e(39535),c=e(72993),l=e(76413),h=e(30617),d=e(32387),u=e(91564),p=e(84015),f=t([c]);function y(t){return t&&!t.destroyed}function g(t,i=o.NU,e=!1){return{value:t,factor:e?o.NU/i:o.NU*t/o.X5}}function m(t,i,...e){const s=new h.E(t,i);return(0,p.h)(s,...e),s}c=(f.then?(await f)():f)[0];class w{constructor(t,i,e){this._intersectionManager=t=>{if(y(this)&&this.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivity.element&&(i.isIntersecting?this.play():this.pause())},this._nextFrame=t=>{try{var i;if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+o.X5/this.fpsLimit)return void this.draw(!1);null!==(i=this._lastFrameTime)&&void 0!==i||(this._lastFrameTime=t);const e=g(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(e.value),this._lastFrameTime=t,e.value>o.X5)return void this.draw(!1);if(this.particles.draw(e),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(e){(0,a.jl)().error(`${o.gK} in animation loop`,e)}},this._engine=t,this.id=Symbol(i),this.fpsLimit=120,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=e,this._initialSourceOptions=e,this.retina=new u.v(this),this.canvas=new r.X(this,this._engine),this.particles=new d.D(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=m(this._engine,this),this.actualOptions=m(this._engine,this),this._eventListeners=new c.U(this),this._intersectionObserver=(0,a.NM)((t=>this._intersectionManager(t))),this._engine.dispatchEvent(l.t.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&y(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!y(this))return;const i=this.interactivity.element;if(!i)return;const e=(i,e,s)=>{if(!y(this))return;const n=this.retina.pixelRatio,o={x:e.x*n,y:e.y*n},a=this.particles.quadTree.queryCircle(o,s*n);t(i,a)};let s=!1,n=!1;this._clickHandlers.set("click",(t=>{if(!y(this))return;const i=t,s={x:i.offsetX||i.clientX,y:i.offsetY||i.clientY};e(t,s,o.UK)})),this._clickHandlers.set("touchstart",(()=>{y(this)&&(s=!0,n=!1)})),this._clickHandlers.set("touchmove",(()=>{y(this)&&(n=!0)})),this._clickHandlers.set("touchend",(t=>{if(y(this)){if(s&&!n){const i=t;let s=i.touches[i.touches.length-o.$P];if(!s&&(s=i.changedTouches[i.changedTouches.length-o.$P],!s))return;const n=this.canvas.element,a=n?n.getBoundingClientRect():void 0,r={x:s.clientX-(a?a.left:o.QE),y:s.clientY-(a?a.top:o.QE)};e(t,r,Math.max(s.radiusX,s.radiusY))}s=!1,n=!1}})),this._clickHandlers.set("touchcancel",(()=>{y(this)&&(s=!1,n=!1)}));for(const[o,a]of this._clickHandlers)i.addEventListener(o,a)}addLifeTime(t){this._lifeTime+=t}addPath(t,i,e=!1){return!(!y(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,i),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(y(this)){for(const[i,e]of this._clickHandlers){var t;null===(t=this.interactivity.element)||void 0===t||t.removeEventListener(i,e)}this._clickHandlers.clear()}}destroy(t=!0){if(y(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values()){var i;null===(i=t.destroy)||void 0===i||i.call(t,this)}for(const t of this.shapeDrawers.values()){var e;null===(e=t.destroy)||void 0===e||e.call(t,this)}for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);if(this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,i=t.findIndex((t=>t===this));i>=o.j4&&t.splice(i,o.Rg)}this._engine.dispatchEvent(l.t.containerDestroyed,{container:this})}}draw(t){if(!y(this))return;let i=t;const e=t=>{i&&(this._lastFrameTime=void 0,i=!1),this._nextFrame(t)};this._drawAnimationFrame=(0,n.jt)((t=>e(t)))}async export(t,i={}){for(const e of this.plugins.values()){if(!e.export)continue;const s=await e.export(t,i);if(s.supported)return s.blob}(0,a.jl)().error(`${o.gK} - Export plugin with type ${t} not found`)}handleClickMode(t){if(y(this)){this.particles.handleClickMode(t);for(const e of this.plugins.values()){var i;null===(i=e.handleClickMode)||void 0===i||i.call(e,t)}}}async init(){if(!y(this))return;const t=this._engine.getSupportedEffects();for(const n of t){const t=this._engine.getEffectDrawer(n);t&&this.effectDrawers.set(n,t)}const i=this._engine.getSupportedShapes();for(const n of i){const t=this._engine.getShapeDrawer(n);t&&this.shapeDrawers.set(n,t)}await this.particles.initPlugins(),this._options=m(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=m(this._engine,this,this._options);const e=await this._engine.getAvailablePlugins(this);for(const[n,o]of e)this.plugins.set(n,o);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{zLayers:s,duration:a,delay:r,fpsLimit:c,smooth:h}=this.actualOptions;this.zLayers=s,this._duration=(0,n.Gu)(a)*o.X5,this._delay=(0,n.Gu)(r)*o.X5,this._lifeTime=0,this.fpsLimit=c>o.aL?c:o.li,this._smooth=h;for(const n of this.effectDrawers.values()){var d;await(null===(d=n.init)||void 0===d?void 0:d.call(n,this))}for(const n of this.shapeDrawers.values()){var u;await(null===(u=n.init)||void 0===u?void 0:u.call(n,this))}for(const n of this.plugins.values()){var p;await(null===(p=n.init)||void 0===p?void 0:p.call(n))}this._engine.dispatchEvent(l.t.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const n of this.plugins.values()){var f;null===(f=n.particlesSetup)||void 0===f||f.call(n)}this._engine.dispatchEvent(l.t.particlesSetup,{container:this})}async loadTheme(t){y(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(y(this)&&(void 0!==this._drawAnimationFrame&&((0,n.RE)(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const i of this.plugins.values()){var t;null===(t=i.pause)||void 0===t||t.call(i)}this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(l.t.containerPaused,{container:this})}}play(t){if(!y(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins.values())t.play&&t.play();this._engine.dispatchEvent(l.t.containerPlay,{container:this}),this.draw(null!=i&&i)}else this._firstStart=!1}async refresh(){if(y(this))return this.stop(),this.start()}async reset(t){if(y(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=m(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=m(this._engine,this,this._options),this.refresh()}async start(){y(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const i=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const t of this.plugins.values()){var i;await(null===(i=t.start)||void 0===i?void 0:i.call(t))}this._engine.dispatchEvent(l.t.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{i()}),this._delay)})))}stop(){if(y(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const i of this.plugins.values()){var t;null===(t=i.stop)||void 0===t||t.call(i)}for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(l.t.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}s()}catch(v){s(v)}}))},57649:function(t,i,e){e.a(t,(async function(t,s){try{e.d(i,{D:()=>y});e(63721),e(52247),e(71695),e(92745),e(9359),e(1331),e(31526),e(70104),e(40251),e(47021);var n=e(80786),o=e(63108),a=e(80237),r=e(89201),c=e(76413),l=e(32767),h=t([a]);async function u(t,i,e,s=!1){let n=i.get(t);return n&&!s||(n=await Promise.all([...e.values()].map((i=>i(t)))),i.set(t,n)),n}async function p(t){const i=(0,o.wA)(t.url,t.index);if(!i)return t.fallback;const e=await fetch(i);return e.ok?await e.json():((0,o.jl)().error(`${n.gK} ${e.status} while retrieving config file`),t.fallback)}a=(h.then?(await h)():h)[0];const f=t=>{let i;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===n.jR)i=t,i.dataset[n.YU]||(i.dataset[n.YU]=n.qs);else{const e=t.getElementsByTagName(n.jR);e.length?(i=e[n.dX],i.dataset[n.YU]=n.qs):(i=document.createElement(n.jR),i.dataset[n.YU]=n.oJ,t.appendChild(i))}const e="100%";return i.style.width||(i.style.width=e),i.style.height||(i.style.height=e),i},v=(t,i)=>{let e=null!=i?i:document.getElementById(t);return e||(e=document.createElement("div"),e.id=t,e.dataset[n.YU]=n.oJ,document.body.append(e),e)};class y{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new r.p,this._initialized=!1,this.plugins=[],this.colorManagers=new Map,this.easingFunctions=new Map,this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const t={};for(const[i,e]of this._configs)t[i]=e;return t}get items(){return this._domArray}get version(){return"3.8.1"}async addColorManager(t,i=!0){this.colorManagers.set(t.key,t),await this.refresh(i)}addConfig(t){var i,e;const s=null!==(i=null!==(e=t.key)&&void 0!==e?e:t.name)&&void 0!==i?i:"default";this._configs.set(s,t),this._eventDispatcher.dispatchEvent(c.t.configAdded,{data:{name:s,config:t}})}async addEasing(t,i,e=!0){this.getEasing(t)||(this.easingFunctions.set(t,i),await this.refresh(e))}async addEffect(t,i,e=!0){(0,o.KH)(t,(t=>{this.getEffectDrawer(t)||this.effectDrawers.set(t,i)})),await this.refresh(e)}addEventListener(t,i){this._eventDispatcher.addEventListener(t,i)}async addInteractor(t,i,e=!0){this._initializers.interactors.set(t,i),await this.refresh(e)}async addMover(t,i,e=!0){this._initializers.movers.set(t,i),await this.refresh(e)}async addParticleUpdater(t,i,e=!0){this._initializers.updaters.set(t,i),await this.refresh(e)}async addPathGenerator(t,i,e=!0){this.getPathGenerator(t)||this.pathGenerators.set(t,i),await this.refresh(e)}async addPlugin(t,i=!0){this.getPlugin(t.id)||this.plugins.push(t),await this.refresh(i)}async addPreset(t,i,e=!1,s=!0){!e&&this.getPreset(t)||this.presets.set(t,i),await this.refresh(s)}async addShape(t,i=!0){for(const e of t.validTypes)this.getShapeDrawer(e)||this.shapeDrawers.set(e,t);await this.refresh(i)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}clearPlugins(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}dispatchEvent(t,i){this._eventDispatcher.dispatchEvent(t,i)}dom(){return this.items}domItem(t){return this.item(t)}async getAvailablePlugins(t){const i=new Map;for(const e of this.plugins)e.needsPlugin(t.actualOptions)&&i.set(e.id,await e.getPlugin(t));return i}getEasing(t){var i;return null!==(i=this.easingFunctions.get(t))&&void 0!==i?i:t=>t}getEffectDrawer(t){return this.effectDrawers.get(t)}async getInteractors(t,i=!1){return u(t,this.interactors,this._initializers.interactors,i)}async getMovers(t,i=!1){return u(t,this.movers,this._initializers.movers,i)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((i=>i.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.shapeDrawers.get(t)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(t,i=!1){return u(t,this.updaters,this._initializers.updaters,i)}init(){this._initialized||(this._initialized=!0)}item(t){const{items:i}=this,e=i[t];if(e&&!e.destroyed)return e;i.splice(t,n.Rg)}async load(t){var i,e,s;const r=null!==(i=null!==(e=t.id)&&void 0!==e?e:null===(s=t.element)||void 0===s?void 0:s.id)&&void 0!==i?i:`tsparticles${Math.floor((0,l.sZ)()*n.Ql)}`,{index:c,url:h}=t,d=h?await p({fallback:t.options,url:h,index:c}):t.options,u=(0,o.wA)(d,c),{items:y}=this,g=y.findIndex((t=>t.id.description===r)),m=new a.W(this,r,u);if(g>=n.cQ){const t=this.item(g),i=t?n.J_:n.YP;t&&!t.destroyed&&t.destroy(!1),y.splice(g,i,m)}else y.push(m);const w=v(r,t.element),_=f(w);return m.canvas.loadCanvas(_),await m.start(),m}loadOptions(t,i){this.plugins.forEach((e=>{var s;return null===(s=e.loadOptions)||void 0===s?void 0:s.call(e,t,i)}))}loadParticlesOptions(t,i,...e){const s=this.updaters.get(t);s&&s.forEach((t=>{var s;return null===(s=t.loadOptions)||void 0===s?void 0:s.call(t,i,...e)}))}async refresh(t=!0){t&&await Promise.all(this.items.map((t=>t.refresh())))}removeEventListener(t,i){this._eventDispatcher.removeEventListener(t,i)}setOnClickHandler(t){const{items:i}=this;if(!i.length)throw new Error(`${n.gK} can only set click handlers after calling tsParticles.load()`);i.forEach((i=>i.addClickHandler(t)))}}s()}catch(d){s(d)}}))},32387:function(t,i,e){e.d(i,{D:()=>M});e(71695),e(92745),e(61893),e(9359),e(56475),e(1331),e(31526),e(40251),e(92519),e(42179),e(89256),e(24931),e(88463),e(57449),e(19814),e(22139),e(47021);var s=e(80786),n=e(63108),o=e(76413),a=e(68521);class r{constructor(t,i){this.container=i,this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(t){for(const i of this._externalInteractors)i.isEnabled()&&i.interact(t)}handleClickMode(t){for(const e of this._externalInteractors){var i;null===(i=e.handleClickMode)||void 0===i||i.call(e,t)}}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case a._.external:this._externalInteractors.push(t);break;case a._.particles:this._particleInteractors.push(t)}t.init()}}particlesInteract(t,i){for(const e of this._externalInteractors)e.clear(t,i);for(const e of this._particleInteractors)e.isEnabled(t)&&e.interact(t,i)}reset(t){for(const i of this._externalInteractors)i.isEnabled()&&i.reset(t);for(const i of this._particleInteractors)i.isEnabled(t)&&i.reset(t)}}var c=e(17388),l=(e(52247),e(19423),e(8009)),h=e(32767),d=e(7534),u=e(69418),p=e(33085),f=e(63620),v=e(49133),y=e(12428),g=e(66852),m=e(84015);function w(t){if(!(0,n.dB)(t.outMode,t.checkModes))return;const i=t.radius*s.tx;t.coord>t.maxCoord-i?t.setCb(-t.radius):t.coord<i&&t.setCb(t.radius)}class _{constructor(t,i){this.container=i,this._calcPosition=(t,i,e,n=s.pG)=>{var o,a,r,c;for(const s of t.plugins.values()){const t=void 0!==s.particlePosition?s.particlePosition(i,this):void 0;if(t)return l.U.create(t.x,t.y,e)}const d=t.canvas.size,u=(0,h.mC)({size:d,position:i}),p=l.U.create(u.x,u.y,e),v=this.getRadius(),y=this.options.move.outModes,g=i=>{w({outMode:i,checkModes:[f.V.bounce],coord:p.x,maxCoord:t.canvas.size.width,setCb:t=>p.x+=t,radius:v})},m=i=>{w({outMode:i,checkModes:[f.V.bounce],coord:p.y,maxCoord:t.canvas.size.height,setCb:t=>p.y+=t,radius:v})};return g(null!==(o=y.left)&&void 0!==o?o:y.default),g(null!==(a=y.right)&&void 0!==a?a:y.default),m(null!==(r=y.top)&&void 0!==r?r:y.default),m(null!==(c=y.bottom)&&void 0!==c?c:y.default),this._checkOverlap(p,n)?this._calcPosition(t,void 0,e,n+s.oy):p},this._calculateVelocity=()=>{const t=(0,h.lQ)(this.direction).copy(),i=this.options.move;if(i.direction===p.p.inside||i.direction===p.p.outside)return t;const e=(0,h.Id)((0,h.Gu)(i.angle.value)),n=(0,h.Id)((0,h.Gu)(i.angle.offset)),o={left:n-e*s.jz,right:n+e*s.jz};return i.straight||(t.angle+=(0,h.vd)((0,h.Cs)(o.left,o.right))),i.random&&"number"==typeof i.speed&&(t.length*=(0,h.sZ)()),t},this._checkOverlap=(t,i=s.pG)=>{const e=this.options.collisions,n=this.getRadius();if(!e.enable)return!1;const o=e.overlap;if(o.enable)return!1;const a=o.retries;if(a>=s._1&&i>a)throw new Error(`${s.gK} particle is overlapping and can't be placed`);return!!this.container.particles.find((i=>(0,h.Sp)(t,i.position)<n+i.getRadius()))},this._getRollColor=t=>{var i;if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?s.tx*s.lG:s.lG,n=this.roll.horizontal?Math.PI*s.jz:s.YP;return Math.floor(((null!==(i=this.roll.angle)&&void 0!==i?i:s.YP)+n)/(Math.PI/e))%s.tx?this.backColor?this.backColor:this.roll.alter?(0,g.PL)(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{var i,e;const o=this.container,a=(0,h.Gu)(this.options.zIndex.value);this.position=this._calcPosition(o,t,(0,h.uZ)(a,s.fG,o.zLayers)),this.initialPosition=this.position.copy();const r=o.canvas.size;switch(this.moveCenter=Object.assign(Object.assign({},(0,n.bt)(this.options.move.center,r)),{},{radius:null!==(i=this.options.move.center.radius)&&void 0!==i?i:s.O2,mode:null!==(e=this.options.move.center.mode)&&void 0!==e?e:y.l.percent}),this.direction=(0,h.Gk)(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case p.p.inside:this.outType=v.I.inside;break;case p.p.outside:this.outType=v.I.outside}this.offset=l.O.origin},this._engine=t}destroy(t){var i;if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.container,s=this.pathGenerator,n=e.shapeDrawers.get(this.shape);null==n||null===(i=n.particleDestroy)||void 0===i||i.call(n,this);for(const o of e.plugins.values()){var a;null===(a=o.particleDestroyed)||void 0===a||a.call(o,this,t)}for(const o of e.particles.updaters){var r;null===(r=o.particleDestroyed)||void 0===r||r.call(o,this,t)}null==s||s.reset(this),this._engine.dispatchEvent(o.t.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const i=this.container,e=i.canvas;for(const s of i.plugins.values())e.drawParticlePlugin(s,this,t);e.drawParticle(this,t)}getFillColor(){var t;return this._getRollColor(null!==(t=this.bubble.color)&&void 0!==t?t:(0,d.gW)(this.color))}getMass(){return this.getRadius()**s.Pe*Math.PI*s.jz}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){var t;return null!==(t=this.bubble.radius)&&void 0!==t?t:this.size.value}getStrokeColor(){var t;return this._getRollColor(null!==(t=this.bubble.color)&&void 0!==t?t:(0,d.gW)(this.strokeColor))}init(t,i,e,o){var a,r,c,l,p,f,y,g,w,_,b;const x=this.container,z=this._engine;this.id=t,this.group=o,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=v.I.normal,this.ignoresResizeRatio=!0;const k=x.retina.pixelRatio,M=x.actualOptions,P=(0,m.x)(this._engine,x,M.particles),{reduceDuplicates:C}=P,O=P.effect.type,S=P.shape.type;this.effect=(0,n.wA)(O,this.id,C),this.shape=(0,n.wA)(S,this.id,C);const D=P.effect,R=P.shape;if(e){var I,F;if(null!==(I=e.effect)&&void 0!==I&&I.type){const t=e.effect.type,i=(0,n.wA)(t,this.id,C);i&&(this.effect=i,D.load(e.effect))}if(null!==(F=e.shape)&&void 0!==F&&F.type){const t=e.shape.type,i=(0,n.wA)(t,this.id,C);i&&(this.shape=i,R.load(e.shape))}}if(this.effect===s.V_){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor(Math.random()*t.length)]}if(this.shape===s.V_){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor(Math.random()*t.length)]}this.effectData=function(t,i,e,s){const o=i.options[t];if(o)return(0,n.ZB)({close:i.close,fill:i.fill},(0,n.wA)(o,e,s))}(this.effect,D,this.id,C),this.shapeData=function(t,i,e,s){const o=i.options[t];if(o)return(0,n.ZB)({close:i.close,fill:i.fill},(0,n.wA)(o,e,s))}(this.shape,R,this.id,C),P.load(e);const T=this.effectData;T&&P.load(T.particles);const E=this.shapeData;E&&P.load(E.particles);const L=new u.o(z,x);L.load(x.actualOptions.interactivity),L.load(P.interactivity),this.interactivity=L,this.effectFill=null!==(a=null==T?void 0:T.fill)&&void 0!==a?a:P.effect.fill,this.effectClose=null!==(r=null==T?void 0:T.close)&&void 0!==r?r:P.effect.close,this.shapeFill=null!==(c=null==E?void 0:E.fill)&&void 0!==c?c:P.shape.fill,this.shapeClose=null!==(l=null==E?void 0:E.close)&&void 0!==l?l:P.shape.close,this.options=P;const B=this.options.move.path;this.pathDelay=(0,h.Gu)(B.delay.value)*s.X5,B.generator&&(this.pathGenerator=this._engine.getPathGenerator(B.generator),this.pathGenerator&&x.addPath(B.generator,this.pathGenerator)&&this.pathGenerator.init(x)),x.retina.initParticle(this),this.size=(0,n.V0)(this.options.size,k),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=s.kd-(0,h.Gu)(this.options.move.decay);const V=x.particles;V.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/x.zLayers,this.sides=24;let Y=x.effectDrawers.get(this.effect);Y||(Y=this._engine.getEffectDrawer(this.effect),Y&&x.effectDrawers.set(this.effect,Y)),null!==(p=Y)&&void 0!==p&&p.loadEffect&&Y.loadEffect(this);let A=x.shapeDrawers.get(this.shape);A||(A=this._engine.getShapeDrawer(this.shape),A&&x.shapeDrawers.set(this.shape,A)),null!==(f=A)&&void 0!==f&&f.loadShape&&A.loadShape(this);const G=null===(y=A)||void 0===y?void 0:y.getSidesCount;G&&(this.sides=G(this)),this.spawning=!1,this.shadowColor=(0,d.tX)(this._engine,this.options.shadow.color);for(const s of V.updaters)s.init(this);for(const s of V.movers){var Z;null===(Z=s.init)||void 0===Z||Z.call(s,this)}null===(g=Y)||void 0===g||null===(w=g.particleInit)||void 0===w||w.call(g,x,this),null===(_=A)||void 0===_||null===(b=_.particleInit)||void 0===b||b.call(_,x,this);for(const s of x.plugins.values()){var W;null===(W=s.particleCreated)||void 0===W||W.call(s,this)}}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size,e=this.position;return e.x>=-t&&e.y>=-t&&e.y<=i.height+t&&e.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const i of this.container.particles.updaters){var t;null===(t=i.reset)||void 0===t||t.call(i,this)}}}class b{constructor(t,i){this.position=t,this.particle=i}}e(52924);var x=e(64007);class z{constructor(t,i){this.rectangle=t,this.capacity=i,this._subdivide=()=>{const{x:t,y:i}=this.rectangle.position,{width:e,height:n}=this.rectangle.size,{capacity:o}=this;for(let a=0;a<s.DL;a++){const r=a%s.tx;this._subs.push(new z(new x.Ae(t+e*s.jz*r,i+n*s.jz*(Math.round(a*s.jz)-r),e*s.jz,n*s.jz),o))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((i=>i.insert(t)))))}query(t,i){const e=[];if(!t.intersects(this.rectangle))return[];for(const s of this._points)!t.contains(s.position)&&(0,h.Sp)(t.position,s.position)>s.particle.getRadius()&&(!i||i(s.particle))||e.push(s.particle);if(this._divided)for(const s of this._subs)e.push(...s.query(t,i));return e}queryCircle(t,i,e){return this.query(new x.Cd(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new x.Ae(t.x,t.y,i.width,i.height),e)}}const k=t=>{const{height:i,width:e}=t;return new x.Ae(s.e*e,s.e*i,s.f3*e,s.f3*i)};class M{constructor(t,i){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,i,e)=>{var n;const o=t.number;if(null===(n=t.number.density)||void 0===n||!n.enable)return void(void 0===e?this._limit=o.limit.value:o.limit&&this._groupLimits.set(e,o.limit.value));const a=this._initDensityFactor(o.density),r=o.value,c=o.limit.value>s.nE?o.limit.value:r,l=Math.min(r,c)*a+i,h=Math.min(this.count,this.filter((t=>t.group===e)).length);void 0===e?this._limit=o.limit.value*a:this._groupLimits.set(e,o.limit.value*a),h<l?this.push(Math.abs(l-h),void 0,t,e):h>l&&this.removeQuantity(h-l,e)},this._initDensityFactor=t=>{const i=this._container;if(!i.canvas.element||!t.enable)return s.k_;const e=i.canvas.element,n=i.retina.pixelRatio;return e.width*e.height/(t.height*t.width*n**s.Pe)},this._pushParticle=(t,i,e,a)=>{try{let s=this._pool.pop();s||(s=new _(this._engine,this._container)),s.init(this._nextId,t,i,e);let n=!0;if(a&&(n=a(s)),!n)return;return this._array.push(s),this._zArray.push(s),this._nextId++,this._engine.dispatchEvent(o.t.particleAdded,{container:this._container,data:{particle:s}}),s}catch(r){(0,n.jl)().warning(`${s.gK} adding particle: ${r}`)}},this._removeParticle=(t,i,e)=>{const n=this._array[t];if(!n||n.group!==i)return!1;const a=this._zArray.indexOf(n);return this._array.splice(t,s.px),this._zArray.splice(a,s.px),n.destroy(e),this._engine.dispatchEvent(o.t.particleRemoved,{container:this._container,data:{particle:n}}),this._addToPool(n),!0},this._engine=t,this._container=i,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new r(t,i),this._pluginsInitialized=!1;const e=i.canvas.size;this.quadTree=new z(k(e),s.Bz),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((i=>this.addParticle(i.position?(0,n.bt)(i.position,t.canvas.size):void 0,i.options)))}addParticle(t,i,e,n){var o;const a=this._container.actualOptions.particles.number.limit.mode,r=void 0===e?this._limit:null!==(o=this._groupLimits.get(e))&&void 0!==o?o:this._limit,l=this.count;if(r>s.nE)switch(a){case c.C.delete:{const t=l+s.IY-r;t>s.w5&&this.removeQuantity(t);break}case c.C.wait:if(l>=r)return}return this._pushParticle(t,i,e,n)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(t){const i=this._container,e=i.canvas;e.clear(),this.update(t);for(const s of i.plugins.values())e.drawPlugin(s,t);for(const s of this._zArray)s.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}async init(){const t=this._container,i=t.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let e=!1;for(const a of t.plugins.values()){var s,n;if(e=null!==(s=null===(n=a.particlesInitialization)||void 0===n?void 0:n.call(a))&&void 0!==s?s:e,e)break}if(this.addManualParticles(),!e){const t=i.particles,e=t.groups;for(const i in e){const s=e[i];for(let e=this.count,n=0;n<(null===(o=s.number)||void 0===o?void 0:o.value)&&e<t.number.value;e++,n++){var o;this.addParticle(void 0,s,i)}}for(let i=this.count;i<t.number.value;i++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0),await this._interactionManager.init();for(const i of t.pathGenerators.values())i.init(t)}push(t,i,e,s){for(let n=0;n<t;n++)this.addParticle(null==i?void 0:i.position,e,s)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(t,i,e){this.removeAt(this._array.indexOf(t),void 0,i,e)}removeAt(t,i=s.OT,e,n){if(t<s._D||t>this.count)return;let o=0;for(let s=t;o<i&&s<this.count;s++)this._removeParticle(s,e,n)&&(s--,o++)}removeQuantity(t,i){this.removeAt(s._D,t,i)}setDensity(){const t=this._container.actualOptions,i=t.particles.groups;for(const e in i)this._applyDensity(i[e],s.RL,e);this._applyDensity(t.particles,t.manualParticles.length)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const i=this._container,e=new Set;this.quadTree=new z(k(i.canvas.size),s.Bz);for(const s of i.pathGenerators.values())s.update();for(const s of i.plugins.values()){var n;null===(n=s.update)||void 0===n||n.call(s,t)}const a=this._resizeFactor;for(const s of this._array){a&&!s.ignoresResizeRatio&&(s.position.x*=a.width,s.position.y*=a.height,s.initialPosition.x*=a.width,s.initialPosition.y*=a.height),s.ignoresResizeRatio=!1,this._interactionManager.reset(s);for(const i of this._container.plugins.values()){var r;if(s.destroyed)break;null===(r=i.particleUpdate)||void 0===r||r.call(i,s,t)}for(const i of this.movers)i.isEnabled(s)&&i.move(s,t);s.destroyed?e.add(s):this.quadTree.insert(new b(s.getPosition(),s))}if(e.size){const t=t=>!e.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const i of e)this._engine.dispatchEvent(o.t.particleRemoved,{container:this._container,data:{particle:i}});this._addToPool(...e)}this._interactionManager.externalInteract(t);for(const s of this._array){for(const i of this.updaters)i.update(s,t);s.destroyed||s.spawning||this._interactionManager.particlesInteract(s,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id)),this._lastZIndex=t[t.length-s.vR].position.z,this._needsSort=!1}}}},91564:function(t,i,e){e.d(i,{v:()=>a});var s=e(80786),n=e(32767),o=e(63108);class a{constructor(t){this.container=t,this.pixelRatio=s.Hx,this.reduceFactor=s.Bd}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=!i.detectRetina||(0,o.Kr)()?s.Hx:window.devicePixelRatio,this.reduceFactor=s.Bd;const e=this.pixelRatio,a=t.canvas;if(a.element){const t=a.element;a.size.width=t.offsetWidth*e,a.size.height=t.offsetHeight*e}const r=i.particles,c=r.move;this.maxSpeed=(0,n.Gu)(c.gravity.maxSpeed)*e,this.sizeAnimationSpeed=(0,n.Gu)(r.size.animation.speed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,s=i.move,o=s.distance,a=t.retina;a.moveDrift=(0,n.Gu)(s.drift)*e,a.moveSpeed=(0,n.Gu)(s.speed)*e,a.sizeAnimationSpeed=(0,n.Gu)(i.size.animation.speed)*e;const r=a.maxDistance;r.horizontal=void 0!==o.horizontal?o.horizontal*e:void 0,r.vertical=void 0!==o.vertical?o.vertical*e:void 0,a.maxSpeed=(0,n.Gu)(s.gravity.maxSpeed)*e}}},80786:function(t,i,e){e.d(i,{$P:()=>J,$e:()=>_,$o:()=>h,Bc:()=>Dt,Bd:()=>T,By:()=>K,Bz:()=>R,C0:()=>Gt,DL:()=>E,E$:()=>U,EY:()=>Y,Eg:()=>Tt,FY:()=>W,G1:()=>r,GR:()=>X,HW:()=>G,Hx:()=>F,IY:()=>wt,JV:()=>Bt,J_:()=>ct,Kl:()=>L,L2:()=>$,Lk:()=>Ft,Mn:()=>k,NU:()=>M,O2:()=>vt,OT:()=>I,P2:()=>N,Pe:()=>D,QE:()=>tt,QL:()=>f,Ql:()=>at,Qt:()=>B,RB:()=>A,RL:()=>xt,Re:()=>l,Rg:()=>it,UK:()=>Q,VH:()=>u,V_:()=>b,Wt:()=>c,Wy:()=>Z,X5:()=>m,YP:()=>lt,YU:()=>s,Yb:()=>V,Yt:()=>Yt,Z7:()=>Vt,Z8:()=>It,ZL:()=>n,_1:()=>ut,_D:()=>bt,aL:()=>nt,aM:()=>a,cQ:()=>rt,cS:()=>H,cV:()=>Lt,dX:()=>ot,e:()=>yt,f3:()=>gt,fG:()=>ft,fM:()=>Et,gK:()=>v,ix:()=>q,j4:()=>et,jR:()=>O,jz:()=>g,k_:()=>kt,kd:()=>ht,lG:()=>pt,li:()=>st,lm:()=>At,mS:()=>j,mb:()=>Pt,nE:()=>mt,nh:()=>Ct,oJ:()=>P,oy:()=>dt,pG:()=>S,px:()=>Mt,qs:()=>C,rR:()=>p,rT:()=>Rt,tZ:()=>y,tx:()=>z,u2:()=>x,us:()=>w,vR:()=>zt,w5:()=>_t,yR:()=>St,zE:()=>Ot,zX:()=>d,zw:()=>o});const s="generated",n="pointerdown",o="pointerup",a="pointerleave",r="pointerout",c="pointermove",l="touchstart",h="touchend",d="touchmove",u="touchcancel",p="resize",f="visibilitychange",v="tsParticles - Error",y=100,g=.5,m=1e3,w={x:0,y:0,z:0},_={a:1,b:0,c:0,d:1},b="random",x="mid",z=2,k=Math.PI*z,M=60,P="true",C="false",O="canvas",S=0,D=2,R=4,I=1,F=1,T=1,E=4,L=1,B=255,V=360,Y=100,A=100,G=0,Z=0,W=60,H=0,j=.25,q=g+j,U=1,$=0,K=0,X=1,N=1,Q=1,J=1,tt=0,it=1,et=0,st=120,nt=0,ot=0,at=1e4,rt=0,ct=1,lt=0,ht=1,dt=1,ut=0,pt=1,ft=0,vt=0,yt=-j,gt=1.5,mt=0,wt=1,_t=0,bt=0,xt=0,zt=1,kt=1,Mt=1,Pt=500,Ct=50,Ot=0,St=1,Dt=0,Rt=1,It=0,Ft=255,Tt=3,Et=6,Lt=1,Bt=1,Vt=0,Yt=0,At=0,Gt=0},72993:function(t,i,e){e.a(t,(async function(t,s){try{e.d(i,{U:()=>u});var n=e(31948),o=(e(71695),e(9359),e(1331),e(19423),e(40251),e(88044),e(47021),e(80786)),a=e(63108),r=e(70896),c=e(81809),l=t([n]);function d(t,i,e,s,n){if(s){let s={passive:!0};(0,c.jn)(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(i,e,s)}else{const s=n;t.removeEventListener(i,e,s)}}n=(l.then?(await l)():l)[0];class u{constructor(t){this.container=t,this._doMouseTouchClick=t=>{const i=this.container,e=i.actualOptions;if(this._canPush){const t=i.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition=Object.assign({},s),t.clickTime=(new Date).getTime();const n=e.interactivity.events.onClick;(0,a.KH)(n.mode,(t=>this.container.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),o.mb)},this._handleThemeChange=t=>{const i=t,e=this.container,s=e.options,n=s.defaultThemes,o=i.matches?n.dark:n.light,a=s.themes.find((t=>t.name===o));null!=a&&a.default.auto&&e.loadTheme(o)},this._handleVisibilityChange=()=>{var t;const i=this.container,e=i.actualOptions;this._mouseTouchFinish(),e.pauseOnBlur&&(null!==(t=document)&&void 0!==t&&t.hidden?(i.pageHidden=!0,i.pause()):(i.pageHidden=!1,i.animationStatus?i.play(!0):i.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await(null==t?void 0:t.windowResize())};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.interactivity.events.resize.delay*o.X5)},this._manageInteractivityListeners=(t,i)=>{const e=this._handlers,s=this.container,n=s.actualOptions,a=s.interactivity.element;if(!a)return;const r=a,c=s.canvas.element;c&&(c.style.pointerEvents=r===c?"initial":"none"),(n.interactivity.events.onHover.enable||n.interactivity.events.onClick.enable)&&(d(a,o.Wt,e.mouseMove,i),d(a,o.Re,e.touchStart,i),d(a,o.zX,e.touchMove,i),n.interactivity.events.onClick.enable?(d(a,o.$o,e.touchEndClick,i),d(a,o.zw,e.mouseUp,i),d(a,o.ZL,e.mouseDown,i)):d(a,o.$o,e.touchEnd,i),d(a,t,e.mouseLeave,i),d(a,o.VH,e.touchCancel,i))},this._manageListeners=t=>{const i=this._handlers,e=this.container,s=e.actualOptions.interactivity.detectsOn,n=e.canvas.element;let a=o.aM;if(s===r.z.window)e.interactivity.element=window,a=o.G1;else if(s===r.z.parent&&n){var c;e.interactivity.element=null!==(c=n.parentElement)&&void 0!==c?c:n.parentNode}else e.interactivity.element=n;this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(a,t),document&&d(document,o.QL,i.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const i=this._handlers,e=(0,a.HY)("(prefers-color-scheme: dark)");e&&(void 0===e.addEventListener?void 0!==e.addListener&&(t?e.addListener(i.oldThemeChange):e.removeListener(i.oldThemeChange)):d(e,"change",i.themeChange,t))},this._manageResize=t=>{const i=this._handlers,e=this.container;if(!e.actualOptions.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver)return void d(window,o.rR,i.resize,t);const s=e.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container;if(!t)return;const{mouse:i}=t;i.clicking=!0,i.downPosition=i.position},this._mouseTouchClick=t=>{const i=this.container,e=i.actualOptions,{mouse:s}=i.interactivity;s.inside=!0;let n=!1;const o=s.position;if(o&&e.interactivity.events.onClick.enable){for(const t of i.plugins.values())if(t.clickPositionValid&&(n=t.clickPositionValid(o),n))break;n||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const t=this.container.interactivity;if(!t)return;const i=t.mouse;delete i.position,delete i.clickPosition,delete i.downPosition,t.status=o.aM,i.inside=!1,i.clicking=!1},this._mouseTouchMove=t=>{const i=this.container,e=i.actualOptions,s=i.interactivity,n=i.canvas.element;if(null==s||!s.element)return;let a;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const i=t;if(s.element===window){if(n){const t=n.getBoundingClientRect();a={x:i.clientX-t.left,y:i.clientY-t.top}}}else if(e.interactivity.detectsOn===r.z.parent){const t=i.target,e=i.currentTarget;if(t&&e&&n){const s=t.getBoundingClientRect(),r=e.getBoundingClientRect(),c=n.getBoundingClientRect();a={x:i.offsetX+o.tx*s.left-(r.left+c.left),y:i.offsetY+o.tx*s.top-(r.top+c.top)}}else{var c,l;a={x:null!==(c=i.offsetX)&&void 0!==c?c:i.clientX,y:null!==(l=i.offsetY)&&void 0!==l?l:i.clientY}}}else if(i.target===n){var h,d;a={x:null!==(h=i.offsetX)&&void 0!==h?h:i.clientX,y:null!==(d=i.offsetY)&&void 0!==d?d:i.clientY}}}else if(this._canPush="touchmove"!==t.type,n){var u,p;const i=t,e=i.touches[i.touches.length-o.vR],s=n.getBoundingClientRect();a={x:e.clientX-(null!==(u=s.left)&&void 0!==u?u:o.QE),y:e.clientY-(null!==(p=s.top)&&void 0!==p?p:o.QE)}}const f=i.retina.pixelRatio;a&&(a.x*=f,a.y*=f),s.mouse.position=a,s.status=o.Wt},this._touchEnd=t=>{const i=t,e=Array.from(i.changedTouches);for(const s of e)this._touches.delete(s.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const i=t,e=Array.from(i.changedTouches);for(const s of e)this._touches.delete(s.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const i=t,e=Array.from(i.changedTouches);for(const s of e)this._touches.set(s.identifier,performance.now());this._mouseTouchMove(t)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:t=>this._mouseTouchMove(t),mouseUp:t=>this._mouseTouchClick(t),touchStart:t=>this._touchStart(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:t=>this._touchEnd(t),touchCancel:t=>this._touchEnd(t),touchEndClick:t=>this._touchEndClick(t),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}s()}catch(h){s(h)}}))},64007:function(t,i,e){var s,n;e.d(i,{Cd:()=>c,Ae:()=>l}),(n=s||(s={})).circle="circle",n.rectangle="rectangle";var o=e(32767),a=e(80786);class r{constructor(t,i,e){this.position={x:t,y:i},this.type=e}}class c extends r{constructor(t,i,e){super(t,i,s.circle),this.radius=e}contains(t){return(0,o.Sp)(t,this.position)<=this.radius}intersects(t){const i=this.position,e=t.position,n=Math.abs(e.x-i.x),o=Math.abs(e.y-i.y),r=this.radius;if(t instanceof c||t.type===s.circle){return r+t.radius>Math.sqrt(n**a.Pe+o**a.Pe)}if(t instanceof l||t.type===s.rectangle){const i=t,{width:e,height:s}=i.size;return Math.pow(n-e,a.Pe)+Math.pow(o-s,a.Pe)<=r**a.Pe||n<=r+e&&o<=r+s||n<=e||o<=s}return!1}}class l extends r{constructor(t,i,e,n){super(t,i,s.rectangle),this.size={height:n,width:e}}contains(t){const i=this.size.width,e=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+i&&t.y>=s.y&&t.y<=s.y+e}intersects(t){if(t instanceof c)return t.intersects(this);const i=this.size.width,e=this.size.height,s=this.position,n=t.position,o=t instanceof l?t.size:{width:0,height:0},a=o.width,r=o.height;return n.x<s.x+i&&n.x+a>s.x&&n.