"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[1535],{1535:(o,i,s)=>{s.d(i,{loadParticlesCollisionsInteraction:()=>c});var e=s(9201);function t(o,i,s,t,n,a){const d=(0,e.uZ)(o.options.collisions.absorb.speed*n.factor/10,0,t);o.size.value+=d/2,s.size.value-=d,t<=a&&(s.size.value=0,s.destroy())}const n=o=>{void 0===o.collisionMaxSpeed&&(o.collisionMaxSpeed=(0,e.Gu)(o.options.collisions.maxSpeed)),o.velocity.length>o.collisionMaxSpeed&&(o.velocity.length=o.collisionMaxSpeed)};function a(o,i){(0,e.kR)((0,e.gy)(o),(0,e.gy)(i)),n(o),n(i)}function d(o,i,s,e){switch(o.options.collisions.mode){case"absorb":!function(o,i,s,e){const n=o.getRadius(),a=i.getRadius();void 0===n&&void 0!==a?o.destroy():void 0!==n&&void 0===a?i.destroy():void 0!==n&&void 0!==a&&(n>=a?t(o,0,i,a,s,e):t(i,0,o,n,s,e))}(o,i,s,e);break;case"bounce":a(o,i);break;case"destroy":!function(o,i){o.unbreakable||i.unbreakable||a(o,i),void 0===o.getRadius()&&void 0!==i.getRadius()?o.destroy():void 0!==o.getRadius()&&void 0===i.getRadius()?i.destroy():void 0!==o.getRadius()&&void 0!==i.getRadius()&&(o.getRadius()>=i.getRadius()?i:o).destroy()}(o,i)}}class l extends e.$S{constructor(o){super(o)}clear(){}init(){}async interact(o,i){if(o.destroyed||o.spawning)return;const s=this.container,t=o.getPosition(),n=o.getRadius(),a=s.particles.quadTree.queryCircle(t,2*n);for(const l of a){if(o===l||!l.options.collisions.enable||o.options.collisions.mode!==l.options.collisions.mode||l.destroyed||l.spawning)continue;const a=l.getPosition(),c=l.getRadius();Math.abs(Math.round(t.z)-Math.round(a.z))>n+c||((0,e.Sp)(t,a)>n+c||d(o,l,i,s.retina.pixelRatio))}}isEnabled(o){return o.options.collisions.enable}reset(){}}async function c(o,i=!0){await o.addInteractor("particlesCollisions",(o=>new l(o)),i)}}}]);