"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[4785],{4785(e,l,a){a.d(l,{loadRollUpdater:()=>s});var n,o=a(3199);!function(e){e.both="both",e.horizontal="horizontal",e.vertical="vertical"}(n||(n={}));class t{enable=!1;value=0;load(e){(0,o.kZJ)(e)||((0,o.kBH)(this,"enable",e.enable),(0,o.dPX)(this,"value",e.value))}}class r{backColor;darken=new t;enable=!1;enlighten=new t;mode=n.vertical;speed=25;load(e){(0,o.kZJ)(e)||(void 0!==e.backColor&&(this.backColor=o.Oit.create(this.backColor,e.backColor)),this.darken.load(e.darken),(0,o.kBH)(this,"enable",e.enable),this.enlighten.load(e.enlighten),(0,o.kBH)(this,"mode",e.mode),(0,o.dPX)(this,"speed",e.speed))}}class i{#e;constructor(e){this.#e=e}getTransformValues(e){const l=e.roll?.enable&&e.roll,a=l&&l.horizontal,n=l&&l.vertical;return{a:a?Math.cos(l.angle):void 0,d:n?Math.sin(l.angle):void 0}}init(e){!function(e,l){const a=l.options.roll;if(a?.enable)if(l.roll={enable:a.enable,horizontal:a.mode===n.horizontal||a.mode===n.both,vertical:a.mode===n.vertical||a.mode===n.both,angle:(0,o.G0i)()*o.R1e,speed:(0,o.VGA)(a.speed)/360},a.backColor)l.backColor=(0,o.R5R)(e,a.backColor);else if(a.darken.enable&&a.enlighten.enable){const e=(0,o.G0i)()>=o.MXx?o.HKZ.darken:o.HKZ.enlighten;l.roll.alter={type:e,value:(0,o.VGA)(e===o.HKZ.darken?a.darken.value:a.enlighten.value)}}else a.darken.enable?l.roll.alter={type:o.HKZ.darken,value:(0,o.VGA)(a.darken.value)}:a.enlighten.enable&&(l.roll.alter={type:o.HKZ.enlighten,value:(0,o.VGA)(a.enlighten.value)});else l.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#e,e)}isEnabled(e){const l=e.options.roll;return!e.destroyed&&!e.spawning&&!!l?.enable}loadOptions(e,...l){(0,o.Ret)(e,"roll",r,...l)}update(e,l){this.isEnabled(e)&&function(e,l){const a=e.options.roll,n=e.roll;if(!n||!a?.enable)return;const t=n.speed*l.factor,r=o.R1e;n.angle+=t,n.angle>r&&(n.angle-=r)}(e,l)}}async function s(e){e.checkVersion("4.1.3"),await e.pluginManager.register(e=>{e.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new i(e.pluginManager)))})}}}]);