"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[1430],{1430:(e,l,a)=>{a.d(l,{loadRollUpdater:()=>r});var o=a(9201);class n{constructor(){this.enable=!1,this.value=0}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.value&&(this.value=(0,o.Cs)(e.value)))}}class t{constructor(){this.darken=new n,this.enable=!1,this.enlighten=new n,this.mode="vertical",this.speed=25}load(e){e&&(void 0!==e.backColor&&(this.backColor=o.Oz.create(this.backColor,e.backColor)),this.darken.load(e.darken),void 0!==e.enable&&(this.enable=e.enable),this.enlighten.load(e.enlighten),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.speed&&(this.speed=(0,o.Cs)(e.speed)))}}class s{getTransformValues(e){const l=e.roll?.enable&&e.roll,a=l&&l.horizontal,o=l&&l.vertical;return{a:a?Math.cos(l.angle):void 0,d:o?Math.sin(l.angle):void 0}}init(e){!function(e){const l=e.options.roll;if(l?.enable)if(e.roll={enable:l.enable,horizontal:"horizontal"===l.mode||"both"===l.mode,vertical:"vertical"===l.mode||"both"===l.mode,angle:(0,o.sZ)()*Math.PI*2,speed:(0,o.Gu)(l.speed)/360},l.backColor)e.backColor=(0,o.lN)(l.backColor);else if(l.darken.enable&&l.enlighten.enable){const a=(0,o.sZ)()>=.5?"darken":"enlighten";e.roll.alter={type:a,value:(0,o.Gu)("darken"===a?l.darken.value:l.enlighten.value)}}else l.darken.enable?e.roll.alter={type:"darken",value:(0,o.Gu)(l.darken.value)}:l.enlighten.enable&&(e.roll.alter={type:"enlighten",value:(0,o.Gu)(l.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(e)}isEnabled(e){const l=e.options.roll;return!e.destroyed&&!e.spawning&&!!l?.enable}loadOptions(e,...l){e.roll||(e.roll=new t);for(const a of l)e.roll.load(a?.roll)}update(e,l){this.isEnabled(e)&&function(e,l){const a=e.options.roll,o=e.roll;if(!o||!a?.enable)return;const n=o.speed*l.factor,t=2*Math.PI;o.angle+=n,o.angle>t&&(o.angle-=t)}(e,l)}}async function r(e,l=!0){await e.addParticleUpdater("roll",(()=>new s),l)}}}]);