"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[5164],{5164:function(t,i,n){n.r(i),n.d(i,{Trail:function(){return o},loadExternalTrailInteraction:function(){return a}});var e=n(3563);class o{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=(0,e.ZB)({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}class s extends e.L8{constructor(t){super(t),this._delay=0}clear(){}init(){}async interact(t){var i,n,e,o;if(!this.container.retina.reduceFactor)return;const s=this.container,a=s.actualOptions.interactivity.modes.trail;if(!a)return;const r=1e3*a.delay/this.container.retina.reduceFactor;if(this._delay<r&&(this._delay+=t.value),this._delay<r)return;let l=!0;a.pauseOnStop&&(s.interactivity.mouse.position===this._lastPosition||(null===(i=s.interactivity.mouse.position)||void 0===i?void 0:i.x)===(null===(n=this._lastPosition)||void 0===n?void 0:n.x)&&(null===(e=s.interactivity.mouse.position)||void 0===e?void 0:e.y)===(null===(o=this._lastPosition)||void 0===o?void 0:o.y))&&(l=!1),s.interactivity.mouse.position?this._lastPosition={x:s.interactivity.mouse.position.x,y:s.interactivity.mouse.position.y}:delete this._lastPosition,l&&s.particles.push(a.quantity,s.interactivity.mouse,a.particles),this._delay-=r}isEnabled(t){var i;const n=this.container,o=n.actualOptions,s=n.interactivity.mouse,a=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:o.interactivity).events;return s.clicking&&s.inside&&!!s.position&&(0,e.dB)("trail",a.onClick.mode)||s.inside&&!!s.position&&(0,e.dB)("trail",a.onHover.mode)}loadModeOptions(t){t.trail||(t.trail=new o);for(var i=arguments.length,n=new Array(i>1?i-1:0),e=1;e<i;e++)n[e-1]=arguments[e];for(const i of n)t.trail.load(null==i?void 0:i.trail)}reset(){}}async function a(t){await t.addInteractor("externalTrail",(t=>new s(t)))}}}]);