"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[5246],{5246:(i,t,o)=>{o.r(t),o.d(t,{loadOrbitUpdater:()=>s});var a=o(1197);class r extends a.SW{constructor(){super(),this.value=45,this.random.enable=!1,this.random.minimumValue=0}load(i){void 0!==i&&super.load(i)}}class n{constructor(){this.animation=new a.Pp,this.enable=!1,this.opacity=1,this.rotation=new r,this.width=1}load(i){i&&(this.animation.load(i.animation),this.rotation.load(i.rotation),void 0!==i.enable&&(this.enable=i.enable),void 0!==i.opacity&&(this.opacity=(0,a.Cs)(i.opacity)),void 0!==i.width&&(this.width=(0,a.Cs)(i.width)),void 0!==i.radius&&(this.radius=(0,a.Cs)(i.radius)),void 0!==i.color&&(this.color=a.Oz.create(this.color,i.color)))}}class e{constructor(i){this.container=i}afterDraw(i){const t=i.options.orbit;(null==t?void 0:t.enable)&&this.drawOrbit(i,"front")}beforeDraw(i){const t=i.options.orbit;(null==t?void 0:t.enable)&&this.drawOrbit(i,"back")}drawOrbit(i,t){const o=this.container;let r,n;switch(t){case"back":r=Math.PI/2,n=3*Math.PI/2;break;case"front":r=3*Math.PI/2,n=Math.PI/2;break;default:r=0,n=2*Math.PI}o.canvas.draw((t=>{var e,s,l,d,b,c;!function(i,t,o,r,n,e,s,l,d){if(e<=0)return;const b=t.getPosition();o&&(i.strokeStyle=(0,a.vz)(o,n)),i.lineWidth=e;const c=s*Math.PI/180;i.beginPath(),i.ellipse(b.x,b.y,r/2,2*r,c,l,d),i.stroke()}(t,i,null!==(e=i.orbitColor)&&void 0!==e?e:i.getFillColor(),null!==(l=null!==(s=i.retina.orbitRadius)&&void 0!==s?s:o.retina.orbitRadius)&&void 0!==l?l:i.getRadius(),null!==(d=i.orbitOpacity)&&void 0!==d?d:1,null!==(b=i.orbitWidth)&&void 0!==b?b:1,(null!==(c=i.orbitRotation)&&void 0!==c?c:0)*o.retina.pixelRatio,r,n)}))}init(i){const t=this.container,o=i.options.orbit;(null==o?void 0:o.enable)&&(i.orbitRotation=(0,a.Gu)(o.rotation.value),i.orbitColor=(0,a.lN)(o.color),i.retina.orbitRadius=void 0!==o.radius?(0,a.Gu)(o.radius)*t.retina.pixelRatio:void 0,t.retina.orbitRadius=i.retina.orbitRadius,i.orbitAnimationSpeed=o.animation.enable?(0,a.Gu)(o.animation.speed):0,i.orbitWidth=(0,a.Gu)(o.width),i.orbitOpacity=(0,a.Gu)(o.opacity))}isEnabled(i){var t;const o=null===(t=i.options.orbit)||void 0===t?void 0:t.animation;return!i.destroyed&&!i.spawning&&!!(null==o?void 0:o.enable)}loadOptions(i){i.orbit||(i.orbit=new n);for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];for(const t of o)i.orbit.load(null==t?void 0:t.orbit)}update(i,t){var o;this.isEnabled(i)&&(void 0===i.orbitRotation&&(i.orbitRotation=0),i.orbitRotation+=(null!==(o=i.orbitAnimationSpeed)&&void 0!==o?o:0/(2*Math.PI))*t.factor)}}function s(i){i.addParticleUpdater("orbit",(i=>new e(i)))}}}]);