"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[6698],{6698:(i,t,n)=>{n.r(t),n.d(t,{Grab:()=>s,GrabLinks:()=>e,loadExternalGrabInteraction:()=>l});var o=n(1197);class e{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(i){i&&(void 0!==i.blink&&(this.blink=i.blink),void 0!==i.color&&(this.color=o.Oz.create(this.color,i.color)),void 0!==i.consent&&(this.consent=i.consent),void 0!==i.opacity&&(this.opacity=i.opacity))}}class s{constructor(){this.distance=100,this.links=new e}get lineLinked(){return this.links}set lineLinked(i){this.links=i}get line_linked(){return this.links}set line_linked(i){this.links=i}load(i){var t,n;i&&(void 0!==i.distance&&(this.distance=i.distance),this.links.load(null!==(n=null!==(t=i.links)&&void 0!==t?t:i.lineLinked)&&void 0!==n?n:i.line_linked))}}function r(i,t,n,e,s){i.canvas.draw((i=>{var r;const a=t.getPosition();!function(i,t,n,e,s,r){(0,o.pS)(i,n,e),i.strokeStyle=(0,o.iz)(s,r),i.lineWidth=t,i.stroke()}(i,null!==(r=t.retina.linksWidth)&&void 0!==r?r:0,a,s,n,e)}))}class a extends o.L8{constructor(i){super(i)}clear(){}init(){const i=this.container,t=i.actualOptions.interactivity.modes.grab;t&&(i.retina.grabModeDistance=t.distance*i.retina.pixelRatio)}async interact(){var i,t;const n=this.container,e=n.actualOptions.interactivity;if(!e.modes.grab||!e.events.onHover.enable||n.interactivity.status!==o.Wt)return;const s=n.interactivity.mouse.position;if(!s)return;const a=n.retina.grabModeDistance;if(!a||a<0)return;const l=n.particles.quadTree.queryCircle(s,a,(i=>this.isEnabled(i)));for(const c of l){const l=c.getPosition(),d=(0,o.Sp)(l,s);if(d>a)continue;const u=e.modes.grab.links,v=u.opacity,b=v-d*v/a;if(b<=0)continue;const k=null!==(i=u.color)&&void 0!==i?i:null===(t=c.options.links)||void 0===t?void 0:t.color;if(!n.particles.grabLineColor&&k){const i=e.modes.grab.links;n.particles.grabLineColor=(0,o.Dt)(k,i.blink,i.consent)}const h=(0,o.BE)(c,void 0,n.particles.grabLineColor);if(!h)return;r(n,c,h,b,s)}}isEnabled(i){var t;const n=this.container,e=n.interactivity.mouse,s=(null!==(t=null==i?void 0:i.interactivity)&&void 0!==t?t:n.actualOptions.interactivity).events;return s.onHover.enable&&!!e.position&&(0,o.dB)("grab",s.onHover.mode)}loadModeOptions(i){i.grab||(i.grab=new s);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(const t of n)i.grab.load(null==t?void 0:t.grab)}reset(){}}async function l(i){await i.addInteractor("externalGrab",(i=>new a(i)))}}}]);