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