@tsparticles/interaction-external-bounce 4.0.0-beta.15 → 4.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
2
2
  import { Bouncer } from "./Bouncer.js";
3
3
  export async function loadExternalBounceInteraction(engine) {
4
- engine.checkVersion("4.0.0-beta.15");
4
+ engine.checkVersion("4.0.0-beta.16");
5
5
  await engine.pluginManager.register((e) => {
6
6
  ensureInteractivityPluginLoaded(e);
7
7
  e.pluginManager.addInteractor?.("externalBounce", container => {
@@ -1,5 +1,5 @@
1
1
  export async function loadExternalBounceInteraction(engine) {
2
- engine.checkVersion("4.0.0-beta.15");
2
+ engine.checkVersion("4.0.0-beta.16");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
5
5
  ensureInteractivityPluginLoaded(e);
package/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
2
2
  import { Bouncer } from "./Bouncer.js";
3
3
  export async function loadExternalBounceInteraction(engine) {
4
- engine.checkVersion("4.0.0-beta.15");
4
+ engine.checkVersion("4.0.0-beta.16");
5
5
  await engine.pluginManager.register((e) => {
6
6
  ensureInteractivityPluginLoaded(e);
7
7
  e.pluginManager.addInteractor?.("externalBounce", container => {
package/cjs/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadExternalBounceInteraction(engine) {
2
- engine.checkVersion("4.0.0-beta.15");
2
+ engine.checkVersion("4.0.0-beta.16");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
5
5
  ensureInteractivityPluginLoaded(e);
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
2
2
  import { Bouncer } from "./Bouncer.js";
3
3
  export async function loadExternalBounceInteraction(engine) {
4
- engine.checkVersion("4.0.0-beta.15");
4
+ engine.checkVersion("4.0.0-beta.16");
5
5
  await engine.pluginManager.register((e) => {
6
6
  ensureInteractivityPluginLoaded(e);
7
7
  e.pluginManager.addInteractor?.("externalBounce", container => {
package/esm/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadExternalBounceInteraction(engine) {
2
- engine.checkVersion("4.0.0-beta.15");
2
+ engine.checkVersion("4.0.0-beta.16");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity/lazy");
5
5
  ensureInteractivityPluginLoaded(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-bounce",
3
- "version": "4.0.0-beta.15",
3
+ "version": "4.0.0-beta.16",
4
4
  "description": "tsParticles bounce external interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -101,7 +101,7 @@
101
101
  },
102
102
  "type": "module",
103
103
  "peerDependencies": {
104
- "@tsparticles/engine": "4.0.0-beta.15",
105
- "@tsparticles/plugin-interactivity": "4.0.0-beta.15"
104
+ "@tsparticles/engine": "4.0.0-beta.16",
105
+ "@tsparticles/plugin-interactivity": "4.0.0-beta.16"
106
106
  }
107
107
  }
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* External Interaction v4.0.0-beta.15 */
2
+ /* External Interaction v4.0.0-beta.16 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/plugin-interactivity'), require('@tsparticles/engine')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/plugin-interactivity', '@tsparticles/engine'], factory) :
@@ -195,7 +195,7 @@
195
195
  }
196
196
 
197
197
  async function loadExternalBounceInteraction(engine) {
198
- engine.checkVersion("4.0.0-beta.15");
198
+ engine.checkVersion("4.0.0-beta.16");
199
199
  await engine.pluginManager.register((e) => {
200
200
  pluginInteractivity.ensureInteractivityPluginLoaded(e);
201
201
  e.pluginManager.addInteractor?.("externalBounce", container => {
@@ -1 +1 @@
1
- !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalBounce=t.__tsParticlesInternals.interactions.externalBounce||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,e,s){"use strict";const n=Math.PI*s.half;function a(t,e,a,i,r){const c=t.particles.grid.query(i,r);for(const t of c)i instanceof s.Circle?s.circleBounce(s.circleBounceDataFromParticle(t),{position:e,radius:a,mass:a**2*n,velocity:s.Vector.origin,factor:s.Vector.origin}):i instanceof s.Rectangle&&l(t,s.calculateBounds(e,a))}function i(t,n,i,r){e.divModeExecute(i,n,(n,i)=>{!function(t,n,a,i){const r=s.safeDocument().querySelectorAll(n);r.length&&r.forEach(n=>{const r=n,l=t.retina.pixelRatio,c={x:(r.offsetLeft+r.offsetWidth*s.half)*l,y:(r.offsetTop+r.offsetHeight*s.half)*l},o=r.offsetWidth*s.half*l,_=10*l,u=a.type===e.DivType.circle?new s.Circle(c.x,c.y,o+_):new s.Rectangle(r.offsetLeft*l-_,r.offsetTop*l-_,r.offsetWidth*l+_*s.double,r.offsetHeight*l+_*s.double);i(c,o,u)})}(t,n,i,(e,s,n)=>{a(t,e,s,n,r)})})}function r(t){const e={bounced:!1},{pSide:n,pOtherSide:a,rectSide:i,rectOtherSide:r,velocity:l,factor:c}=t;return a.min<r.min||a.min>r.max||a.max<r.min||a.max>r.max||(n.max>=i.min&&n.max<=(i.max+i.min)*s.half&&l>0||n.min<=i.max&&n.min>(i.max+i.min)*s.half&&l<0)&&(e.velocity=l*-c,e.bounced=!0),e}function l(t,e){const n=t.getPosition(),a=t.getRadius(),i=s.calculateBounds(n,a),l=t.options.bounce,c=r({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:s.getRangeValue(l.horizontal.value)});c.bounced&&(void 0!==c.velocity&&(t.velocity.x=c.velocity),void 0!==c.position&&(t.position.x=c.position));const o=r({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:s.getRangeValue(l.vertical.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}class c{distance;constructor(){this.distance=200}load(t){s.isNull(t)||void 0!==t.distance&&(this.distance=t.distance)}}const o="bounce";class _ extends e.ExternalInteractorBase{_maxDistance;constructor(t){super(t),this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this._maxDistance=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const n=this.container.actualOptions,r=n.interactivity?.events,l=t.status===e.mouseMoveEvent;if(!r)return;const c=r.onHover.enable,_=r.onHover.mode,u=r.onDiv;l&&c&&s.isInArray(o,_)?function(t,e,n){const i=10*t.retina.pixelRatio,r=e.mouse.position,l=t.retina.bounceModeDistance;!l||l<0||!r||a(t,r,l,new s.Circle(r.x,r.y,l+i),n)}(this.container,t,e=>this.isEnabled(t,e)):i(this.container,u,o,e=>this.isEnabled(t,e))}isEnabled(t,n){const a=this.container.actualOptions,i=t.mouse,r=(n?.interactivity??a.interactivity)?.events;if(!r)return!1;const l=r.onDiv;return!!i.position&&r.onHover.enable&&s.isInArray(o,r.onHover.mode)||e.isDivModeEnabled(o,l)}loadModeOptions(t,...e){t.bounce??=new c;for(const s of e)t.bounce.load(s?.bounce)}reset(){}}async function u(t){t.checkVersion("4.0.0-beta.15"),await t.pluginManager.register(t=>{e.ensureInteractivityPluginLoaded(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new _(t)))})}const p=globalThis;p.__tsParticlesInternals=p.__tsParticlesInternals??{},p.loadExternalBounceInteraction=u,t.Bounce=c,t.loadExternalBounceInteraction=u}),Object.assign(globalThis.window||globalThis,{loadExternalBounceInteraction:(globalThis.__tsParticlesInternals.interactions.externalBounce||{}).loadExternalBounceInteraction}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
1
+ !function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/plugin-interactivity"),require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/plugin-interactivity","@tsparticles/engine"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.interactions.externalBounce=t.__tsParticlesInternals.interactions.externalBounce||{}),t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.engine)}(this,function(t,e,s){"use strict";const n=Math.PI*s.half;function a(t,e,a,i,r){const c=t.particles.grid.query(i,r);for(const t of c)i instanceof s.Circle?s.circleBounce(s.circleBounceDataFromParticle(t),{position:e,radius:a,mass:a**2*n,velocity:s.Vector.origin,factor:s.Vector.origin}):i instanceof s.Rectangle&&l(t,s.calculateBounds(e,a))}function i(t,n,i,r){e.divModeExecute(i,n,(n,i)=>{!function(t,n,a,i){const r=s.safeDocument().querySelectorAll(n);r.length&&r.forEach(n=>{const r=n,l=t.retina.pixelRatio,c={x:(r.offsetLeft+r.offsetWidth*s.half)*l,y:(r.offsetTop+r.offsetHeight*s.half)*l},o=r.offsetWidth*s.half*l,_=10*l,u=a.type===e.DivType.circle?new s.Circle(c.x,c.y,o+_):new s.Rectangle(r.offsetLeft*l-_,r.offsetTop*l-_,r.offsetWidth*l+_*s.double,r.offsetHeight*l+_*s.double);i(c,o,u)})}(t,n,i,(e,s,n)=>{a(t,e,s,n,r)})})}function r(t){const e={bounced:!1},{pSide:n,pOtherSide:a,rectSide:i,rectOtherSide:r,velocity:l,factor:c}=t;return a.min<r.min||a.min>r.max||a.max<r.min||a.max>r.max||(n.max>=i.min&&n.max<=(i.max+i.min)*s.half&&l>0||n.min<=i.max&&n.min>(i.max+i.min)*s.half&&l<0)&&(e.velocity=l*-c,e.bounced=!0),e}function l(t,e){const n=t.getPosition(),a=t.getRadius(),i=s.calculateBounds(n,a),l=t.options.bounce,c=r({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:s.getRangeValue(l.horizontal.value)});c.bounced&&(void 0!==c.velocity&&(t.velocity.x=c.velocity),void 0!==c.position&&(t.position.x=c.position));const o=r({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:s.getRangeValue(l.vertical.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}class c{distance;constructor(){this.distance=200}load(t){s.isNull(t)||void 0!==t.distance&&(this.distance=t.distance)}}const o="bounce";class _ extends e.ExternalInteractorBase{_maxDistance;constructor(t){super(t),this._maxDistance=0}get maxDistance(){return this._maxDistance}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this._maxDistance=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const n=this.container.actualOptions,r=n.interactivity?.events,l=t.status===e.mouseMoveEvent;if(!r)return;const c=r.onHover.enable,_=r.onHover.mode,u=r.onDiv;l&&c&&s.isInArray(o,_)?function(t,e,n){const i=10*t.retina.pixelRatio,r=e.mouse.position,l=t.retina.bounceModeDistance;!l||l<0||!r||a(t,r,l,new s.Circle(r.x,r.y,l+i),n)}(this.container,t,e=>this.isEnabled(t,e)):i(this.container,u,o,e=>this.isEnabled(t,e))}isEnabled(t,n){const a=this.container.actualOptions,i=t.mouse,r=(n?.interactivity??a.interactivity)?.events;if(!r)return!1;const l=r.onDiv;return!!i.position&&r.onHover.enable&&s.isInArray(o,r.onHover.mode)||e.isDivModeEnabled(o,l)}loadModeOptions(t,...e){t.bounce??=new c;for(const s of e)t.bounce.load(s?.bounce)}reset(){}}async function u(t){t.checkVersion("4.0.0-beta.16"),await t.pluginManager.register(t=>{e.ensureInteractivityPluginLoaded(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new _(t)))})}const p=globalThis;p.__tsParticlesInternals=p.__tsParticlesInternals??{},p.loadExternalBounceInteraction=u,t.Bounce=c,t.loadExternalBounceInteraction=u}),Object.assign(globalThis.window||globalThis,{loadExternalBounceInteraction:(globalThis.__tsParticlesInternals.interactions.externalBounce||{}).loadExternalBounceInteraction}),delete(globalThis.window||globalThis).tsparticlesInternalExports;