"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[1021],{1021:function(o,l,i){i.r(l),i.d(l,{loadColorUpdater:function(){return t}});var n=i(3563);function e(o,l,i,e,a){var t,r;const c=l;if(!c||!i.enable)return;const s=(0,n.vd)(i.offset),u=(null!==(t=l.velocity)&&void 0!==t?t:0)*o.factor+3.6*s,v=null!==(r=l.decay)&&void 0!==r?r:1;a&&0!==c.status?(c.value-=u,c.value<0&&(c.status=0,c.value+=c.value)):(c.value+=u,a&&c.value>e&&(c.status=1,c.value-=c.value%e)),c.velocity&&1!==v&&(c.velocity*=v),c.value>e&&(c.value%=e)}class a{constructor(o){this.container=o}init(o){const l=(0,n.lN)(o.options.color,o.id,o.options.reduceDuplicates);l&&(o.color=(0,n.bS)(l,o.options.color.animation,this.container.retina.reduceFactor))}isEnabled(o){var l,i,n;const e=o.options.color.animation;return!o.destroyed&&!o.spawning&&(void 0!==(null===(l=o.color)||void 0===l?void 0:l.h.value)&&e.h.enable||void 0!==(null===(i=o.color)||void 0===i?void 0:i.s.value)&&e.s.enable||void 0!==(null===(n=o.color)||void 0===n?void 0:n.l.value)&&e.l.enable)}update(o,l){!function(o,l){var i,n,a;const t=o.options.color.animation;void 0!==(null===(i=o.color)||void 0===i?void 0:i.h)&&e(l,o.color.h,t.h,360,!1),void 0!==(null===(n=o.color)||void 0===n?void 0:n.s)&&e(l,o.color.s,t.s,100,!0),void 0!==(null===(a=o.color)||void 0===a?void 0:a.l)&&e(l,o.color.l,t.l,100,!0)}(o,l)}}async function t(o){await o.addParticleUpdater("color",(o=>new a(o)))}}}]);