"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[619],{619:(e,o,t)=>{t.r(o),t.d(o,{loadStrokeColorUpdater:()=>n});var a=t(4684),i=t(5302),s=t(6720);function l(e,o,t,a,s){if(!o||!t.enable||(o.maxLoops??0)>0&&(o.loops??0)>(o.maxLoops??0))return;if(o.time||(o.time=0),(o.delayTime??0)>0&&o.time<(o.delayTime??0)&&(o.time+=e.value),(o.delayTime??0)>0&&o.time<(o.delayTime??0))return;const l=(0,i.vd)(t.offset),r=(o.velocity??0)*e.factor+3.6*l,n=o.decay??1;s&&"increasing"!==o.status?(o.value-=r,o.value<0&&(o.loops||(o.loops=0),o.loops++,o.status="increasing",o.value+=o.value)):(o.value+=r,o.value>a&&(o.loops||(o.loops=0),o.loops++,s&&(o.status="decreasing",o.value-=o.value%a))),o.velocity&&1!==n&&(o.velocity*=n),o.value>a&&(o.value%=a)}class r{constructor(e){this.container=e}init(e){const o=this.container,t=e.options,l=(0,a.wA)(t.stroke,e.id,t.reduceDuplicates);e.strokeWidth=(0,i.Gu)(l.width)*o.retina.pixelRatio,e.strokeOpacity=(0,i.Gu)(l.opacity??1),e.strokeAnimation=l.color?.animation;const r=(0,s.lN)(l.color)??e.getFillColor();r&&(e.strokeColor=(0,s.bS)(r,e.strokeAnimation,o.retina.reduceFactor))}isEnabled(e){const o=e.strokeAnimation,{strokeColor:t}=e;return!e.destroyed&&!e.spawning&&!!o&&(void 0!==t?.h.value&&t.h.enable||void 0!==t?.s.value&&t.s.enable||void 0!==t?.l.value&&t.l.enable)}update(e,o){this.isEnabled(e)&&function(e,o){if(!e.strokeColor||!e.strokeAnimation)return;const{h:t,s:a,l:i}=e.strokeColor,{h:s,s:r,l:n}=e.strokeAnimation;t&&l(o,t,s,360,!1),a&&l(o,a,r,100,!0),i&&l(o,i,n,100,!0)}(e,o)}}async function n(e,o=!0){await e.addParticleUpdater("strokeColor",(e=>new r(e)),o)}}}]);