UNPKG

tsparticles

Version:

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

2 lines 182 kB
/*! tsParticles v1.42.2 by Matteo Bruni */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(window,(function(){return function(){"use strict";var t,e,i,o,s,n={},a={};function r(t){var e=a[t];if(void 0!==e)return e.exports;var i=a[t]={exports:{}};return n[t](i,i.exports,r),i.exports}r.m=n,t=[],r.O=function(e,i,o,s){if(!i){var n=1/0;for(d=0;d<t.length;d++){i=t[d][0],o=t[d][1],s=t[d][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||n>=s)&&Object.keys(r.O).every((function(t){return r.O[t](i[l])}))?i.splice(l--,1):(a=!1,s<n&&(n=s));if(a){t.splice(d--,1);var c=o();void 0!==c&&(e=c)}}return e}s=s||0;for(var d=t.length;d>0&&t[d-1][2]>s;d--)t[d]=t[d-1];t[d]=[i,o,s]},r.F={},r.E=function(t){Object.keys(r.F).map((function(e){r.F[e](t)}))},i=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},r.t=function(t,o){if(1&o&&(t=this(t)),8&o)return t;if("object"==typeof t&&t){if(4&o&&t.__esModule)return t;if(16&o&&"function"==typeof t.then)return t}var s=Object.create(null);r.r(s);var n={};e=e||[null,i({}),i([]),i(i)];for(var a=2&o&&t;"object"==typeof a&&!~e.indexOf(a);a=i(a))Object.getOwnPropertyNames(a).forEach((function(e){n[e]=function(){return t[e]}}));return n.default=function(){return t},r.d(s,n),s},r.d=function(t,e){for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.f={},r.e=function(t){return Promise.all(Object.keys(r.f).reduce((function(e,i){return r.f[i](t,e),e}),[]))},r.u=function(t){return"tsparticles.pathseg.min.js"},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o={},s="tsparticles:",r.l=function(t,e,i,n){if(o[t])o[t].push(e);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==s+i){a=h;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",s+i),a.src=t),o[t]=[e];var u=function(e,i){a.onerror=a.onload=null,clearTimeout(p);var s=o[t];if(delete o[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((function(t){return t(i)})),e)return e(i)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),l&&document.head.appendChild(a)}},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");i.length&&(t=i[i.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}(),function(){var t={155:0,649:0};r.f.j=function(e,i){var o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)i.push(o[2]);else{var s=new Promise((function(i,s){o=t[e]=[i,s]}));i.push(o[2]=s);var n=r.p+r.u(e),a=new Error;r.l(n,(function(i){if(r.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=i&&("load"===i.type?"missing":i.type),n=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+n+")",a.name="ChunkLoadError",a.type=s,a.request=n,o[1](a)}}),"chunk-"+e,e)}},r.F.j=function(e){if(!r.o(t,e)||void 0===t[e]){t[e]=null;var i=document.createElement("link");r.nc&&i.setAttribute("nonce",r.nc),i.rel="prefetch",i.as="script",i.href=r.p+r.u(e),document.head.appendChild(i)}},r.O.j=function(e){return 0===t[e]};var e=function(e,i){var o,s,n=i[0],a=i[1],l=i[2],c=0;if(n.some((function(e){return 0!==t[e]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var d=l(r)}for(e&&e(i);c<n.length;c++)s=n[c],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return r.O(d)},i=window.webpackChunktsparticles=window.webpackChunktsparticles||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))}(),r.O(0,[155],(function(){r.E(404)}),5);var l={};function c(t,e,i){return Math.min(Math.max(t,e),i)}function d(t,e,i,o){return Math.floor((t*i+e*o)/(i+o))}function h(t){const e=v(t);let i=p(t);return e===i&&(i=0),Math.random()*(e-i)+i}function u(t){return"number"==typeof t?t:h(t)}function p(t){return"number"==typeof t?t:t.min}function v(t){return"number"==typeof t?t:t.max}function f(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const i=p(t),o=v(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(o,e)}:f(i,o)}function y(t){const e=t.random,{enable:i,minimumValue:o}="boolean"==typeof e?{enable:e,minimumValue:0}:e;return u(i?f(t.value,o):t.value)}function m(t,e){const i=t.x-e.x,o=t.y-e.y;return{dx:i,dy:o,distance:Math.sqrt(i*i+o*o)}}function b(t,e){return m(t,e).distance}function g(t){if("number"==typeof t)return t*Math.PI/180;switch(t){case"top":return-Math.PI/2;case"top-right":return-Math.PI/4;case"right":return 0;case"bottom-right":return Math.PI/4;case"bottom":return Math.PI/2;case"bottom-left":return 3*Math.PI/4;case"left":return Math.PI;case"top-left":return-3*Math.PI/4;case"none":default:return Math.random()*Math.PI*2}}function w(t){const e=Qt.origin;return e.length=1,e.angle=t,e}function x(t,e,i,o){return Qt.create(t.x*(i-o)/(i+o)+2*e.x*o/(i+o),t.y)}function k(t,e){switch(e){case"ease-out-quad":return 1-(1-t)**2;case"ease-out-cubic":return 1-(1-t)**3;case"ease-out-quart":return 1-(1-t)**4;case"ease-out-quint":return 1-(1-t)**5;case"ease-out-expo":return 1===t?1:1-Math.pow(2,-10*t);case"ease-out-sine":return Math.sin(t*Math.PI/2);case"ease-out-back":{const e=1.70158;return 1+(e+1)*Math.pow(t-1,3)+e*Math.pow(t-1,2)}case"ease-out-circ":return Math.sqrt(1-Math.pow(t-1,2));default:return t}}function P(t,e,i,o,s,n){const a={bounced:!1};return e.min>=o.min&&e.min<=o.max&&e.max>=o.min&&e.max<=o.max&&(t.max>=i.min&&t.max<=(i.max+i.min)/2&&s>0||t.min<=i.max&&t.min>(i.max+i.min)/2&&s<0)&&(a.velocity=s*-n,a.bounced=!0),a}function M(t,e){if(e instanceof Array){for(const i of e)if(t.matches(i))return!0;return!1}return t.matches(e)}function z(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function C(){return z()?t=>setTimeout(t):t=>(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.setTimeout)(t)}function T(){return z()?t=>clearTimeout(t):t=>(window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||window.clearTimeout)(t)}function E(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}async function S(t){var e,i;try{await document.fonts.load(`${null!==(e=t.weight)&&void 0!==e?e:"400"} 36px '${null!==(i=t.font)&&void 0!==i?i:"Verdana"}'`)}catch(t){}}function O(t){return Math.floor(Math.random()*t.length)}function R(t,e,i=!0){return t[void 0!==e&&i?e%t.length:O(t)]}function A(t,e,i,o){return I(D(t,null!=i?i:0),e,o)}function I(t,e,i){let o=!0;return i&&"bottom"!==i||(o=t.top<e.height),!o||i&&"left"!==i||(o=t.right>0),!o||i&&"right"!==i||(o=t.left<e.width),!o||i&&"top"!==i||(o=t.bottom>0),o}function D(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function L(t,...e){for(const i of e){if(null==i)continue;if("object"!=typeof i){t=i;continue}const e=Array.isArray(i);!e||"object"==typeof t&&t&&Array.isArray(t)?e||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const o=i[e],s="object"==typeof o,n=t;n[e]=s&&Array.isArray(o)?o.map((t=>L(n[e],t))):L(n[e],o)}}return t}function H(t,e){return e instanceof Array?!!e.find((e=>e.enable&&E(t,e.mode))):E(t,e.mode)}function q(t,e,i){if(e instanceof Array)for(const o of e){const e=o.mode;o.enable&&E(t,e)&&_(o,i)}else{const o=e.mode;e.enable&&E(t,o)&&_(e,i)}}function _(t,e){const i=t.selectors;if(i instanceof Array)for(const o of i)e(o,t);else e(i,t)}function F(t,e){if(e&&t)return t instanceof Array?t.find((t=>M(e,t.selectors))):M(e,t.selectors)?t:void 0}function V(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:Qt.create(y(t.options.bounce.horizontal),y(t.options.bounce.vertical))}}function B(t,e){const{x:i,y:o}=t.velocity.sub(e.velocity),[s,n]=[t.position,e.position],{dx:a,dy:r}=m(n,s);if(i*a+o*r>=0){const i=-Math.atan2(r,a),o=t.mass,s=e.mass,n=t.velocity.rotate(i),l=e.velocity.rotate(i),c=x(n,l,o,s),d=x(l,n,o,s),h=c.rotate(-i),u=d.rotate(-i);t.velocity.x=h.x*t.factor.x,t.velocity.y=h.y*t.factor.y,e.velocity.x=u.x*e.factor.x,e.velocity.y=u.y*e.factor.y}}function W(t,e){const i=D(t.getPosition(),t.getRadius()),o=P({min:i.left,max:i.right},{min:i.top,max:i.bottom},{min:e.left,max:e.right},{min:e.top,max:e.bottom},t.velocity.x,y(t.options.bounce.horizontal));o.bounced&&(void 0!==o.velocity&&(t.velocity.x=o.velocity),void 0!==o.position&&(t.position.x=o.position));const s=P({min:i.top,max:i.bottom},{min:i.left,max:i.right},{min:e.top,max:e.bottom},{min:e.left,max:e.right},t.velocity.y,y(t.options.bounce.vertical));s.bounced&&(void 0!==s.velocity&&(t.velocity.y=s.velocity),void 0!==s.position&&(t.position.y=s.position))}function j(t,e,i){let o=i;return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function G(t){if(t.startsWith("rgb")){const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?parseFloat(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}if(t.startsWith("hsl")){const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?Q({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}if(t.startsWith("hsv")){const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(t);return e?ot({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}):void 0}{const e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,i=t.replace(e,((t,e,i,o,s)=>e+e+i+i+o+o+(void 0!==s?s+s:""))),o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(i);return o?{a:void 0!==o[4]?parseInt(o[4],16)/255:1,b:parseInt(o[3],16),g:parseInt(o[2],16),r:parseInt(o[1],16)}:void 0}}function U(t,e,i=!0){var o,s,n;if(void 0===t)return;const a="string"==typeof t?{value:t}:t;let r;if("string"==typeof a.value)r=a.value===Lt.randomColorValue?at():X(a.value);else if(a.value instanceof Array){r=U({value:R(a.value,e,i)})}else{const t=a.value,e=null!==(o=t.rgb)&&void 0!==o?o:a.value;if(void 0!==e.r)r=e;else{const e=null!==(s=t.hsl)&&void 0!==s?s:a.value;if(void 0!==e.h&&void 0!==e.l)r=Y(e);else{const e=null!==(n=t.hsv)&&void 0!==n?n:a.value;void 0!==e.h&&void 0!==e.v&&(r=it(e))}}}return r}function $(t,e,i=!0){const o=U(t,e,i);return void 0!==o?N(o):void 0}function N(t){const e=t.r/255,i=t.g/255,o=t.b/255,s=Math.max(e,i,o),n=Math.min(e,i,o),a={h:0,l:(s+n)/2,s:0};return s!=n&&(a.s=a.l<.5?(s-n)/(s+n):(s-n)/(2-s-n),a.h=e===s?(i-o)/(s-n):a.h=i===s?2+(o-e)/(s-n):4+(e-i)/(s-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a}function J(t){var e;return null===(e=G(t))||void 0===e?void 0:e.a}function X(t){return G(t)}function Y(t){const e={b:0,g:0,r:0},i={h:t.h/360,l:t.l/100,s:t.s/100};if(0===i.s)e.b=i.l,e.g=i.l,e.r=i.l;else{const t=i.l<.5?i.l*(1+i.s):i.l+i.s-i.l*i.s,o=2*i.l-t;e.r=j(o,t,i.h+1/3),e.g=j(o,t,i.h),e.b=j(o,t,i.h-1/3)}return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function Q(t){const e=Y(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Z(t){const e=t.l/100,i=e+t.s/100*Math.min(e,1-e),o=i?2*(1-e/i):0;return{h:t.h,s:100*o,v:100*i}}function K(t){const e=Z(t);return{a:t.a,h:e.h,s:e.s,v:e.v}}function tt(t){const e=t.v/100,i=e*(1-t.s/100/2),o=0===i||1===i?0:(e-i)/Math.min(i,1-i);return{h:t.h,l:100*i,s:100*o}}function et(t){const e=tt(t);return{a:t.a,h:e.h,l:e.l,s:e.s}}function it(t){const e={b:0,g:0,r:0},i=t.h/60,o=t.s/100,s=t.v/100,n=s*o,a=n*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:n,g:a,b:0}:i>1&&i<=2?r={r:a,g:n,b:0}:i>2&&i<=3?r={r:0,g:n,b:a}:i>3&&i<=4?r={r:0,g:a,b:n}:i>4&&i<=5?r={r:a,g:0,b:n}:i>5&&i<=6&&(r={r:n,g:0,b:a}),r){const t=s-n;e.r=Math.floor(255*(r.r+t)),e.g=Math.floor(255*(r.g+t)),e.b=Math.floor(255*(r.b+t))}return e}function ot(t){const e=it(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function st(t){const e={r:t.r/255,g:t.g/255,b:t.b/255},i=Math.max(e.r,e.g,e.b),o=i-Math.min(e.r,e.g,e.b);let s=0;i===e.r?s=(e.g-e.b)/o*60:i===e.g?s=60*(2+(e.b-e.r)/o):i===e.b&&(s=60*(4+(e.r-e.g)/o));return{h:s,s:100*(i?o/i:0),v:100*i}}function nt(t){const e=st(t);return{a:t.a,h:e.h,s:e.s,v:e.v}}function at(t){const e=null!=t?t:0;return{b:Math.floor(h(f(e,256))),g:Math.floor(h(f(e,256))),r:Math.floor(h(f(e,256)))}}function rt(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=e?e:1})`}function lt(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${null!=e?e:1})`}function ct(t,e){return lt(tt(t),e)}function dt(t,e,i,o){let s=t,n=e;return void 0===s.r&&(s=Y(t)),void 0===n.r&&(n=Y(e)),{b:d(s.b,n.b,i,o),g:d(s.g,n.g,i,o),r:d(s.r,n.r,i,o)}}function ht(t,e,i){var o,s;if(i===Lt.randomColorValue)return at();if("mid"!==i)return i;{const i=null!==(o=t.getFillColor())&&void 0!==o?o:t.getStrokeColor(),n=null!==(s=null==e?void 0:e.getFillColor())&&void 0!==s?s:null==e?void 0:e.getStrokeColor();if(i&&n&&e)return dt(i,n,t.getRadius(),e.getRadius());{const t=null!=i?i:n;if(t)return Y(t)}}}function ut(t,e,i){const o="string"==typeof t?t:t.value;return o===Lt.randomColorValue?i?U({value:o}):e?Lt.randomColorValue:Lt.midColorValue:U({value:o})}function pt(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function vt(t,e,i){const o={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(ft(o.h,e.h,i),ft(o.s,e.s,i),ft(o.l,e.l,i)),o}function ft(t,e,i){if(t.enable=e.enable,t.enable){if(t.velocity=u(e.speed)/100*i,e.sync)return;t.status=0,t.velocity*=Math.random(),t.value&&(t.value*=Math.random())}else t.velocity=0}function yt(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function mt(t,e,i){t.save(),t.fillStyle=null!=i?i:"rgba(0,0,0,0)",t.fillRect(0,0,e.width,e.height),t.restore()}function bt(t,e){t.clearRect(0,0,e.width,e.height)}function gt(t,e,i,o,s,n,a,r,l,c,d,h){let u=!1;if(b(i,o)<=s)yt(t,i,o),u=!0;else if(a){let e,a;const r=m(i,{x:o.x-n.width,y:o.y});if(r.distance<=s){const t=i.y-r.dy/r.dx*i.x;e={x:0,y:t},a={x:n.width,y:t}}else{const t=m(i,{x:o.x,y:o.y-n.height});if(t.distance<=s){const o=-(i.y-t.dy/t.dx*i.x)/(t.dy/t.dx);e={x:o,y:0},a={x:o,y:n.height}}else{const t=m(i,{x:o.x-n.width,y:o.y-n.height});if(t.distance<=s){const o=i.y-t.dy/t.dx*i.x;e={x:-o/(t.dy/t.dx),y:o},a={x:e.x+n.width,y:e.y+n.height}}}}e&&a&&(yt(t,i,e),yt(t,o,a),u=!0)}if(u){if(t.lineWidth=e,r&&(t.globalCompositeOperation=l),t.strokeStyle=rt(c,d),h.enable){const e=U(h.color);e&&(t.shadowBlur=h.blur,t.shadowColor=rt(e))}t.stroke()}}function wt(t,e,i,o,s,n,a,r){!function(t,e,i,o){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(o.x,o.y),t.closePath()}(t,e,i,o),s&&(t.globalCompositeOperation=n),t.fillStyle=rt(a,r),t.fill()}function xt(t,e,i,o,s){t.save(),yt(t,o,s),t.lineWidth=e,t.strokeStyle=i,t.stroke(),t.restore()}function kt(t,e,i,o){const s=Math.floor(i.getRadius()/e.getRadius()),n=e.getFillColor(),a=i.getFillColor();if(!n||!a)return;const r=e.getPosition(),l=i.getPosition(),c=dt(n,a,e.getRadius(),i.getRadius()),d=t.createLinearGradient(r.x,r.y,l.x,l.y);return d.addColorStop(0,lt(n,o)),d.addColorStop(s>1?1:s,rt(c,o)),d.addColorStop(1,lt(a,o)),d}function Pt(t,e,i,o,s,n){t.save(),yt(t,i,o),t.strokeStyle=rt(s,n),t.lineWidth=e,t.stroke(),t.restore()}function Mt(t,e,i,o,s,n,a,r,l,c,d,h){var u,p,v,f,y,m;const b=i.getPosition(),g=i.options.tilt,w=i.options.roll;if(e.save(),g.enable||w.enable){const t=w.enable&&i.roll,o=g.enable&&i.tilt,s=t&&("horizontal"===w.mode||"both"===w.mode),n=t&&("vertical"===w.mode||"both"===w.mode);e.setTransform(s?Math.cos(i.roll.angle):1,o?Math.cos(i.tilt.value)*i.tilt.cosDirection:0,o?Math.sin(i.tilt.value)*i.tilt.sinDirection:0,n?Math.sin(i.roll.angle):1,b.x,b.y)}else e.translate(b.x,b.y);e.beginPath();const x=(null!==(p=null===(u=i.rotate)||void 0===u?void 0:u.value)&&void 0!==p?p:0)+(i.options.rotate.path?i.velocity.angle:0);0!==x&&e.rotate(x),a&&(e.globalCompositeOperation=r);const k=i.shadowColor;if(d.enable&&k&&(e.shadowBlur=d.blur,e.shadowColor=rt(k),e.shadowOffsetX=d.offset.x,e.shadowOffsetY=d.offset.y),h){const t=h.angle.value,i="radial"===h.type?e.createRadialGradient(0,0,0,0,0,l):e.createLinearGradient(Math.cos(t)*-l,Math.sin(t)*-l,Math.cos(t)*l,Math.sin(t)*l);for(const t of h.colors)i.addColorStop(t.stop,lt({h:t.value.h.value,s:t.value.s.value,l:t.value.l.value},null!==(f=null===(v=t.opacity)||void 0===v?void 0:v.value)&&void 0!==f?f:c));e.fillStyle=i}else s&&(e.fillStyle=s);const P=i.stroke;e.lineWidth=null!==(y=i.strokeWidth)&&void 0!==y?y:0,n&&(e.strokeStyle=n),zt(t,e,i,l,c,o),(null!==(m=null==P?void 0:P.width)&&void 0!==m?m:0)>0&&e.stroke(),i.close&&e.closePath(),i.fill&&e.fill(),e.restore(),e.save(),g.enable&&i.tilt?e.setTransform(1,Math.cos(i.tilt.value)*i.tilt.cosDirection,Math.sin(i.tilt.value)*i.tilt.sinDirection,1,b.x,b.y):e.translate(b.x,b.y),0!==x&&e.rotate(x),a&&(e.globalCompositeOperation=r),Ct(t,e,i,l,c,o),e.restore()}function zt(t,e,i,o,s,n){if(!i.shape)return;const a=t.drawers.get(i.shape);a&&a.draw(e,i,o,s,n,t.retina.pixelRatio)}function Ct(t,e,i,o,s,n){if(!i.shape)return;const a=t.drawers.get(i.shape);(null==a?void 0:a.afterEffect)&&a.afterEffect(e,i,o,s,n,t.retina.pixelRatio)}function Tt(t,e,i){e.draw&&(t.save(),e.draw(t,i),t.restore())}function Et(t,e,i,o){void 0!==e.drawParticle&&(t.save(),e.drawParticle(t,i,o),t.restore())}function St(t,e,i,o,s,n,a,r,l){const c=e.getPosition();if(i&&(t.strokeStyle=lt(i,s)),0===n)return;t.lineWidth=n;const d=a*Math.PI/180;t.beginPath(),t.ellipse(c.x,c.y,o/2,2*o,d,r,l),t.stroke()}function Ot(t,e,i){return{h:t.h,s:t.s,l:t.l+("darken"===e?-1:1)*i}}r.r(l),r.d(l,{Canvas:function(){return Kt},Circle:function(){return At},CircleWarp:function(){return Dt},Constants:function(){return Lt},Container:function(){return ro},Engine:function(){return mo},EventListeners:function(){return qt},ExternalInteractorBase:function(){return _t},FrameManager:function(){return Ft},InteractionManager:function(){return jt},Loader:function(){return uo},Main:function(){return mo},Particle:function(){return Zi},Particles:function(){return io},ParticlesInteractorBase:function(){return Gt},ParticlesMover:function(){return Ut},Plugins:function(){return Jt},Point:function(){return Xt},QuadTree:function(){return Yt},Range:function(){return Rt},Rectangle:function(){return It},Retina:function(){return oo},Vector:function(){return Qt},Vector3d:function(){return Zt},alterHsl:function(){return Ot},animate:function(){return C},areBoundsInside:function(){return I},arrayRandomIndex:function(){return O},calcEasing:function(){return k},calculateBounds:function(){return D},cancelAnimation:function(){return T},circleBounce:function(){return B},circleBounceDataFromParticle:function(){return V},clamp:function(){return c},clear:function(){return bt},collisionVelocity:function(){return x},colorMix:function(){return dt},colorToHsl:function(){return $},colorToRgb:function(){return U},deepExtend:function(){return L},divMode:function(){return F},divModeExecute:function(){return q},drawConnectLine:function(){return xt},drawEllipse:function(){return St},drawGrabLine:function(){return Pt},drawLinkLine:function(){return gt},drawLinkTriangle:function(){return wt},drawParticle:function(){return Mt},drawParticlePlugin:function(){return Et},drawPlugin:function(){return Tt},drawShape:function(){return zt},drawShapeAfterEffect:function(){return Ct},getDistance:function(){return b},getDistances:function(){return m},getHslAnimationFromHsl:function(){return vt},getHslFromAnimation:function(){return pt},getLinkColor:function(){return ht},getLinkRandomColor:function(){return ut},getParticleBaseVelocity:function(){return w},getParticleDirectionAngle:function(){return g},getRandomRgbColor:function(){return at},getRangeMax:function(){return v},getRangeMin:function(){return p},getRangeValue:function(){return u},getStyleFromHsl:function(){return lt},getStyleFromHsv:function(){return ct},getStyleFromRgb:function(){return rt},getValue:function(){return y},gradient:function(){return kt},hslToHsv:function(){return Z},hslToRgb:function(){return Y},hslaToHsva:function(){return K},hslaToRgba:function(){return Q},hsvToHsl:function(){return tt},hsvToRgb:function(){return it},hsvaToHsla:function(){return et},hsvaToRgba:function(){return ot},isDivModeEnabled:function(){return H},isInArray:function(){return E},isPointInside:function(){return A},isSsr:function(){return z},itemFromArray:function(){return R},loadFont:function(){return S},mix:function(){return d},pJSDom:function(){return sn},paintBase:function(){return mt},particlesJS:function(){return on},randomInRange:function(){return h},rectBounce:function(){return W},rgbToHsl:function(){return N},rgbToHsv:function(){return st},rgbaToHsva:function(){return nt},setRangeValue:function(){return f},singleDivModeExecute:function(){return _},stringToAlpha:function(){return J},stringToRgb:function(){return X},tsParticles:function(){return en}});class Rt{constructor(t,e){this.position={x:t,y:e}}}class At extends Rt{constructor(t,e,i){super(t,e),this.radius=i}contains(t){return b(t,this.position)<=this.radius}intersects(t){const e=t,i=t,o=this.position,s=t.position,n=Math.abs(s.x-o.x),a=Math.abs(s.y-o.y),r=this.radius;if(void 0!==i.radius){return r+i.radius>Math.sqrt(n*n+a+a)}if(void 0!==e.size){const t=e.size.width,i=e.size.height,o=Math.pow(n-t,2)+Math.pow(a-i,2);return!(n>r+t||a>r+i)&&(n<=t||a<=i||o<=r*r)}return!1}}class It extends Rt{constructor(t,e,i,o){super(t,e),this.size={height:o,width:i}}contains(t){const e=this.size.width,i=this.size.height,o=this.position;return t.x>=o.x&&t.x<=o.x+e&&t.y>=o.y&&t.y<=o.y+i}intersects(t){const e=t,i=t,o=this.size.width,s=this.size.height,n=this.position,a=t.position;if(void 0!==i.radius)return i.intersects(this);if(void 0!==e.size){const t=e.size,i=t.width,r=t.height;return a.x<n.x+o&&a.x+i>n.x&&a.y<n.y+s&&a.y+r>n.y}return!1}}class Dt extends At{constructor(t,e,i,o){super(t,e,i),this.canvasSize=o,this.canvasSize={height:o.height,width:o.width}}contains(t){if(super.contains(t))return!0;const e={x:t.x-this.canvasSize.width,y:t.y};if(super.contains(e))return!0;const i={x:t.x-this.canvasSize.width,y:t.y-this.canvasSize.height};if(super.contains(i))return!0;const o={x:t.x,y:t.y-this.canvasSize.height};return super.contains(o)}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,o={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new At(o.x,o.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new It(o.x,o.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class Lt{}function Ht(t,e,i,o,s){if(o){let o={passive:!0};"boolean"==typeof s?o.capture=s:void 0!==s&&(o=s),t.addEventListener(e,i,o)}else{const o=s;t.removeEventListener(e,i,o)}}Lt.generatedAttribute="generated",Lt.randomColorValue="random",Lt.midColorValue="mid",Lt.touchEndEvent="touchend",Lt.mouseDownEvent="mousedown",Lt.mouseUpEvent="mouseup",Lt.mouseMoveEvent="mousemove",Lt.touchStartEvent="touchstart",Lt.touchMoveEvent="touchmove",Lt.mouseLeaveEvent="mouseleave",Lt.mouseOutEvent="mouseout",Lt.touchCancelEvent="touchcancel",Lt.resizeEvent="resize",Lt.visibilityChangeEvent="visibilitychange",Lt.noPolygonDataLoaded="No polygon data loaded.",Lt.noPolygonFound="No polygon found, you need to specify SVG url in config.";class qt{constructor(t){this.container=t,this.canPush=!0,this.mouseMoveHandler=t=>this.mouseTouchMove(t),this.touchStartHandler=t=>this.mouseTouchMove(t),this.touchMoveHandler=t=>this.mouseTouchMove(t),this.touchEndHandler=()=>this.mouseTouchFinish(),this.mouseLeaveHandler=()=>this.mouseTouchFinish(),this.touchCancelHandler=()=>this.mouseTouchFinish(),this.touchEndClickHandler=t=>this.mouseTouchClick(t),this.mouseUpHandler=t=>this.mouseTouchClick(t),this.mouseDownHandler=()=>this.mouseDown(),this.visibilityChangeHandler=()=>this.handleVisibilityChange(),this.themeChangeHandler=t=>this.handleThemeChange(t),this.oldThemeChangeHandler=t=>this.handleThemeChange(t),this.resizeHandler=()=>this.handleWindowResize()}addListeners(){this.manageListeners(!0)}removeListeners(){this.manageListeners(!1)}manageListeners(t){var e;const i=this.container,o=i.actualOptions,s=o.interactivity.detectsOn;let n=Lt.mouseLeaveEvent;if("window"===s)i.interactivity.element=window,n=Lt.mouseOutEvent;else if("parent"===s&&i.canvas.element){const t=i.canvas.element;i.interactivity.element=null!==(e=t.parentElement)&&void 0!==e?e:t.parentNode}else i.interactivity.element=i.canvas.element;const a=!z()&&"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: dark)");a&&(void 0!==a.addEventListener?Ht(a,"change",this.themeChangeHandler,t):void 0!==a.addListener&&(t?a.addListener(this.oldThemeChangeHandler):a.removeListener(this.oldThemeChangeHandler)));const r=i.interactivity.element;if(!r)return;const l=r;(o.interactivity.events.onHover.enable||o.interactivity.events.onClick.enable)&&(Ht(r,Lt.mouseMoveEvent,this.mouseMoveHandler,t),Ht(r,Lt.touchStartEvent,this.touchStartHandler,t),Ht(r,Lt.touchMoveEvent,this.touchMoveHandler,t),o.interactivity.events.onClick.enable?(Ht(r,Lt.touchEndEvent,this.touchEndClickHandler,t),Ht(r,Lt.mouseUpEvent,this.mouseUpHandler,t),Ht(r,Lt.mouseDownEvent,this.mouseDownHandler,t)):Ht(r,Lt.touchEndEvent,this.touchEndHandler,t),Ht(r,n,this.mouseLeaveHandler,t),Ht(r,Lt.touchCancelEvent,this.touchCancelHandler,t)),i.canvas.element&&(i.canvas.element.style.pointerEvents=l===i.canvas.element?"initial":"none"),o.interactivity.events.resize&&("undefined"!=typeof ResizeObserver?this.resizeObserver&&!t?(i.canvas.element&&this.resizeObserver.unobserve(i.canvas.element),this.resizeObserver.disconnect(),delete this.resizeObserver):!this.resizeObserver&&t&&i.canvas.element&&(this.resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===i.canvas.element))&&this.handleWindowResize()})),this.resizeObserver.observe(i.canvas.element)):Ht(window,Lt.resizeEvent,this.resizeHandler,t)),document&&Ht(document,Lt.visibilityChangeEvent,this.visibilityChangeHandler,t,!1)}handleWindowResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),delete this.resizeTimeout),this.resizeTimeout=setTimeout((async()=>{var t;return await(null===(t=this.container.canvas)||void 0===t?void 0:t.windowResize())}),500)}handleVisibilityChange(){const t=this.container,e=t.actualOptions;this.mouseTouchFinish(),e.pauseOnBlur&&((null===document||void 0===document?void 0:document.hidden)?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.getAnimationStatus()?t.play(!0):t.draw(!0)))}mouseDown(){const t=this.container.interactivity;if(t){const e=t.mouse;e.clicking=!0,e.downPosition=e.position}}mouseTouchMove(t){var e,i,o,s,n,a,r;const l=this.container,c=l.actualOptions;if(void 0===(null===(e=l.interactivity)||void 0===e?void 0:e.element))return;let d;l.interactivity.mouse.inside=!0;const h=l.canvas.element;if(t.type.startsWith("mouse")){this.canPush=!0;const e=t;if(l.interactivity.element===window){if(h){const t=h.getBoundingClientRect();d={x:e.clientX-t.left,y:e.clientY-t.top}}}else if("parent"===c.interactivity.detectsOn){const t=e.target,s=e.currentTarget,n=l.canvas.element;if(t&&s&&n){const i=t.getBoundingClientRect(),o=s.getBoundingClientRect(),a=n.getBoundingClientRect();d={x:e.offsetX+2*i.left-(o.left+a.left),y:e.offsetY+2*i.top-(o.top+a.top)}}else d={x:null!==(i=e.offsetX)&&void 0!==i?i:e.clientX,y:null!==(o=e.offsetY)&&void 0!==o?o:e.clientY}}else e.target===l.canvas.element&&(d={x:null!==(s=e.offsetX)&&void 0!==s?s:e.clientX,y:null!==(n=e.offsetY)&&void 0!==n?n:e.clientY})}else{this.canPush="touchmove"!==t.type;const e=t,i=e.touches[e.touches.length-1],o=null==h?void 0:h.getBoundingClientRect();d={x:i.clientX-(null!==(a=null==o?void 0:o.left)&&void 0!==a?a:0),y:i.clientY-(null!==(r=null==o?void 0:o.top)&&void 0!==r?r:0)}}const u=l.retina.pixelRatio;d&&(d.x*=u,d.y*=u),l.interactivity.mouse.position=d,l.interactivity.status=Lt.mouseMoveEvent}mouseTouchFinish(){const t=this.container.interactivity;if(void 0===t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Lt.mouseLeaveEvent,e.inside=!1,e.clicking=!1}mouseTouchClick(t){const e=this.container,i=e.actualOptions,o=e.interactivity.mouse;o.inside=!0;let s=!1;const n=o.position;if(void 0!==n&&i.interactivity.events.onClick.enable){for(const[,t]of e.plugins)if(void 0!==t.clickPositionValid&&(s=t.clickPositionValid(n),s))break;s||this.doMouseTouchClick(t),o.clicking=!1}}doMouseTouchClick(t){const e=this.container,i=e.actualOptions;if(this.canPush){const t=e.interactivity.mouse.position;if(!t)return;e.interactivity.mouse.clickPosition={x:t.x,y:t.y},e.interactivity.mouse.clickTime=(new Date).getTime();const o=i.interactivity.events.onClick;if(o.mode instanceof Array)for(const t of o.mode)this.handleClickMode(t);else this.handleClickMode(o.mode)}"touchend"===t.type&&setTimeout((()=>this.mouseTouchFinish()),500)}handleThemeChange(t){const e=t.matches?this.container.options.defaultDarkTheme:this.container.options.defaultLightTheme,i=this.container.options.themes.find((t=>t.name===e));i&&i.default.auto&&this.container.loadTheme(e)}handleClickMode(t){const e=this.container,i=e.actualOptions,o=i.interactivity.modes.push.quantity,s=i.interactivity.modes.remove.quantity;switch(t){case"push":if(o>0){const t=R([void 0,...i.interactivity.modes.push.groups]),s=void 0!==t?e.actualOptions.particles.groups[t]:void 0;e.particles.push(o,e.interactivity.mouse,s,t)}break;case"remove":e.particles.removeQuantity(s);break;case"bubble":e.bubble.clicking=!0;break;case"repulse":e.repulse.clicking=!0,e.repulse.count=0;for(const t of e.repulse.particles)t.velocity.setTo(t.initialVelocity);e.repulse.particles=[],e.repulse.finish=!1,setTimeout((()=>{e.destroyed||(e.repulse.clicking=!1)}),1e3*i.interactivity.modes.repulse.duration);break;case"attract":e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout((()=>{e.destroyed||(e.attract.clicking=!1)}),1e3*i.interactivity.modes.attract.duration);break;case"pause":e.getAnimationStatus()?e.pause():e.play()}for(const[,i]of e.plugins)i.handleClickMode&&i.handleClickMode(t)}}class _t{constructor(t){this.container=t,this.type=0}}class Ft{constructor(t){this.container=t}async nextFrame(t){var e;try{const i=this.container;if(void 0!==i.lastFrameTime&&t<i.lastFrameTime+1e3/i.fpsLimit)return void i.draw(!1);null!==(e=i.lastFrameTime)&&void 0!==e||(i.lastFrameTime=t);const o=t-i.lastFrameTime,s={value:o,factor:60*o/1e3};if(i.lifeTime+=s.value,i.lastFrameTime=t,o>1e3)return void i.draw(!1);if(await i.particles.draw(s),i.duration>0&&i.lifeTime>i.duration)return void i.destroy();i.getAnimationStatus()&&i.draw(!1)}catch(t){console.error("tsParticles error in animation loop",t)}}}var Vt,Bt=function(t,e,i,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,i):s?s.value=i:e.set(t,i),i},Wt=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)};class jt{constructor(t,e){this.container=e,Vt.set(this,void 0),Bt(this,Vt,t,"f"),this.externalInteractors=[],this.particleInteractors=[],this.init()}init(){const t=Wt(this,Vt,"f").plugins.getInteractors(this.container,!0);this.externalInteractors=[],this.particleInteractors=[];for(const e of t)switch(e.type){case 0:this.externalInteractors.push(e);break;case 1:this.particleInteractors.push(e)}}async externalInteract(t){for(const e of this.externalInteractors)e.isEnabled()&&await e.interact(t)}async particlesInteract(t,e){for(const e of this.externalInteractors)e.reset(t);for(const i of this.particleInteractors)i.isEnabled(t)&&await i.interact(t,e)}}Vt=new WeakMap;class Gt{constructor(t){this.container=t,this.type=1}}class Ut{constructor(t){this.container=t}move(t,e){t.destroyed||(this.moveParticle(t,e),this.moveParallax(t))}moveParticle(t,e){var i,o,s,n,a;const r=t.options,l=r.move;if(!l.enable)return;const c=this.container,d=this.getProximitySpeedFactor(t),h=(null!==(i=(n=t.retina).moveSpeed)&&void 0!==i?i:n.moveSpeed=u(l.speed)*c.retina.pixelRatio)*c.retina.reduceFactor,p=null!==(o=(a=t.retina).moveDrift)&&void 0!==o?o:a.moveDrift=u(t.options.move.drift)*c.retina.pixelRatio,f=v(r.size.value)*c.retina.pixelRatio,y=h*((l.size?t.getRadius()/f:1)*d*(e.factor||1)/2);this.applyPath(t,e);const b=t.gravity,g=b.enable&&b.inverse?-1:1;b.enable&&y&&(t.velocity.y+=g*(b.acceleration*e.factor)/(60*y)),p&&y&&(t.velocity.x+=p*e.factor/(60*y));const w=t.moveDecay;1!=w&&t.velocity.multTo(w);const x=t.velocity.mult(y),k=null!==(s=t.retina.maxSpeed)&&void 0!==s?s:c.retina.maxSpeed;b.enable&&k>0&&(!b.inverse&&x.y>=0&&x.y>=k||b.inverse&&x.y<=0&&x.y<=-k)&&(x.y=g*k,y&&(t.velocity.y=x.y/y));const P=t.options.zIndex,M=(1-t.zIndexFactor)**P.velocityRate;l.spin.enable?this.spin(t,y):(1!=M&&x.multTo(M),t.position.addTo(x),l.vibrate&&(t.position.x+=Math.sin(t.position.x*Math.cos(t.position.y)),t.position.y+=Math.cos(t.position.y*Math.sin(t.position.x)))),function(t){const e=t.initialPosition,{dx:i,dy:o}=m(e,t.position),s=Math.abs(i),n=Math.abs(o),a=t.retina.maxDistance.horizontal,r=t.retina.maxDistance.vertical;if(a||r)if((a&&s>=a||r&&n>=r)&&!t.misplaced)t.misplaced=!!a&&s>a||!!r&&n>r,a&&(t.velocity.x=t.velocity.y/2-t.velocity.x),r&&(t.velocity.y=t.velocity.x/2-t.velocity.y);else if((!a||s<a)&&(!r||n<r)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,o=t.velocity;a&&(i.x<e.x&&o.x<0||i.x>e.x&&o.x>0)&&(o.x*=-Math.random()),r&&(i.y<e.y&&o.y<0||i.y>e.y&&o.y>0)&&(o.y*=-Math.random())}}(t)}spin(t,e){const i=this.container;if(!t.spin)return;const o={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*o.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*o.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const s=Math.max(i.canvas.size.width,i.canvas.size.height);t.spin.radius>s/2?(t.spin.radius=s/2,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=e/100*(1-t.spin.radius/s)}applyPath(t,e){const i=t.options.move.path;if(!i.enable)return;const o=this.container;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const s=o.pathGenerator.generate(t);t.velocity.addTo(s),i.clamp&&(t.velocity.x=c(t.velocity.x,-1,1),t.velocity.y=c(t.velocity.y,-1,1)),t.lastPathTime-=t.pathDelay}moveParallax(t){const e=this.container,i=e.actualOptions;if(z()||!i.interactivity.events.onHover.parallax.enable)return;const o=i.interactivity.events.onHover.parallax.force,s=e.interactivity.mouse.position;if(!s)return;const n=e.canvas.size.width/2,a=e.canvas.size.height/2,r=i.interactivity.events.onHover.parallax.smooth,l=t.getRadius()/o,c=(s.x-n)*l,d=(s.y-a)*l;t.offset.x+=(c-t.offset.x)/r,t.offset.y+=(d-t.offset.y)/r}getProximitySpeedFactor(t){const e=this.container,i=e.actualOptions;if(!E("slow",i.interactivity.events.onHover.mode))return 1;const o=this.container.interactivity.mouse.position;if(!o)return 1;const s=b(o,t.getPosition()),n=e.retina.slowModeRadius;if(s>n)return 1;return(s/n||0)/i.interactivity.modes.slow.factor}}var $t,Nt=function(t,e,i,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,i):s?s.value=i:e.set(t,i),i};class Jt{constructor(t){$t.set(this,void 0),Nt(this,$t,t,"f"),this.plugins=[],this.interactorsInitializers=new Map,this.updatersInitializers=new Map,this.interactors=new Map,this.updaters=new Map,this.presets=new Map,this.drawers=new Map,this.pathGenerators=new Map}getPlugin(t){return this.plugins.find((e=>e.id===t))}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,i.getPlugin(t));return e}loadOptions(t,e){for(const i of this.plugins)i.loadOptions(t,e)}getPreset(t){return this.presets.get(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShapeDrawer(t,e){this.getShapeDrawer(t)||this.drawers.set(t,e)}getShapeDrawer(t){return this.drawers.get(t)}getSupportedShapes(){return this.drawers.keys()}getPathGenerator(t){return this.pathGenerators.get(t)}addPathGenerator(t,e){this.getPathGenerator(t)||this.pathGenerators.set(t,e)}getInteractors(t,e=!1){let i=this.interactors.get(t);return i&&!e||(i=[...this.interactorsInitializers.values()].map((e=>e(t))),this.interactors.set(t,i)),i}addInteractor(t,e){this.interactorsInitializers.set(t,e)}getUpdaters(t,e=!1){let i=this.updaters.get(t);return i&&!e||(i=[...this.updatersInitializers.values()].map((e=>e(t))),this.updaters.set(t,i)),i}addParticleUpdater(t,e){this.updatersInitializers.set(t,e)}}$t=new WeakMap;class Xt{constructor(t,e){this.position=t,this.particle=e}}class Yt{constructor(t,e){this.rectangle=t,this.capacity=e,this.points=[],this.divided=!1}subdivide(){const t=this.rectangle.position.x,e=this.rectangle.position.y,i=this.rectangle.size.width,o=this.rectangle.size.height,s=this.capacity;this.northEast=new Yt(new It(t,e,i/2,o/2),s),this.northWest=new Yt(new It(t+i/2,e,i/2,o/2),s),this.southEast=new Yt(new It(t,e+o/2,i/2,o/2),s),this.southWest=new Yt(new It(t+i/2,e+o/2,i/2,o/2),s),this.divided=!0}insert(t){var e,i,o,s,n;return!!this.rectangle.contains(t.position)&&(this.points.length<this.capacity?(this.points.push(t),!0):(this.divided||this.subdivide(),null!==(n=(null===(e=this.northEast)||void 0===e?void 0:e.insert(t))||(null===(i=this.northWest)||void 0===i?void 0:i.insert(t))||(null===(o=this.southEast)||void 0===o?void 0:o.insert(t))||(null===(s=this.southWest)||void 0===s?void 0:s.insert(t)))&&void 0!==n&&n))}queryCircle(t,e){return this.query(new At(t.x,t.y,e))}queryCircleWarp(t,e,i){const o=i,s=i;return this.query(new Dt(t.x,t.y,e,void 0!==o.canvas?o.canvas.size:s))}queryRectangle(t,e){return this.query(new It(t.x,t.y,e.width,e.height))}query(t,e){var i,o,s,n;const a=null!=e?e:[];if(!t.intersects(this.rectangle))return[];for(const e of this.points)!t.contains(e.position)&&b(t.position,e.position)>e.particle.getRadius()||a.push(e.particle);return this.divided&&(null===(i=this.northEast)||void 0===i||i.query(t,a),null===(o=this.northWest)||void 0===o||o.query(t,a),null===(s=this.southEast)||void 0===s||s.query(t,a),null===(n=this.southWest)||void 0===n||n.query(t,a)),a}}class Qt{constructor(t,e){let i,o;if(void 0===e){if("number"==typeof t)throw new Error("tsParticles - Vector not initialized correctly");const e=t;[i,o]=[e.x,e.y]}else[i,o]=[t,e];this.x=i,this.y=o}static clone(t){return Qt.create(t.x,t.y)}static create(t,e){return new Qt(t,e)}static get origin(){return Qt.create(0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.x**2+this.y**2)}set length(t){this.updateFromAngle(this.angle,t)}add(t){return Qt.create(this.x+t.x,this.y+t.y)}addTo(t){this.x+=t.x,this.y+=t.y}sub(t){return Qt.create(this.x-t.x,this.y-t.y)}subFrom(t){this.x-=t.x,this.y-=t.y}mult(t){return Qt.create(this.x*t,this.y*t)}multTo(t){this.x*=t,this.y*=t}div(t){return Qt.create(this.x/t,this.y/t)}divTo(t){this.x/=t,this.y/=t}distanceTo(t){return this.sub(t).length}getLengthSq(){return this.x**2+this.y**2}distanceToSq(t){return this.sub(t).getLengthSq()}manhattanDistanceTo(t){return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}copy(){return Qt.clone(this)}setTo(t){this.x=t.x,this.y=t.y}rotate(t){return Qt.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t))}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class Zt extends Qt{constructor(t,e,i){super(t,e),this.z=void 0===i?t.z:i}static clone(t){return Zt.create(t.x,t.y,t.z)}static create(t,e,i){return new Zt(t,e,i)}add(t){return t instanceof Zt?Zt.create(this.x+t.x,this.y+t.y,this.z+t.z):super.add(t)}addTo(t){super.addTo(t),t instanceof Zt&&(this.z+=t.z)}sub(t){return t instanceof Zt?Zt.create(this.x-t.x,this.y-t.y,this.z-t.z):super.sub(t)}subFrom(t){super.subFrom(t),t instanceof Zt&&(this.z-=t.z)}mult(t){return Zt.create(this.x*t,this.y*t,this.z*t)}multTo(t){super.multTo(t),this.z*=t}div(t){return Zt.create(this.x/t,this.y/t,this.z/t)}divTo(t){super.divTo(t),this.z/=t}copy(){return Zt.clone(this)}setTo(t){super.setTo(t),t instanceof Zt&&(this.z=t.z)}}class Kt{constructor(t){this.container=t,this.size={height:0,width:0},this.context=null,this.generatedCanvas=!1}init(){this.resize(),this.initStyle(),this.initCover(),this.initTrail(),this.initBackground(),this.paint()}loadCanvas(t){var e;this.generatedCanvas&&(null===(e=this.element)||void 0===e||e.remove()),this.generatedCanvas=t.dataset&&Lt.generatedAttribute in t.dataset?"true"===t.dataset[Lt.generatedAttribute]:this.generatedCanvas,this.element=t,this.originalStyle=L({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this.context=this.element.getContext("2d"),this.container.retina.init(),this.initBackground()}destroy(){var t;this.generatedCanvas&&(null===(t=this.element)||void 0===t||t.remove()),this.draw((t=>{bt(t,this.size)}))}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(bt(e,this.size),this.paintBase(this.coverColorStyle)):this.paintBase()}))}clear(){const t=this.container.actualOptions,e=t.particles.move.trail;t.backgroundMask.enable?this.paint():e.enable&&e.length>0&&this.trailFillColor?this.paintBase(rt(this.trailFillColor,1/e.length)):this.draw((t=>{bt(t,this.size)}))}async windowResize(){if(!this.element)return;const t=this.container;this.resize();const e=t.updateActualOptions();t.particles.setDensity();for(const[,e]of t.plugins)void 0!==e.resize&&e.resize();e&&await t.refresh()}resize(){if(!this.element)return;const t=this.container,e=t.retina.pixelRatio,i=t.canvas.size,o=Object.assign({},i);i.width=this.element.offsetWidth*e,i.height=this.element.offsetHeight*e,this.element.width=i.width,this.element.height=i.height,this.container.started&&(this.resizeFactor={width:i.width/o.width,height:i.height/o.height})}drawConnectLine(t,e){this.draw((i=>{var o;const s=this.lineStyle(t,e);if(!s)return;const n=t.getPosition(),a=e.getPosition();xt(i,null!==(o=t.retina.linksWidth)&&void 0!==o?o:this.container.retina.linksWidth,s,n,a)}))}drawGrabLine(t,e,i,o){const s=this.container;this.draw((n=>{var a;const r=t.getPosition();Pt(n,null!==(a=t.retina.linksWidth)&&void 0!==a?a:s.retina.linksWidth,r,o,e,i)}))}drawParticle(t,e){var i,o,s,n,a,r;if(t.spawning||t.destroyed)return;const l=t.getFillColor(),c=null!==(i=t.getStrokeColor())&&void 0!==i?i:l;if(!l&&!c)return;let[d,h]=this.getPluginParticleColors(t);const p=t.options.twinkle.particles,v=p.enable&&Math.random()<p.frequency;if(!d||!h){const t=$(p.color);d||(d=v&&void 0!==t?t:l||void 0),h||(h=v&&void 0!==t?t:c||void 0)}const f=this.container.actualOptions,y=t.options.zIndex,m=(1-t.zIndexFactor)**y.opacityRate,b=t.getRadius(),g=v?u(p.opacity):null!==(n=null!==(o=t.bubble.opacity)&&void 0!==o?o:null===(s=t.opacity)||void 0===s?void 0:s.value)&&void 0!==n?n:1,w=null!==(r=null===(a=t.stroke)||void 0===a?void 0:a.opacity)&&void 0!==r?r:g,x=g*m,k=d?lt(d,x):void 0;(k||h)&&this.draw((i=>{const o=(1-t.zIndexFactor)**y.sizeRate,s=h?lt(h,w*m):k;if(b<=0)return;const n=this.container;for(const e of n.particles.updaters)e.beforeDraw&&e.beforeDraw(t);Mt(this.container,i,t,e,k,s,f.backgroundMask.enable,f.backgroundMask.composite,b*o,x,t.options.shadow,t.gradient);for(const e of n.particles.updaters)e.afterDraw&&e.afterDraw(t)}))}drawPlugin(t,e){this.draw((i=>{Tt(i,t,e)}))}drawParticlePlugin(t,e,i){this.draw((o=>{Et(o,t,e,i)}))}initBackground(){const t=this.container.actualOptions.background,e=this.element,i=null==e?void 0:e.style;if(i){if(t.color){const e=U(t.color);i.backgroundColor=e?rt(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}draw(t){if(this.context)return t(this.context)}initCover(){const t=this.container.actualOptions.backgroundMask.cover,e=U(t.color);if(e){const i={r:e.r,g:e.g,b:e.b,a:t.opacity};this.coverColorStyle=rt(i,i.a),console.log(this.coverColorStyle)}}initTrail(){const t=this.container.actualOptions,e=U(t.particles.move.trail.fillColor);if(e){const i=t.particles.move.trail;this.trailFillColor={r:e.r,g:e.g,b:e.b,a:1/i.length}}}getPluginParticleColors(t){let e,i;for(const[,o]of this.container.plugins)if(!e&&o.particleFillColor&&(e=$(o.particleFillColor(t))),!i&&o.particleStrokeColor&&(i=$(o.particleStrokeColor(t))),e&&i)break;return[e,i]}initStyle(){const t=this.element,e=this.container.actualOptions;if(!t)return;const i=this.originalStyle;e.fullScreen.enable?(this.originalStyle=L({},t.style),t.style.setProperty("position","fixed","important"),t.style.setProperty("z-index",e.fullScreen.zIndex.toString(10),"important"),t.style.setProperty("top","0","important"),t.style.setProperty("left","0","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","100%","important")):i&&(t.style.position=i.position,t.style.zIndex=i.zIndex,t.style.top=i.top,t.style.left=i.left,t.style.width=i.width,t.style.height=i.height);for(const i in e.style){if(!i||!e.style)continue;const o=e.style[i];o&&t.style.setProperty(i,o,"important")}}paintBase(t){this.draw((e=>{mt(e,this.size,t)}))}lineStyle(t,e){return this.draw((i=>{const o=this.container.actualOptions.interactivity.modes.connect;return kt(i,t,e,o.links.opacity)}))}}class te{constructor(){this.value="#fff"}static create(t,e){const i=new te;return i.load(t),void 0!==e&&("string"==typeof e||e instanceof Array?i.load({value:e}):i.load(e)),i}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class ee{constructor(){this.color=new te,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){void 0!==t&&(void 0!==t.color&&(this.color=te.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ie{constructor(){this.color=new te,this.opacity=1}load(t){void 0!==t&&(void 0!==t.color&&(this.color=te.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class oe{constructor(){this.composite="destination-out",this.cover=new ie,this.enable=!1}load(t){if(void 0!==t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i="string"==typeof t.cover?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class se{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class ne{constructor(){this.enable=!1,this.mode=[]}load(t){void 0!==t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class ae{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}get elementId(){return this.ids}set elementId(t){this.ids=t}get el(){return this.elementId}set el(t){this.elementId=t}get ids(){return this.selectors instanceof Array?this.selectors.map((t=>t.replace("#",""))):this.selectors.replace("#","")}set ids(t){this.selectors=t instanceof Array?t.map((t=>`#${t}`)):`#${t}`}load(t){var e,i;if(void 0===t)return;const o=null!==(i=null!==(e=t.ids)&&void 0!==e?e:t.elementId)&&void 0!==i?i:t.el;void 0!==o&&(this.ids=o),void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type)}}class re{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){void 0!==t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class le{constructor(){this.enable=!1,this.mode=[],this.parallax=new re}load(t){void 0!==t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class ce{constructor(){this.onClick=new ne,this.onDiv=new ae,this.onHover=new le,this.resize=!0}get onclick(){return this.onClick}set onclick(t){this.onClick=t}get ondiv(){return this.onDiv}set ondiv(t){this.onDiv=t}get onhover(){return this.onHover}set onhover(t){this.onHover=t}load(t){var e,i,o;if(void 0===t)return;this.onClick.load(null!==(e=t.onClick)&&void 0!==e?e:t.onclick);const s=null!==(i=t.onDiv)&&void 0!==i?i:t.ondiv;void 0!==s&&(s instanceof Array?this.onDiv=s.map((t=>{const e=new ae;return e.load(t