"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[6136],{3151:(e,t,o)=>{o.d(t,{L:()=>n});class n{constructor(e){this.container=e,this.type="external"}}},6136:(e,t,o)=>{o.r(t),o.d(t,{Bounce:()=>u,loadExternalBounceInteraction:()=>d});var n=o(3151),i=o(9201),s=o(4684),c=o(2613),a=o(573),r=o(8264);class u{constructor(){this.distance=200}load(e){e&&void 0!==e.distance&&(this.distance=e.distance)}}class l extends n.L{constructor(e){super(e),this._processBounce=(e,t,o)=>{const n=this.container.particles.quadTree.query(o,(e=>this.isEnabled(e)));for(const r of n)o instanceof i.C?(0,s.kR)((0,s.gy)(r),{position:e,radius:t,mass:t**2*Math.PI/2,velocity:c.O.origin,factor:c.O.origin}):o instanceof a.A&&(0,s.dp)(r,(0,s.M_)(e,t))},this._processMouseBounce=()=>{const e=this.container,t=10*e.retina.pixelRatio,o=e.interactivity.mouse.position,n=e.retina.bounceModeDistance;!n||n<0||!o||this._processBounce(o,n,new i.C(o.x,o.y,n+t))},this._singleSelectorBounce=(e,t)=>{const o=this.container,n=document.querySelectorAll(e);n.length&&n.forEach((e=>{const n=e,s=o.retina.pixelRatio,c={x:(n.offsetLeft+n.offsetWidth/2)*s,y:(n.offsetTop+n.offsetHeight/2)*s},r=n.offsetWidth/2*s,u=10*s,l="circle"===t.type?new i.C(c.x,c.y,r+u):new a.A(n.offsetLeft*s-u,n.offsetTop*s-u,n.offsetWidth*s+2*u,n.offsetHeight*s+2*u);this._processBounce(c,r,l)}))}}clear(){}init(){const e=this.container,t=e.actualOptions.interactivity.modes.bounce;t&&(e.retina.bounceModeDistance=t.distance*e.retina.pixelRatio)}async interact(){const e=this.container,t=e.actualOptions.interactivity.events,o=e.interactivity.status===r.Wt,n=t.onHover.enable,i=t.onHover.mode,c=t.onDiv;o&&n&&(0,s.dB)("bounce",i)?this._processMouseBounce():(0,s.XD)("bounce",c,((e,t)=>this._singleSelectorBounce(e,t)))}isEnabled(e){const t=this.container,o=t.actualOptions,n=t.interactivity.mouse,i=(e?.interactivity??o.interactivity).events,c=i.onDiv;return n.position&&i.onHover.enable&&(0,s.dB)("bounce",i.onHover.mode)||(0,s.wm)("bounce",c)}loadModeOptions(e,...t){e.bounce||(e.bounce=new u);for(const o of t)e.bounce.load(o?.bounce)}reset(){}}async function d(e,t=!0){await e.addInteractor("externalBounce",(e=>new l(e)),t)}}}]);