"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[533],{533:(e,o,t)=>{t.d(o,{loadStrokeColorUpdater:()=>l});var a=t(9201);function i(e,o,t,i,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,a.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>i&&(o.loops||(o.loops=0),o.loops++,s&&(o.status="decreasing",o.value-=o.value%i))),o.velocity&&1!==n&&(o.velocity*=n),o.value>i&&(o.value%=i)}class s{constructor(e){this.container=e}init(e){const o=this.container,t=e.options,i=(0,a.wA)(t.stroke,e.id,t.reduceDuplicates);e.strokeWidth=(0,a.Gu)(i.width)*o.retina.pixelRatio,e.strokeOpacity=(0,a.Gu)(i.opacity??1),e.strokeAnimation=i.color?.animation;const s=(0,a.lN)(i.color)??e.getFillColor();s&&(e.strokeColor=(0,a.bS)(s,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:s}=e.strokeColor,{h:l,s:r,l:n}=e.strokeAnimation;t&&i(o,t,l,360,!1),a&&i(o,a,r,100,!0),s&&i(o,s,n,100,!0)}(e,o)}}async function l(e,o=!0){await e.addParticleUpdater("strokeColor",(e=>new s(e)),o)}}}]);