"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[8381],{8381:function(s,r,t){t.r(r),t.d(r,{loadHsvColorPlugin:function(){return a}});var n=t(3563);function e(s){const r={b:0,g:0,r:0},t=s.h/60,n=s.s/100,e=s.v/100,o=e*n,a=o*(1-Math.abs(t%2-1));let v;if(t>=0&&t<=1?v={r:o,g:a,b:0}:t>1&&t<=2?v={r:a,g:o,b:0}:t>2&&t<=3?v={r:0,g:o,b:a}:t>3&&t<=4?v={r:0,g:a,b:o}:t>4&&t<=5?v={r:a,g:0,b:o}:t>5&&t<=6&&(v={r:o,g:0,b:a}),v){const s=e-o;r.r=Math.floor(255*(v.r+s)),r.g=Math.floor(255*(v.g+s)),r.b=Math.floor(255*(v.b+s))}return r}class o{constructor(){this.key="hsv",this.stringPrefix="hsv"}handleColor(s){var r;const t=null!==(r=s.value.hsv)&&void 0!==r?r:s.value;if(void 0!==t.h&&void 0!==t.v)return e(t)}handleRangeColor(s){var r;const t=null!==(r=s.value.hsv)&&void 0!==r?r:s.value;if(void 0!==t.h&&void 0!==t.v)return e({h:(0,n.Gu)(t.h),s:(0,n.Gu)(t.s),v:(0,n.Gu)(t.v)})}parseString(s){if(!s.startsWith("hsv"))return;const r=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(s);return r?(t={a:r.length>4?(0,n.BV)(r[5]):1,h:parseInt(r[1],10),s:parseInt(r[2],10),v:parseInt(r[3],10)},Object.assign({a:t.a},e(t))):void 0;var t}}function a(){(0,n.VI)(new o)}}}]);