"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[9878],{9878(a,n,r){r.d(n,{loadHwbColorPlugin:()=>h});var s,t=r(3199);!function(a){a[a.h=1]="h",a[a.w=2]="w",a[a.b=3]="b",a[a.a=5]="a"}(s||(s={}));const e=/hwba?\(\s*(\d{1,3}(?:\.\d+)?(?:deg|rad|grad|turn)?)\s*[\s,]\s*(\d{1,3}(?:\.\d+)?)%\s*[\s,]\s*(\d{1,3}(?:\.\d+)?)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;function o(a){const n=a.h/360,r=a.w/100,s=a.b/100,t=r+s;let e,o,i;if(t>=1){const a=r/t;e=a,o=a,i=a}else{const a=a=>{const t=(a+6*n)%6,e=1-r-s,o=Math.max(0,Math.min(t,4-t,1));return 1-s-e*o};e=a(5),o=a(3),i=a(1)}return{r:Math.round(255*e),g:Math.round(255*o),b:Math.round(255*i)}}class i{accepts(a){return a.startsWith("hwb")}handleColor(a){const n=a.value.hwb??a.value;if("h"in n&&"w"in n&&"b"in n)return o(n)}handleRangeColor(a){const n=a.value.hwb??a.value;if("h"in n&&"w"in n&&"b"in n)return o({h:(0,t.VGA)(n.h),w:(0,t.VGA)(n.w),b:(0,t.VGA)(n.b)})}parseString(a){if(!this.accepts(a))return;const n=e.exec(a);if(!n)return;const r=n[s.h],i=n[s.w],h=n[s.b];return{a:(l={a:n.length>4?(0,t.M3Y)(n[s.a]):1,h:void 0!==r?parseFloat(r):0,w:void 0!==i?parseFloat(i):0,b:void 0!==h?parseFloat(h):0}).a,...o(l)};var l}}async function h(a){a.checkVersion("4.1.3"),await a.pluginManager.register(a=>{a.pluginManager.addColorManager("hwb",new i)})}}}]);