From 1f22d403d51af24d06d4f70d2d53a9cdad9f44b3 Mon Sep 17 00:00:00 2001 From: meodai Date: Mon, 14 Oct 2024 21:05:39 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20words/co?= =?UTF-8?q?lor-description@6a940e3e9bff01421c37dd0c6c6bdf0d2be82f8f=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.esm.js | 2 +- index.iife.js | 2 +- index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.esm.js b/index.esm.js index bc68722..11409cd 100644 --- a/index.esm.js +++ b/index.esm.js @@ -1,4 +1,4 @@ var Zo=Object.defineProperty;var Mr=e=>{throw TypeError(e)};var Bo=(e,t,r)=>t in e?Zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vt=(e,t,r)=>Bo(e,typeof t!="symbol"?t+"":t,r),Fo=(e,t,r)=>t.has(e)||Mr("Cannot "+r);var wr=(e,t,r)=>t.has(e)?Mr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var te=(e,t,r)=>(Fo(e,t,"access private method"),r);var{round:Ko,min:yt,max:Ae,log:$e,floor:Uo,random:Vo}=Math,Qo=e=>{let t=e/100,r,n,o;return t<66?(r=1,n=t<6?0:(-155.25485562709179-.44596950469579133*(n=t-2)+104.49216199393888*$e(n))/255,o=t<20?0:(-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*$e(o))/255):(r=(351.97690566805693+.114206453784165*(r=t-55)-40.25366309332127*$e(r))/255,n=(325.4494125711974+.07943456536662342*(n=t-50)-28.0852963507957*$e(n))/255,o=1),{r:Ae(0,yt(1,r)),g:Ae(0,yt(1,n)),b:Ae(0,yt(1,o)),a:1}},Tr=e=>{let{r:t,g:r,b:n}=e,o=1e3,a=4e4,i=.4,l;for(;a-o>i;){l=(a+o)*.5;let d=Qo(l);d.b/d.r>=n/t?a=l:o=l}return Ko(l)},kr=(e,t,r)=>e>=t&&e<=r,Mt=e=>{let t=[...e];for(let r=t.length-1;r>0;r--){let n=Uo(Vo()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t},zr=e=>{let{r:t,g:r,b:n}=e,o=1-Ae(t,r,n),a=1-o;return{mode:"cmyk",c:a&&(a-t)/a,m:a&&(a-r)/a,y:a&&(a-n)/a,k:o}};var en=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},De=en;var tn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Lr=tn;var rn=e=>De(Lr[e.toLowerCase()],6),Rr=rn;var on=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,nn=e=>{let t;return(t=e.match(on))?De(parseInt(t[1],16),t[1].length):void 0},Xr=nn;var X="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Ci=`(?:${X}|none)`,re=`${X}%`,Oi=`(?:${X}%|none)`,ze=`(?:${X}%|${X})`,an=`(?:${X}%|${X}|none)`,Hr=`(?:${X}(deg|grad|rad|turn)|${X})`,Ni=`(?:${X}(deg|grad|rad|turn)|${X}|none)`,Y="\\s*,\\s*";var qi=new RegExp("^"+an+"$");var ln=new RegExp(`^rgba?\\(\\s*${X}${Y}${X}${Y}${X}\\s*(?:,\\s*${ze}\\s*)?\\)$`),sn=new RegExp(`^rgba?\\(\\s*${re}${Y}${re}${Y}${re}\\s*(?:,\\s*${ze}\\s*)?\\)$`),fn=e=>{let t={mode:"rgb"},r;if(r=e.match(ln))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(sn))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},_r=fn;var dn=(e,t)=>e===void 0?void 0:typeof e!="object"?Le(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Sr=dn;var un=(e="rgb")=>t=>(t=Sr(t,e))!==void 0?t.mode===e?t:q[t.mode][e]?q[t.mode][e](t):e==="rgb"?q[t.mode].rgb(t):q.rgb[e](q[t.mode].rgb(t)):void 0,W=un;var q={},Ir={},Re=[],wt={},pn=e=>e,g=e=>(q[e.mode]={...q[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{q[t]||(q[t]={}),q[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=pn)}),Ir[e.mode]=e,(e.parse||[]).forEach(t=>{cn(t,e.mode)}),W(e.mode)),Pr=e=>Ir[e],cn=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");wt[e]=t}else typeof e=="function"&&Re.indexOf(e)<0&&Re.push(e)};var Tt=/[^\x00-\x7F]|[a-zA-Z_]/,mn=/[^\x00-\x7F]|[-\w]/,s={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},u=0;function je(e){let t=e[u],r=e[u+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[u+2]):t==="."?/\d/.test(r):/\d/.test(t)}function kt(e){if(u>=e.length)return!1;let t=e[u];if(Tt.test(t))return!0;if(t==="-"){if(e.length-u<2)return!1;let r=e[u+1];return!!(r==="-"||Tt.test(r))}return!1}var hn={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Xe(e){let t="";if((e[u]==="-"||e[u]==="+")&&(t+=e[u++]),t+=Je(e),e[u]==="."&&/\d/.test(e[u+1])&&(t+=e[u++]+Je(e)),(e[u]==="e"||e[u]==="E")&&((e[u+1]==="-"||e[u+1]==="+")&&/\d/.test(e[u+2])?t+=e[u++]+e[u++]+Je(e):/\d/.test(e[u+1])&&(t+=e[u++]+Je(e))),kt(e)){let r=Ee(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:s.Hue,value:t*hn[r]}:void 0}return e[u]==="%"?(u++,{type:s.Percentage,value:+t}):{type:s.Number,value:+t}}function Je(e){let t="";for(;/\d/.test(e[u]);)t+=e[u++];return t}function Ee(e){let t="";for(;u4)){if(r.length===4){if(r[3].type!==s.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:s.None,value:void 0}),r.every(o=>o.type!==s.Alpha)?r:void 0}}function vn(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==s.Function)return;let n=Cr(e,t);if(n)return n.unshift(r.value),n}var yn=e=>{if(typeof e!="string")return;let t=gn(e),r=t?vn(t,!0):void 0,n,o=0,a=Re.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Nr=wn;var qr=(e,t,r)=>e+r*(t-e);var Tn=e=>{let t=[];for(let r=0;rt=>{let r=Tn(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var f=$r(qr);var m=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var kn={mode:"rgb",channels:["r","g","b","alpha"],parse:[Or,Xr,_r,Rr,Nr,"srgb"],serialize:"srgb",interpolate:{r:f,g:f,b:f,alpha:{use:f,fixup:m}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},C=kn;var zt=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),zn=e=>{let t=zt(e.r),r=zt(e.g),n=zt(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Lt=zn;var Rt=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Ln=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:Rt(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:Rt(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:Rt(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},Xt=Ln;var Ht=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Rn=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Ht(e),g:Ht(t),b:Ht(r)};return n!==void 0&&(o.alpha=n),o},O=Rn;var Xn=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},_=Xn;var _t=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Hn=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:_t(e),g:_t(t),b:_t(r)};return n!==void 0&&(a.alpha=n),a},N=Hn;var _n=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=N({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},S=_n;var Sn={...C,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Xt(_(e)),xyz65:Xt},toMode:{rgb:e=>S(Lt(e)),xyz65:Lt}},Ar=Sn;var In=e=>(e=e%360)<0?e+360:e,x=In;var Pn=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=x(r);return n===0||e[n-1]===void 0?a:t(a-x(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),k=e=>Pn(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var M=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Dr=Math.PI/180,jr=180/Math.PI;var Jr=M[3]*M[4],Er=M[1]*M[4],Yr=M[1]*M[2]-M[0]*M[3],Cn=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Yr*r+e*Jr-t*Er)/(Yr+Jr-Er),a=r-o,i=(M[4]*(t-o)-M[2]*a)/M[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(M[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(i,a)*jr-120),n!==void 0&&(l.alpha=n),l},Wr=Cn;var On=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Dr,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),l=Math.sin(e);return o.r=r+a*(M[0]*i+M[1]*l),o.g=r+a*(M[2]*i+M[3]*l),o.b=r+a*(M[4]*i+M[5]*l),n!==void 0&&(o.alpha=n),o},Gr=On;var G=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=x(e.h),n=x(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Zr=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=x(e.h),n=x(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},Z=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=x(e.h),n=x(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var z=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Nn={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Wr},toMode:{rgb:Gr},interpolate:{h:{use:f,fixup:k},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:G},average:{h:z}},Br=Nn;var qn=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=x(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},I=qn;var $n=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},P=$n;var Ye=Math.pow(29,3)/Math.pow(3,3),We=Math.pow(6,3)/Math.pow(29,3);var y={X:.9642956764295677,Y:1,Z:.8251046025104602},B={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Kl=Math.pow(29,3)/Math.pow(3,3),Ul=Math.pow(6,3)/Math.pow(29,3);var St=e=>Math.pow(e,3)>We?Math.pow(e,3):(116*e-16)/Ye,An=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz65",x:St(a)*B.X,y:St(o)*B.Y,z:St(i)*B.Z};return n!==void 0&&(l.alpha=n),l},Ge=An;var Dn=e=>S(Ge(e)),F=Dn;var It=e=>e>We?Math.cbrt(e):(Ye*e+16)/116,jn=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=It(e/B.X),a=It(t/B.Y),i=It(r/B.Z),l={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},Ze=jn;var Jn=e=>{let t=Ze(_(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},K=Jn;var oe=.14444444444444443*Math.PI,ie=Math.cos(oe),le=Math.sin(oe),Be=100/Math.log(139/100);var En=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Be)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-oe),l=a*Math.sin(r/180*Math.PI-oe);return o.a=i*ie-l/.83*le,o.b=i*le+l/.83*ie,n!==void 0&&(o.alpha=n),o},_e=En;var Yn=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*ie+r*le,a=.83*(r*ie-t*le),i=Math.sqrt(o*o+a*a),l={mode:"dlch",l:Be/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return l.c&&(l.h=x((Math.atan2(a,o)+oe)/Math.PI*180)),n!==void 0&&(l.alpha=n),l},Se=Yn;var Fr=e=>_e(I(e,"dlch")),Kr=e=>P(Se(e),"dlab"),Wn={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Fr,rgb:e=>F(Fr(e))},fromMode:{lab65:Kr,rgb:e=>Kr(K(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},Ur=Wn;var Gn={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:_e,dlab:e=>P(e,"dlab"),rgb:e=>F(_e(e))},fromMode:{lab65:Se,dlab:e=>I(e,"dlch"),rgb:e=>Se(K(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:f,c:f,h:{use:f,fixup:k},alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},Vr=Gn;function Ct({h:e,s:t,i:r,alpha:n}){e=x(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Ot({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},eo=Bn;var Fn=new RegExp(`^hsla?\\(\\s*${Hr}${Y}${re}${Y}${re}\\s*(?:,\\s*${ze}\\s*)?\\)$`),Kn=e=>{let t=e.match(Fn);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=eo(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},to=Kn;function Un(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.s=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.l=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var ro=Un;var Vn={mode:"hsl",toMode:{rgb:Nt},fromMode:{rgb:qt},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[ro,to],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:k},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:G},average:{h:z}},Fe=Vn;function Ie({h:e,s:t,v:r,alpha:n}){e=x(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Pe({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t1){let o=t+r;t/=o,r/=o}return Ie({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function At(e){let t=Pe(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function ea(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.w=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.b=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var oo=ea;var ta={mode:"hwb",toMode:{rgb:$t},fromMode:{rgb:At},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[oo],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:k},w:f,b:f,alpha:{use:f,fixup:m}},difference:{h:Zr},average:{h:z}},no=ta;var se=.1593017578125,ao=78.84375,fe=.8359375,de=18.8515625,ue=18.6875;function Ue(e){if(e<0)return 0;let t=Math.pow(e,1/ao);return 1e4*Math.pow(Math.max(0,t-fe)/(de-ue*t),1/se)}function Ve(e){if(e<0)return 0;let t=Math.pow(e/1e4,se);return Math.pow((fe+de*t)/(1+ue*t),ao)}var Dt=e=>Math.max(e/203,0),oa=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ue(e+.008609037037932761*t+.11102962500302593*r),a=Ue(e-.00860903703793275*t-.11102962500302599*r),i=Ue(e+.5600313357106791*t-.32062717498731885*r),l={mode:"xyz65",x:Dt(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:Dt(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:Dt(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(l.alpha=n),l},jt=oa;var Jt=(e=0)=>Math.max(e*203,0),na=({x:e,y:t,z:r,alpha:n})=>{let o=Jt(e),a=Jt(t),i=Jt(r),l=Ve(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),d=Ve(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),p=Ve(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*l+.5*d,b=1.61376953125*l-3.323486328125*d+1.709716796875*p,h=4.378173828125*l-4.24560546875*d-.132568359375*p,v={mode:"itp",i:c,t:b,p:h};return n!==void 0&&(v.alpha=n),v},Et=na;var aa={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:jt,rgb:e=>S(jt(e))},fromMode:{xyz65:Et,rgb:e=>Et(_(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:f,t:f,p:f,alpha:{use:f,fixup:m}}},io=aa;var ia=134.03437499999998,la=16295499532821565e-27,Yt=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,se);return Math.pow((fe+de*t)/(1+ue*t),ia)},Wt=(e=0)=>Math.max(e*203,0),sa=({x:e,y:t,z:r,alpha:n})=>{e=Wt(e),t=Wt(t),r=Wt(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=Yt(.41478972*o+.579999*a+.014648*r),l=Yt(-.20151*o+1.120649*a+.0531008*r),d=Yt(-.0166008*o+.2648*a+.6684799*r),p=(i+l)/2,c={mode:"jab",j:.44*p/(1-.56*p)-la,a:3.524*i-4.066708*l+.542708*d,b:.199076*i+1.096799*l-1.295875*d};return n!==void 0&&(c.alpha=n),c},Qe=sa;var fa=134.03437499999998,lo=16295499532821565e-27,Gt=e=>{if(e<0)return 0;let t=Math.pow(e,1/fa);return 1e4*Math.pow((fe-t)/(ue*t-de),1/se)},Zt=e=>e/203,da=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+lo)/(.44+.56*(e+lo)),a=Gt(o+.13860504*t+.058047316*r),i=Gt(o-.13860504*t-.058047316*r),l=Gt(o-.096019242*t-.8118919*r),d={mode:"xyz65",x:Zt(1.661373024652174*a-.914523081304348*i+.23136208173913045*l),y:Zt(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*l),z:Zt(-.090982811*a-.31272829*i+1.5227666*l)};return n!==void 0&&(d.alpha=n),d},et=da;var ua=e=>{let t=Qe(_(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tt=ua;var pa=e=>S(et(e)),rt=pa;var ca={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:tt,xyz65:Qe},toMode:{rgb:rt,xyz65:et},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:f,a:f,b:f,alpha:{use:f,fixup:m}}},so=ca;var ma=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=x(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Bt=ma;var ha=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Ft=ha;var ba={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Ft,rgb:e=>rt(Ft(e))},fromMode:{rgb:e=>Bt(tt(e)),jab:Bt},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:f,fixup:k},c:f,j:f,alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},fo=ba;var U=Math.pow(29,3)/Math.pow(3,3),pe=Math.pow(6,3)/Math.pow(29,3);var Kt=e=>Math.pow(e,3)>pe?Math.pow(e,3):(116*e-16)/U,ga=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz50",x:Kt(a)*y.X,y:Kt(o)*y.Y,z:Kt(i)*y.Z};return n!==void 0&&(l.alpha=n),l},ce=ga;var xa=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=N({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},$=xa;var va=e=>$(ce(e)),ot=va;var ya=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},A=ya;var Ut=e=>e>pe?Math.cbrt(e):(U*e+16)/116,Ma=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ut(e/y.X),a=Ut(t/y.Y),i=Ut(r/y.Z),l={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},me=Ma;var wa=e=>{let t=me(A(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},nt=wa;function Ta(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*125/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*125/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var uo=Ta;var ka={mode:"lab",toMode:{xyz50:ce,rgb:ot},fromMode:{xyz50:me,rgb:nt},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[uo],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},he=ka;var za={...he,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Ge,rgb:F},fromMode:{xyz65:Ze,rgb:K},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}},po=za;function La(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*150/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var co=La;var Ra={mode:"lch",toMode:{lab:P,rgb:e=>ot(P(e))},fromMode:{rgb:e=>I(nt(e)),lab:I},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[co],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:k},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},be=Ra;var Xa={...be,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>P(e,"lab65"),rgb:e=>F(P(e,"lab65"))},fromMode:{rgb:e=>I(K(e),"lch65"),lab65:e=>I(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},mo=Xa;var Ha=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=x(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Vt=Ha;var _a=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Qt=_a;var ho=(e,t,r)=>4*e/(e+15*t+3*r),bo=(e,t,r)=>9*t/(e+15*t+3*r),Sa=ho(y.X,y.Y,y.Z),Ia=bo(y.X,y.Y,y.Z),Pa=e=>e<=pe?U*e:116*Math.cbrt(e)-16,Ca=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Pa(t/y.Y),a=ho(e,t,r),i=bo(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-Sa),i=13*o*(i-Ia));let l={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(l.alpha=n),l},Ce=Ca;var Oa=(e,t,r)=>4*e/(e+15*t+3*r),Na=(e,t,r)=>9*t/(e+15*t+3*r),qa=Oa(y.X,y.Y,y.Z),$a=Na(y.X,y.Y,y.Z),Aa=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+qa,a=r/(13*e)+$a,i=y.Y*(e<=8?e/U:Math.pow((e+16)/116,3)),l=i*(9*o)/(4*a),d=i*(12-3*o-20*a)/(4*a),p={mode:"xyz50",x:l,y:i,z:d};return n!==void 0&&(p.alpha=n),p},Oe=Aa;var Da=e=>Vt(Ce(A(e))),ja=e=>$(Oe(Qt(e))),Ja={mode:"lchuv",toMode:{luv:Qt,rgb:ja},fromMode:{rgb:Da,luv:Vt},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:f,fixup:k},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},go=Ja;var Ea={...C,mode:"lrgb",toMode:{rgb:N},fromMode:{rgb:O},parse:["srgb-linear"],serialize:"srgb-linear"},xo=Ea;var Ya={mode:"luv",toMode:{xyz50:Oe,rgb:e=>$(Oe(e))},fromMode:{xyz50:Ce,rgb:e=>Ce(A(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:f,u:f,v:f,alpha:{use:f,fixup:m}}},vo=Ya;var Wa=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*r),a=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*r),i=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*r),l={mode:"oklab",l:.2104542553*o+.793617785*a-.0040720468*i,a:1.9779984951*o-2.428592205*a+.4505937099*i,b:.0259040371*o+.7827717662*a-.808675766*i};return n!==void 0&&(l.alpha=n),l},at=Wa;var Ga=e=>{let t=at(O(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V=Ga;var Za=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*r,3),a=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*r,3),i=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*r,3),l={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*a+.230969928729428*i,g:-1.2684380040921763*o+2.6097574006633715*a-.3413193963102197*i,b:-.004196086541837188*o-.7034186144594493*a+1.7076147009309444*i};return n!==void 0&&(l.alpha=n),l},D=Za;var Ba=e=>N(D(e)),Q=Ba;function Ne(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function ne(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Fa(e,t){let r,n,o,a,i,l,d,p;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,l=4.0767416621,d=-3.3077115913,p=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,l=-1.2684380046,d=2.6097574011,p=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,l=-.0041960863,d=-.7034186147,p=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,b=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,v=-.0894841775*e-1.291485548*t;{let w=1+c*b,L=1+c*h,T=1+c*v,H=w*w*w,R=L*L*L,E=T*T*T,xe=3*b*w*w,ve=3*h*L*L,ye=3*v*T*T,Me=6*b*b*w,we=6*h*h*L,Te=6*v*v*T,ae=l*H+d*R+p*E,ee=l*xe+d*ve+p*ye,ke=l*Me+d*we+p*Te;c=c-ae*ee/(ee*ee-.5*ae*ke)}return c}function er(e,t){let r=Fa(e,t),n=D({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function Ka(e,t,r,n,o,a=null){a||(a=er(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let l=r-o,d=n,p=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,b=-.0894841775*e-1.291485548*t,h=l+d*p,v=l+d*c,w=l+d*b;{let L=o*(1-i)+i*r,T=i*n,H=L+T*p,R=L+T*c,E=L+T*b,xe=H*H*H,ve=R*R*R,ye=E*E*E,Me=3*h*H*H,we=3*v*R*R,Te=3*w*E*E,ae=6*h*h*H,ee=6*v*v*R,ke=6*w*w*E,hr=4.0767416621*xe-3.3077115913*ve+.2309699292*ye-1,ct=4.0767416621*Me-3.3077115913*we+.2309699292*Te,Yo=4.0767416621*ae-3.3077115913*ee+.2309699292*ke,br=ct/(ct*ct-.5*hr*Yo),mt=-hr*br,gr=-1.2684380046*xe+2.6097574011*ve-.3413193965*ye-1,ht=-1.2684380046*Me+2.6097574011*we-.3413193965*Te,Wo=-1.2684380046*ae+2.6097574011*ee-.3413193965*ke,xr=ht/(ht*ht-.5*gr*Wo),bt=-gr*xr,vr=-.0041960863*xe-.7034186147*ve+1.707614701*ye-1,gt=-.0041960863*Me-.7034186147*we+1.707614701*Te,Go=-.0041960863*ae-.7034186147*ee+1.707614701*ke,yr=gt/(gt*gt-.5*vr*Go),xt=-vr*yr;mt=br>=0?mt:1e6,bt=xr>=0?bt:1e6,xt=yr>=0?xt:1e6,i+=Math.min(mt,Math.min(bt,xt))}}}return i}function qe(e,t,r=null){r||(r=er(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function it(e,t,r){let n=er(t,r),o=Ka(t,r,e,1,e,n),a=qe(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),l=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),d=o/Math.min(e*a[0],(1-e)*a[1]),p=e*i,c=(1-e)*l,b=.9*d*Math.sqrt(Math.sqrt(1/(1/(p*p*p*p)+1/(c*c*c*c))));return p=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(p*p)+1/(c*c))),b,o]}function lt(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Ne(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,l,d]=it(t,r/a,n/a),p;if(alt(V(e))},toMode:{oklab:st,rgb:e=>Q(st(e))}},yo=Ua;function ft(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[l,d]=qe(a,i),p=.5,c=1-p/l,b=d/(o+t*d),h=b*t,v=b*o,w=ne(h),L=v*w/h,T=D({l:w,a:a*L,b:i*L}),H=Math.cbrt(1/Math.max(T.r,T.g,T.b,0));t=t/H,o=o/H*Ne(t)/t,t=Ne(t);let R={mode:"okhsv",s:o?(p+d)*v/(d*p+d*c*v):0,v:t?t/h:0};return R.s&&(R.h=x(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(R.alpha=e.alpha),R}function dt(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[l,d]=qe(a,i),p=.5,c=1-p/l,b=1-n*p/(p+d-d*c*n),h=n*d*p/(p+d-d*c*n),v=ne(b),w=h*v/b,L=D({l:v,a:a*w,b:i*w}),T=Math.cbrt(1/Math.max(L.r,L.g,L.b,0)),H=ne(o*b),R=h*H/b;return t.l=H*T,t.a=R*a*T,t.b=R*i*T,t}var Va={...Ke,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ft,rgb:e=>ft(V(e))},toMode:{oklab:dt,rgb:e=>Q(dt(e))}},Mo=Va;function Qa(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*.4/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*.4/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var wo=Qa;var ei={...he,mode:"oklab",toMode:{lrgb:D,rgb:Q},fromMode:{lrgb:at,rgb:V},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[wo],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},To=ei;function ti(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*.4/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var ko=ti;var ri={...be,mode:"oklch",toMode:{oklab:e=>P(e,"oklab"),rgb:e=>Q(P(e,"oklab"))},fromMode:{rgb:e=>I(V(e),"oklch"),oklab:e=>I(e,"oklch")},parse:[ko],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},zo=ri;var oi=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},tr=oi;var ni=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=N({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},rr=ni;var ai={...C,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>rr(_(e)),xyz65:rr},toMode:{rgb:e=>S(tr(e)),xyz65:tr}},Lo=ai;var or=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},ii=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:or(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:or(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:or(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},nr=ii;var ar=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},li=e=>{let t=ar(e.r),r=ar(e.g),n=ar(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ir=li;var si={...C,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:nr,rgb:e=>nr(A(e))},toMode:{xyz50:ir,rgb:e=>$(ir(e))}},Ro=si;var Xo=1.09929682680944,fi=.018053968510807,lr=e=>{let t=Math.abs(e);return t>fi?(Math.sign(e)||1)*(Xo*Math.pow(t,.45)-(Xo-1)):4.5*e},di=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:lr(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:lr(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:lr(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},sr=di;var Ho=1.09929682680944,ui=.018053968510807,fr=(e=0)=>{let t=Math.abs(e);return t{let t=fr(e.r),r=fr(e.g),n=fr(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},dr=pi;var ci={...C,mode:"rec2020",fromMode:{xyz65:sr,rgb:e=>sr(_(e))},toMode:{xyz65:dr,rgb:e=>S(dr(e))},parse:["rec2020"],serialize:"rec2020"},_o=ci;var J=.0037930732552754493,ut=Math.cbrt(J);var ur=e=>Math.cbrt(e)-ut,mi=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a=ur(.3*t+.622*r+.078*n+J),i=ur(.23*t+.692*r+.078*n+J),l=ur(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+J),d={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:l-(a+i)/2};return o!==void 0&&(d.alpha=o),d},So=mi;var pr=e=>Math.pow(e+ut,3),hi=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=pr(e+t)-J,a=pr(t-e)-J,i=pr(r+t)-J,l=N({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(l.alpha=n),l},Io=hi;var bi={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Io},fromMode:{rgb:So},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:f,y:f,b:f,alpha:{use:f,fixup:m}}},Po=bi;var gi={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:$,lab:me},fromMode:{rgb:A,lab:ce},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},Co=gi;var xi=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},Oo=xi;var vi=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},No=vi;var yi={mode:"xyz65",toMode:{rgb:S,xyz50:Oo},fromMode:{rgb:_,xyz50:No},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},qo=yi;var Mi=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},$o=Mi;var wi=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},Ao=wi;var Ti={mode:"yiq",toMode:{rgb:Ao},fromMode:{rgb:$o},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:f,i:f,q:f,alpha:{use:f,fixup:m}}},Do=Ti;function cr(e){let t=W("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function pt(e,t){let r=cr(e),n=cr(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Ec=g(Ar),Yc=g(Br),Wc=g(Ur),Gc=g(Vr),Zc=g(Qr),Bc=g(Fe),Fc=g(Ke),Kc=g(no),Uc=g(io),Vc=g(so),Qc=g(fo),em=g(he),tm=g(po),rm=g(be),om=g(mo),nm=g(go),am=g(xo),im=g(vo),lm=g(yo),sm=g(Mo),fm=g(To),dm=g(zo),um=g(Lo),pm=g(Ro),cm=g(_o),mm=g(C),hm=g(Po),bm=g(Co),gm=g(qo),xm=g(Do);var jo={descriptions:[{criteria:{hsl:{h:null,s:[.75,1],l:[.4,.55]}},descriptive:["saturated","strong","lush","ablaze","beaming","bold","brilliant","flamboyant","vibrant","vivid","loud"]},{criteria:{hsl:{h:null,s:null,l:[0,.07]}},descriptive:["dark","ashy","somber","bleak","muddy","sooty"]},{criteria:{hsl:{h:null,s:null,l:[0,.3]}},descriptive:["dark","dim","gloomy","dull"]},{criteria:{hsl:{h:null,s:[.1,.7],l:[.15,.5]}},descriptive:["bleak","muted","matte","dusty"]},{criteria:{hsl:{h:null,s:[.12,1],l:[.7,1]}},descriptive:["tinted"]},{criteria:{hsl:{h:null,s:[.2,1],l:[.75,.95]}},descriptive:["pastel"]},{criteria:{hsl:{h:null,s:null,l:[.88,1]}},descriptive:["pale","light","faded","delicate","glistening","bleached"]},{criteria:{hsl:{h:null,s:[.5,1],l:[.7,.9]}},descriptive:["fresh","sparkling","glittering","glowing","jazzy","opalescent"]},{criteria:{hsl:{h:null,s:null,l:[.9,1]}},descriptive:["neutral"]},{criteria:{hsl:{h:null,s:[.74,1],l:[.9,1]}},descriptive:["muted"]},{criteria:{hsl:{h:null,s:null,l:1}},descriptive:["colorless","bright","brilliant","high"]},{criteria:{hsl:{h:null,s:null,l:0}},descriptive:["colorless","low","dark"]},{criteria:{hsl:{h:null,s:[0,.01],l:null}},descriptive:["colorless","neutral"]},{criteria:{hsl:{h:null,s:null,l:[.01,.3]}},descriptive:["shady"]},{criteria:{hsl:{h:null,s:[0,.4],l:null}},descriptive:["ashy","dusty"]},{criteria:{hsl:{h:null,s:null,l:[.01,.08]}},descriptive:["almost black"]},{criteria:{hsl:{h:null,s:null,l:[0,.02]}},descriptive:["black"]},{criteria:{hsl:{h:null,s:null,l:[0,.09]}},descriptive:["very dark"]},{criteria:{hsl:{h:null,s:[0,.4],l:[0,.22]}},descriptive:["dark"]},{criteria:{hsl:{h:null,s:[.1,.4],l:[0,.6]}},descriptive:["dark","inky","dim","gloomy"]},{criteria:{hsl:{h:null,s:[0,.04],l:[.1,.99]}},descriptive:["grey"],nouns:["grey"],description:["Grey is a color often linked with neutrality, balance, and calm. It sits between black and white on the color spectrum, giving it a muted, understated quality. When you think of grey, you might picture misty mornings, smooth stone, or the quiet stillness of a cloudy day. It's a versatile color, fitting equally well in minimalist designs or more somber settings. Grey can evoke feelings of tranquility, contemplation, and sophistication. Close your eyes and imagine grey\u2014it might appear as a soft shadow or a subtle haze that wraps the world in a calm, muted tone."]},{criteria:{hsl:{h:null,s:[.04,.1],l:[.17,.99]}},descriptive:["almost grey"]},{criteria:{hsl:{h:null,s:[.1,.3],l:[.17,.99]}},descriptive:["very unsaturated"]},{criteria:{hsl:{h:null,s:[.3,.46],l:null}},descriptive:["unsaturated"]},{criteria:{hsl:{h:null,s:[.46,.6],l:[.4,.55]}},descriptive:["rather unsaturated"]},{criteria:{hsl:{h:null,s:[.601,.8],l:[.45,.6]}},descriptive:["saturated"]},{criteria:{hsl:{h:null,s:[.801,.94],l:[.45,.6]}},descriptive:["rather saturated"]},{criteria:{hsl:{h:null,s:[.941,1],l:[.45,.6]}},descriptive:["very saturated"]},{criteria:{hsl:{h:[0,90],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[270,360],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[90.01,269.99],s:null,l:[.1,1]}},descriptive:["cold","cool"]},{criteria:{hsl:{h:null,s:null,l:[.98,1]}},nouns:["white"],description:["White is a color that is often associated with purity, innocence, and cleanliness. It is the lightest color on the visible spectrum and is often described as having a bright, luminous quality. When you think of white, you might imagine a freshly fallen snow, a blank canvas, or a cloudless sky. It is a versatile color that can be used in a wide range of settings and contexts, from formal to casual. If you close your eyes and picture white, you might imagine a bright, radiant light that illuminates everything around it."],meanings:["purity","cleanliness","simplicity","innocence","freshness","light","goodness","virtue","safety","peace","tranquility","wholeness","perfection","honesty","truth","sincerity"],usage:["health","hospital","sanitary"]},{criteria:{hsl:{h:null,s:null,l:[0,.08]}},nouns:["black"],description:["Black is a color that is often associated with power, elegance, and sophistication. It is a color that is often used to create a sense of mystery, depth, and contrast, and it is often described as a color that can be both bold and elegant. In art and design, black is often used to create a sense of sophistication and drama, and it is often used in fashion to create a sense of sophistication and refinement."],meanings:["power","control","authority","discipline","discretion","secrecy","elegance","mystery"],usage:["intimidate","create fear","authority","luxury"]},{criteria:{hsl:{h:[0,15],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage","excite"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.4,.99]}},descriptive:["orange"],nouns:["orange"],description:["Orange is a vibrant and playful color that is often associated with creativity, energy, and warmth. It is a secondary color that is made by combining red and yellow, and it is often described as a warm and friendly color that can be both invigorating and calming. It is often associated with joy, enthusiasm, and warmth, and it is often used in art and design to create a sense of excitement and playfulness."],meanings:["optimism","independence","adventure","creativity","fun"],usage:["stimulate","draw attention","express freedom","fascinate"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.07,.4]}},descriptive:["brown"],nouns:["brown"],description:["Brown is a warm and earthy color that is often associated with nature, stability, and reliability. It is a secondary color that is made by combining red, blue, and yellow in different proportions, and it is often described as a rich and luxurious color that can be both comforting and grounding. It is often associated with wood, soil, and the natural world, and it is often used in art and design to create a sense of warmth and permanence."],meanings:["strength","reliability","resilience","loneliness","sadness","isolation","warmth","comfort","security"],usage:["agriculture","legal","food","tobacco","alcohol"]},{criteria:{hsl:{h:[45,70],s:[.1,1],l:[.07,.99]}},descriptive:["yellow"],nouns:["yellow"],description:["Yellow is a bright and cheerful color that is often associated with sunshine, happiness, and warmth. It is a primary color that is made by combining red and green light, and it is usually described as a warm and vibrant color that can be both calming and energizing. It is often associated with joy, happiness, and friendship, and it is often used in art and design to create a sense of cheerfulness and playfulness."],meanings:["enthusiasm","opportunity","spontaneity","happiness","positivity"],usage:["stimulate","relax","awake awareness","energize","affect mood","sale","cheap","budget","construction","convey competence"]},{criteria:{hsl:{h:[70,79],s:[.1,1],l:[.07,.99]}},descriptive:["lime"],nouns:["lime"],description:["Lime is a bright, vibrant color that is often associated with freshness, energy, and youth. It is a pale shade of green that is similar to chartreuse, but it is slightly lighter and more vibrant. Some people may associate the color lime with feelings of playfulness and excitement, while others may associate it with feelings of rejuvenation and renewal. In terms of wavelength, lime is a mixture of green and yellow light, and it is often used in art and design to create a sense of energy and vitality. Overall, lime is a lively and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["growth","harmony","fertility","kindness","dependability"],usage:["restore energy","promote growth","awake awareness","rejuvenate","nature"]},{criteria:{hsl:{h:[79,163],s:[.1,1],l:[.07,.99]}},descriptive:["green","greenish"],nouns:["green"],description:["Green is a cool, refreshing color that is often associated with nature, growth, and freshness. It is the color of grass, leaves, and trees, and it is often used to create a sense of harmony and balance. Some people may associate the color green with feelings of jealousy or envy, while others may associate it with feelings of peace and tranquility. In terms of wavelength, green is a primary color of light, and it is located between blue and yellow on the visible light spectrum. It is often used in art and design to create a sense of growth and renewal. Overall, green is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["safety","harmony","stability","reliability","balance"],usage:["relax","ballance","revitalize","encourage","posses"]},{criteria:{hsl:{h:[163,193],s:[.1,1],l:[.07,.99]}},descriptive:["cyan"],nouns:["cyan","sky blue"],description:["Cyan is a bright, fresh color that is often associated with the ocean, the sky, and the natural world. It is a pale shade of blue that is similar to teal, but it is slightly lighter and more muted. Some people may associate the color cyan with feelings of peace and serenity, while others may associate it with feelings of youth and playfulness. In terms of wavelength, cyan is a mixture of blue and green light, and it is often used in art and design to create a sense of freshness and vitality. Overall, cyan is a versatile and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["freedom","trust","wisdom","joy","refreshing","consciousness","stimulating"],usage:["self expression","communication","children products","technology","aerospace","entertainment","productivity"]},{criteria:{hsl:{h:[193,240],s:[.1,1],l:[.07,.99]}},descriptive:["blue","blueish"],nouns:["blue"],description:["Blue is a cool, calming color that is often associated with trust, reliability, and intelligence. It is the color of the sky and the ocean, and it is often used to create a sense of peace and tranquility. Some people may associate the color blue with feelings of sadness or melancholy, while others may associate it with feelings of calm and relaxation. In terms of wavelength, blue is a primary color of light, and it is located between green and violet on the visible light spectrum. It is often used in art and design to create a sense of balance and harmony. Overall, blue is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["trust","responsibility","honesty","loyalty","security","relying","calmness","control"],usage:["security","finance","technology","health care","accounting"]},{criteria:{hsl:{h:[240,260],s:[.1,1],l:[.07,.99]}},descriptive:["indigo"],nouns:["indigo"],description:["Indigo is a deep, rich color that is often associated with spirituality, intuition, and wisdom. It is a dark shade of blue that is similar to navy, but it is slightly lighter and more muted. Some people may associate the color indigo with feelings of calm and relaxation, while others may associate it with feelings of mystery and intrigue. In terms of wavelength, indigo is a deep blue color that is located between blue and violet on the visible light spectrum. It is often used in art and design to add a touch of depth and complexity. Overall, indigo is a beautiful and versatile color that can be used to create a wide range of moods and atmospheres."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[260,270],s:[.1,1],l:[.07,.99]}},descriptive:["violet"],nouns:["violet"],description:["Violet is a rich, regal color that is often associated with luxury, royalty, and sophistication. It is a deep shade of purple that is similar to lavender, but it is slightly darker and more intense. Some people may associate the color violet with feelings of mystery and spirituality, while others may associate it with feelings of calm and tranquility. In terms of wavelength, violet is a mixture of blue and red light, and it is often used in art and design to add a touch of elegance and refinement. Overall, violet is a beautiful and sophisticated color that can be used to create a calm and peaceful atmosphere."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[270,291],s:[.1,1],l:[.07,.99]}},descriptive:["purple","purplish"],nouns:["purple"],description:["Purple is a rich and vibrant color that is often associated with royalty, luxury, and creativity. It is a combination of blue and red, with more red than blue, giving it a warm and passionate quality. The shade of purple can vary from a deep, dark hue to a light, almost lavender color, and each shade can evoke different emotions and meanings. Some people may associate purple with spirituality and mysticism, while others may see it as a symbol of extravagance and decadence. In terms of wavelength, purple is located between blue and violet on the visible light spectrum and has a shorter wavelength than most other colors. Because of its striking and eye-catching nature, purple is frequently used in fashion, art, and design to add a pop of color and flair. Overall, purple is a captivating and dynamic color that can express a wide range of moods and emotions, making it a favorite among many people."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic","royalty"]},{criteria:{hsl:{h:[291,327],s:[.1,1],l:[.07,.99]}},descriptive:["magenta"],nouns:["magenta"],description:["Magenta is a deep, rich color that is often associated with creativity, passion, and intensity. It is a vibrant shade of pink that is similar to fuchsia, but it is slightly darker and more muted. Some people may associate the color magenta with feelings of excitement and energy, while others may associate it with feelings of love and romance. In terms of wavelength, magenta is a mixture of red and blue light, and it is often used in art and design to add a bold and striking touch. Overall, magenta is a vibrant and lively color that can be used to add drama and excitement to any setting."],meanings:["support","kind","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products",,"erotica"]},{criteria:{hsl:{h:[327,344],s:[.1,1],l:[.07,.99]}},descriptive:["pink"],nouns:["pink"],description:["Pink is a light, delicate color that is often associated with femininity, romance, and sweetness. It is a pale shade of red, and it is often described as a softer, more gentle version of the color. Some people may associate the color pink with feelings of happiness and playfulness, while others may associate it with feelings of warmth and comfort. In terms of wavelength, pink is a mixture of red and white light, and it is often used in decorations and clothing to add a touch of whimsy and fun. Overall, pink is a cheerful and playful color that can be used to create a warm and inviting atmosphere."],meanings:["support","kindness","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products","erotica"]},{criteria:{hsl:{h:[344,360],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage"]}],temperatures:[{value:1800,descriptive:["ultra warm"]},{value:2400,descriptive:["very warm"]},{value:2700,descriptive:["warm"]},{value:3e3,descriptive:["warm white"]},{value:4e3,descriptive:["cool or cold"]},{value:6500,descriptive:["cool"]}],percentWords:[{maxPercentile:.06,word:"a dash of"},{maxPercentile:.16,word:"a little bit of"},{maxPercentile:.31,word:"some"},{maxPercentile:.56,word:"a good bit of"},{maxPercentile:.71,word:"a lot of"},{maxPercentile:.86,word:"a whole lot of"},{maxPercentile:.99,word:"neatly entirely"},{maxPercentile:1,word:"entirely"}]};var Jo={rgb:W("rgb"),hsl:W("hsl")},ki={rgb:["r","g","b"],cmyk:["c","m","y","k"],hsl:["h","s","l"]},j,Eo,ge,mr=class{constructor(t,r=jo){wr(this,j);vt(this,"formats",{});vt(this,"currentColor",null);this.color=t,this.descriptions=r.descriptions,this.temperatures=r.temperatures,this.percentWords=r.percentWords}set color(t){this.currentColor=te(this,j,Eo).call(this,t);let r=Jo.rgb(this.currentColor);this.formats.rgb=r,this.formats.hsl=Jo.hsl(this.currentColor),this.formats.cmyk=zr(r)}get color(){return this.currentColor}get temperatureWords(){let t=Tr(this.formats.rgb);return this.temperatures.reduce((r,n)=>Math.abs(n.value-t)r[a]),o=n.reduce((a,i)=>a+i,0);return n.map(a=>o?a/o:0)}percentageWords(t="rgb"){return this.percentages(t).map(r=>this.percentWords.find(n=>n.maxPercentile>=r).word)}get descriptiveWords(){return te(this,j,ge).call(this,"descriptive")}get nouns(){return te(this,j,ge).call(this,"nouns")}get meanings(){return te(this,j,ge).call(this,"meanings")}get usage(){return te(this,j,ge).call(this,"usage")}get description(){return te(this,j,ge).call(this,"description")}get bestContrast(){return pt(this.color,"black")>pt(this.color,"white")?"black":"white"}getDescriptiveList(t,r){let n=[...this.descriptiveWords];if(t&&(n=Mt(n)),r&&(n=n.slice(0,r)),n.length>1){let o=n.pop();return`${n.join(", ")} and ${o}`}else return n[0]}};j=new WeakSet,Eo=function(t){try{return Le(t)}catch{throw new TypeError("Invalid color. Check the chroma-js documentation.")}},ge=function(t="descriptive",r=!1,n){let o=this.descriptions.reduce((a,i)=>i.hasOwnProperty(t)&&Object.keys(i.criteria).every(p=>{let c=this.formats[p];return Object.entries(i.criteria[p]).every(([b,h])=>{if(!(b in c)||c[b]===void 0||c[b]===null||h===null)return!0;let v=c[b];return Array.isArray(h)?kr(v,h[0],h[1]):isNaN(h)?!1:v===h})})?[...new Set([...a,...i[t]])]:a,[]);return r?Mt(o).slice(0,n):o.slice(0,n)};var Xm=mr;export{Xm as default}; +`||t[u]===" "||t[u]===" ");)u++;let o;if(je(t)&&(o=Xe(t),o.type!==s.Hue)){r.push({type:s.Alpha,value:o});continue}if(kt(t)&&Ee(t)==="none"){r.push({type:s.Alpha,value:{type:s.None,value:void 0}});continue}return}if(/\d/.test(n)){u--,r.push(Xe(t));continue}if(Tt.test(n)){u--,r.push(bn(t));continue}return}return r}function xn(e){e._i=0;let t=e[e._i++];if(!t||t.type!==s.Function||t.value!=="color"||(t=e[e._i++],t.type!==s.Ident))return;let r=wt[t.value];if(!r)return;let n={mode:r},o=Cr(e,!1);if(!o)return;let a=Pr(r).channels;for(let i=0,l,d;i4)){if(r.length===4){if(r[3].type!==s.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:s.None,value:void 0}),r.every(o=>o.type!==s.Alpha)?r:void 0}}function vn(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==s.Function)return;let n=Cr(e,t);if(n)return n.unshift(r.value),n}var yn=e=>{if(typeof e!="string")return;let t=gn(e),r=t?vn(t,!0):void 0,n,o=0,a=Re.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Nr=wn;var qr=(e,t,r)=>e+r*(t-e);var Tn=e=>{let t=[];for(let r=0;rt=>{let r=Tn(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var f=$r(qr);var m=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var kn={mode:"rgb",channels:["r","g","b","alpha"],parse:[Or,Xr,_r,Rr,Nr,"srgb"],serialize:"srgb",interpolate:{r:f,g:f,b:f,alpha:{use:f,fixup:m}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},C=kn;var zt=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),zn=e=>{let t=zt(e.r),r=zt(e.g),n=zt(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Lt=zn;var Rt=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Ln=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:Rt(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:Rt(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:Rt(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},Xt=Ln;var Ht=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Rn=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Ht(e),g:Ht(t),b:Ht(r)};return n!==void 0&&(o.alpha=n),o},O=Rn;var Xn=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},_=Xn;var _t=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Hn=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:_t(e),g:_t(t),b:_t(r)};return n!==void 0&&(a.alpha=n),a},N=Hn;var _n=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=N({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},S=_n;var Sn={...C,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Xt(_(e)),xyz65:Xt},toMode:{rgb:e=>S(Lt(e)),xyz65:Lt}},Ar=Sn;var In=e=>(e=e%360)<0?e+360:e,v=In;var Pn=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=v(r);return n===0||e[n-1]===void 0?a:t(a-v(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),k=e=>Pn(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var M=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Dr=Math.PI/180,jr=180/Math.PI;var Jr=M[3]*M[4],Er=M[1]*M[4],Yr=M[1]*M[2]-M[0]*M[3],Cn=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Yr*r+e*Jr-t*Er)/(Yr+Jr-Er),a=r-o,i=(M[4]*(t-o)-M[2]*a)/M[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(M[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(i,a)*jr-120),n!==void 0&&(l.alpha=n),l},Wr=Cn;var On=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Dr,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),l=Math.sin(e);return o.r=r+a*(M[0]*i+M[1]*l),o.g=r+a*(M[2]*i+M[3]*l),o.b=r+a*(M[4]*i+M[5]*l),n!==void 0&&(o.alpha=n),o},Gr=On;var G=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=v(e.h),n=v(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Zr=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=v(e.h),n=v(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},Z=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=v(e.h),n=v(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var z=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Nn={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Wr},toMode:{rgb:Gr},interpolate:{h:{use:f,fixup:k},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:G},average:{h:z}},Br=Nn;var qn=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=v(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},I=qn;var $n=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},P=$n;var Ye=Math.pow(29,3)/Math.pow(3,3),We=Math.pow(6,3)/Math.pow(29,3);var y={X:.9642956764295677,Y:1,Z:.8251046025104602},B={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},Kl=Math.pow(29,3)/Math.pow(3,3),Ul=Math.pow(6,3)/Math.pow(29,3);var St=e=>Math.pow(e,3)>We?Math.pow(e,3):(116*e-16)/Ye,An=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz65",x:St(a)*B.X,y:St(o)*B.Y,z:St(i)*B.Z};return n!==void 0&&(l.alpha=n),l},Ge=An;var Dn=e=>S(Ge(e)),F=Dn;var It=e=>e>We?Math.cbrt(e):(Ye*e+16)/116,jn=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=It(e/B.X),a=It(t/B.Y),i=It(r/B.Z),l={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},Ze=jn;var Jn=e=>{let t=Ze(_(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},K=Jn;var oe=.14444444444444443*Math.PI,ie=Math.cos(oe),le=Math.sin(oe),Be=100/Math.log(139/100);var En=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Be)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-oe),l=a*Math.sin(r/180*Math.PI-oe);return o.a=i*ie-l/.83*le,o.b=i*le+l/.83*ie,n!==void 0&&(o.alpha=n),o},_e=En;var Yn=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*ie+r*le,a=.83*(r*ie-t*le),i=Math.sqrt(o*o+a*a),l={mode:"dlch",l:Be/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return l.c&&(l.h=v((Math.atan2(a,o)+oe)/Math.PI*180)),n!==void 0&&(l.alpha=n),l},Se=Yn;var Fr=e=>_e(I(e,"dlch")),Kr=e=>P(Se(e),"dlab"),Wn={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Fr,rgb:e=>F(Fr(e))},fromMode:{lab65:Kr,rgb:e=>Kr(K(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},Ur=Wn;var Gn={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:_e,dlab:e=>P(e,"dlab"),rgb:e=>F(_e(e))},fromMode:{lab65:Se,dlab:e=>I(e,"dlch"),rgb:e=>Se(K(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:f,c:f,h:{use:f,fixup:k},alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},Vr=Gn;function Ct({h:e,s:t,i:r,alpha:n}){e=v(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Ot({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},eo=Bn;var Fn=new RegExp(`^hsla?\\(\\s*${Hr}${Y}${re}${Y}${re}\\s*(?:,\\s*${ze}\\s*)?\\)$`),Kn=e=>{let t=e.match(Fn);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=eo(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},to=Kn;function Un(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.s=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.l=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var ro=Un;var Vn={mode:"hsl",toMode:{rgb:Nt},fromMode:{rgb:qt},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[ro,to],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:k},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:G},average:{h:z}},Fe=Vn;function Ie({h:e,s:t,v:r,alpha:n}){e=v(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Pe({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t1){let o=t+r;t/=o,r/=o}return Ie({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function At(e){let t=Pe(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function ea(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.w=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.b=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var oo=ea;var ta={mode:"hwb",toMode:{rgb:$t},fromMode:{rgb:At},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[oo],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:k},w:f,b:f,alpha:{use:f,fixup:m}},difference:{h:Zr},average:{h:z}},no=ta;var se=.1593017578125,ao=78.84375,fe=.8359375,de=18.8515625,ue=18.6875;function Ue(e){if(e<0)return 0;let t=Math.pow(e,1/ao);return 1e4*Math.pow(Math.max(0,t-fe)/(de-ue*t),1/se)}function Ve(e){if(e<0)return 0;let t=Math.pow(e/1e4,se);return Math.pow((fe+de*t)/(1+ue*t),ao)}var Dt=e=>Math.max(e/203,0),oa=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ue(e+.008609037037932761*t+.11102962500302593*r),a=Ue(e-.00860903703793275*t-.11102962500302599*r),i=Ue(e+.5600313357106791*t-.32062717498731885*r),l={mode:"xyz65",x:Dt(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:Dt(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:Dt(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(l.alpha=n),l},jt=oa;var Jt=(e=0)=>Math.max(e*203,0),na=({x:e,y:t,z:r,alpha:n})=>{let o=Jt(e),a=Jt(t),i=Jt(r),l=Ve(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),d=Ve(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),p=Ve(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*l+.5*d,h=1.61376953125*l-3.323486328125*d+1.709716796875*p,b=4.378173828125*l-4.24560546875*d-.132568359375*p,x={mode:"itp",i:c,t:h,p:b};return n!==void 0&&(x.alpha=n),x},Et=na;var aa={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:jt,rgb:e=>S(jt(e))},fromMode:{xyz65:Et,rgb:e=>Et(_(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:f,t:f,p:f,alpha:{use:f,fixup:m}}},io=aa;var ia=134.03437499999998,la=16295499532821565e-27,Yt=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,se);return Math.pow((fe+de*t)/(1+ue*t),ia)},Wt=(e=0)=>Math.max(e*203,0),sa=({x:e,y:t,z:r,alpha:n})=>{e=Wt(e),t=Wt(t),r=Wt(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=Yt(.41478972*o+.579999*a+.014648*r),l=Yt(-.20151*o+1.120649*a+.0531008*r),d=Yt(-.0166008*o+.2648*a+.6684799*r),p=(i+l)/2,c={mode:"jab",j:.44*p/(1-.56*p)-la,a:3.524*i-4.066708*l+.542708*d,b:.199076*i+1.096799*l-1.295875*d};return n!==void 0&&(c.alpha=n),c},Qe=sa;var fa=134.03437499999998,lo=16295499532821565e-27,Gt=e=>{if(e<0)return 0;let t=Math.pow(e,1/fa);return 1e4*Math.pow((fe-t)/(ue*t-de),1/se)},Zt=e=>e/203,da=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+lo)/(.44+.56*(e+lo)),a=Gt(o+.13860504*t+.058047316*r),i=Gt(o-.13860504*t-.058047316*r),l=Gt(o-.096019242*t-.8118919*r),d={mode:"xyz65",x:Zt(1.661373024652174*a-.914523081304348*i+.23136208173913045*l),y:Zt(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*l),z:Zt(-.090982811*a-.31272829*i+1.5227666*l)};return n!==void 0&&(d.alpha=n),d},et=da;var ua=e=>{let t=Qe(_(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tt=ua;var pa=e=>S(et(e)),rt=pa;var ca={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:tt,xyz65:Qe},toMode:{rgb:rt,xyz65:et},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:f,a:f,b:f,alpha:{use:f,fixup:m}}},so=ca;var ma=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=v(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Bt=ma;var ha=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Ft=ha;var ba={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Ft,rgb:e=>rt(Ft(e))},fromMode:{rgb:e=>Bt(tt(e)),jab:Bt},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:f,fixup:k},c:f,j:f,alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},fo=ba;var U=Math.pow(29,3)/Math.pow(3,3),pe=Math.pow(6,3)/Math.pow(29,3);var Kt=e=>Math.pow(e,3)>pe?Math.pow(e,3):(116*e-16)/U,ga=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz50",x:Kt(a)*y.X,y:Kt(o)*y.Y,z:Kt(i)*y.Z};return n!==void 0&&(l.alpha=n),l},ce=ga;var xa=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=N({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},$=xa;var va=e=>$(ce(e)),ot=va;var ya=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},A=ya;var Ut=e=>e>pe?Math.cbrt(e):(U*e+16)/116,Ma=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ut(e/y.X),a=Ut(t/y.Y),i=Ut(r/y.Z),l={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},me=Ma;var wa=e=>{let t=me(A(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},nt=wa;function Ta(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*125/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*125/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var uo=Ta;var ka={mode:"lab",toMode:{xyz50:ce,rgb:ot},fromMode:{xyz50:me,rgb:nt},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[uo],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},he=ka;var za={...he,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Ge,rgb:F},fromMode:{xyz65:Ze,rgb:K},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}},po=za;function La(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*150/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var co=La;var Ra={mode:"lch",toMode:{lab:P,rgb:e=>ot(P(e))},fromMode:{rgb:e=>I(nt(e)),lab:I},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[co],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:k},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},be=Ra;var Xa={...be,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>P(e,"lab65"),rgb:e=>F(P(e,"lab65"))},fromMode:{rgb:e=>I(K(e),"lch65"),lab65:e=>I(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},mo=Xa;var Ha=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=v(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Vt=Ha;var _a=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Qt=_a;var ho=(e,t,r)=>4*e/(e+15*t+3*r),bo=(e,t,r)=>9*t/(e+15*t+3*r),Sa=ho(y.X,y.Y,y.Z),Ia=bo(y.X,y.Y,y.Z),Pa=e=>e<=pe?U*e:116*Math.cbrt(e)-16,Ca=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Pa(t/y.Y),a=ho(e,t,r),i=bo(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-Sa),i=13*o*(i-Ia));let l={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(l.alpha=n),l},Ce=Ca;var Oa=(e,t,r)=>4*e/(e+15*t+3*r),Na=(e,t,r)=>9*t/(e+15*t+3*r),qa=Oa(y.X,y.Y,y.Z),$a=Na(y.X,y.Y,y.Z),Aa=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+qa,a=r/(13*e)+$a,i=y.Y*(e<=8?e/U:Math.pow((e+16)/116,3)),l=i*(9*o)/(4*a),d=i*(12-3*o-20*a)/(4*a),p={mode:"xyz50",x:l,y:i,z:d};return n!==void 0&&(p.alpha=n),p},Oe=Aa;var Da=e=>Vt(Ce(A(e))),ja=e=>$(Oe(Qt(e))),Ja={mode:"lchuv",toMode:{luv:Qt,rgb:ja},fromMode:{rgb:Da,luv:Vt},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:f,fixup:k},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:Z},average:{h:z}},go=Ja;var Ea={...C,mode:"lrgb",toMode:{rgb:N},fromMode:{rgb:O},parse:["srgb-linear"],serialize:"srgb-linear"},xo=Ea;var Ya={mode:"luv",toMode:{xyz50:Oe,rgb:e=>$(Oe(e))},fromMode:{xyz50:Ce,rgb:e=>Ce(A(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:f,u:f,v:f,alpha:{use:f,fixup:m}}},vo=Ya;var Wa=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*r),a=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*r),i=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*r),l={mode:"oklab",l:.2104542553*o+.793617785*a-.0040720468*i,a:1.9779984951*o-2.428592205*a+.4505937099*i,b:.0259040371*o+.7827717662*a-.808675766*i};return n!==void 0&&(l.alpha=n),l},at=Wa;var Ga=e=>{let t=at(O(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V=Ga;var Za=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*r,3),a=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*r,3),i=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*r,3),l={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*a+.230969928729428*i,g:-1.2684380040921763*o+2.6097574006633715*a-.3413193963102197*i,b:-.004196086541837188*o-.7034186144594493*a+1.7076147009309444*i};return n!==void 0&&(l.alpha=n),l},D=Za;var Ba=e=>N(D(e)),Q=Ba;function Ne(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function ne(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Fa(e,t){let r,n,o,a,i,l,d,p;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,l=4.0767416621,d=-3.3077115913,p=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,l=-1.2684380046,d=2.6097574011,p=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,l=-.0041960863,d=-.7034186147,p=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,h=.3963377774*e+.2158037573*t,b=-.1055613458*e-.0638541728*t,x=-.0894841775*e-1.291485548*t;{let w=1+c*h,L=1+c*b,T=1+c*x,H=w*w*w,R=L*L*L,E=T*T*T,xe=3*h*w*w,ve=3*b*L*L,ye=3*x*T*T,Me=6*h*h*w,we=6*b*b*L,Te=6*x*x*T,ae=l*H+d*R+p*E,ee=l*xe+d*ve+p*ye,ke=l*Me+d*we+p*Te;c=c-ae*ee/(ee*ee-.5*ae*ke)}return c}function er(e,t){let r=Fa(e,t),n=D({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function Ka(e,t,r,n,o,a=null){a||(a=er(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let l=r-o,d=n,p=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t,b=l+d*p,x=l+d*c,w=l+d*h;{let L=o*(1-i)+i*r,T=i*n,H=L+T*p,R=L+T*c,E=L+T*h,xe=H*H*H,ve=R*R*R,ye=E*E*E,Me=3*b*H*H,we=3*x*R*R,Te=3*w*E*E,ae=6*b*b*H,ee=6*x*x*R,ke=6*w*w*E,hr=4.0767416621*xe-3.3077115913*ve+.2309699292*ye-1,ct=4.0767416621*Me-3.3077115913*we+.2309699292*Te,Yo=4.0767416621*ae-3.3077115913*ee+.2309699292*ke,br=ct/(ct*ct-.5*hr*Yo),mt=-hr*br,gr=-1.2684380046*xe+2.6097574011*ve-.3413193965*ye-1,ht=-1.2684380046*Me+2.6097574011*we-.3413193965*Te,Wo=-1.2684380046*ae+2.6097574011*ee-.3413193965*ke,xr=ht/(ht*ht-.5*gr*Wo),bt=-gr*xr,vr=-.0041960863*xe-.7034186147*ve+1.707614701*ye-1,gt=-.0041960863*Me-.7034186147*we+1.707614701*Te,Go=-.0041960863*ae-.7034186147*ee+1.707614701*ke,yr=gt/(gt*gt-.5*vr*Go),xt=-vr*yr;mt=br>=0?mt:1e6,bt=xr>=0?bt:1e6,xt=yr>=0?xt:1e6,i+=Math.min(mt,Math.min(bt,xt))}}}return i}function qe(e,t,r=null){r||(r=er(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function it(e,t,r){let n=er(t,r),o=Ka(t,r,e,1,e,n),a=qe(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),l=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),d=o/Math.min(e*a[0],(1-e)*a[1]),p=e*i,c=(1-e)*l,h=.9*d*Math.sqrt(Math.sqrt(1/(1/(p*p*p*p)+1/(c*c*c*c))));return p=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(p*p)+1/(c*c))),h,o]}function lt(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Ne(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,l,d]=it(t,r/a,n/a),p;if(alt(V(e))},toMode:{oklab:st,rgb:e=>Q(st(e))}},yo=Ua;function ft(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[l,d]=qe(a,i),p=.5,c=1-p/l,h=d/(o+t*d),b=h*t,x=h*o,w=ne(b),L=x*w/b,T=D({l:w,a:a*L,b:i*L}),H=Math.cbrt(1/Math.max(T.r,T.g,T.b,0));t=t/H,o=o/H*Ne(t)/t,t=Ne(t);let R={mode:"okhsv",s:o?(p+d)*x/(d*p+d*c*x):0,v:t?t/b:0};return R.s&&(R.h=v(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(R.alpha=e.alpha),R}function dt(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[l,d]=qe(a,i),p=.5,c=1-p/l,h=1-n*p/(p+d-d*c*n),b=n*d*p/(p+d-d*c*n),x=ne(h),w=b*x/h,L=D({l:x,a:a*w,b:i*w}),T=Math.cbrt(1/Math.max(L.r,L.g,L.b,0)),H=ne(o*h),R=b*H/h;return t.l=H*T,t.a=R*a*T,t.b=R*i*T,t}var Va={...Ke,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ft,rgb:e=>ft(V(e))},toMode:{oklab:dt,rgb:e=>Q(dt(e))}},Mo=Va;function Qa(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*.4/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*.4/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var wo=Qa;var ei={...he,mode:"oklab",toMode:{lrgb:D,rgb:Q},fromMode:{lrgb:at,rgb:V},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[wo],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},To=ei;function ti(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*.4/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var ko=ti;var ri={...be,mode:"oklch",toMode:{oklab:e=>P(e,"oklab"),rgb:e=>Q(P(e,"oklab"))},fromMode:{rgb:e=>I(V(e),"oklch"),oklab:e=>I(e,"oklch")},parse:[ko],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},zo=ri;var oi=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},tr=oi;var ni=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=N({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},rr=ni;var ai={...C,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>rr(_(e)),xyz65:rr},toMode:{rgb:e=>S(tr(e)),xyz65:tr}},Lo=ai;var or=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},ii=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:or(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:or(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:or(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},nr=ii;var ar=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},li=e=>{let t=ar(e.r),r=ar(e.g),n=ar(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ir=li;var si={...C,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:nr,rgb:e=>nr(A(e))},toMode:{xyz50:ir,rgb:e=>$(ir(e))}},Ro=si;var Xo=1.09929682680944,fi=.018053968510807,lr=e=>{let t=Math.abs(e);return t>fi?(Math.sign(e)||1)*(Xo*Math.pow(t,.45)-(Xo-1)):4.5*e},di=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:lr(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:lr(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:lr(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},sr=di;var Ho=1.09929682680944,ui=.018053968510807,fr=(e=0)=>{let t=Math.abs(e);return t{let t=fr(e.r),r=fr(e.g),n=fr(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},dr=pi;var ci={...C,mode:"rec2020",fromMode:{xyz65:sr,rgb:e=>sr(_(e))},toMode:{xyz65:dr,rgb:e=>S(dr(e))},parse:["rec2020"],serialize:"rec2020"},_o=ci;var J=.0037930732552754493,ut=Math.cbrt(J);var ur=e=>Math.cbrt(e)-ut,mi=e=>{let{r:t,g:r,b:n,alpha:o}=O(e),a=ur(.3*t+.622*r+.078*n+J),i=ur(.23*t+.692*r+.078*n+J),l=ur(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+J),d={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:l-(a+i)/2};return o!==void 0&&(d.alpha=o),d},So=mi;var pr=e=>Math.pow(e+ut,3),hi=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=pr(e+t)-J,a=pr(t-e)-J,i=pr(r+t)-J,l=N({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(l.alpha=n),l},Io=hi;var bi={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Io},fromMode:{rgb:So},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:f,y:f,b:f,alpha:{use:f,fixup:m}}},Po=bi;var gi={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:$,lab:me},fromMode:{rgb:A,lab:ce},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},Co=gi;var xi=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},Oo=xi;var vi=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},No=vi;var yi={mode:"xyz65",toMode:{rgb:S,xyz50:Oo},fromMode:{rgb:_,xyz50:No},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},qo=yi;var Mi=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},$o=Mi;var wi=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},Ao=wi;var Ti={mode:"yiq",toMode:{rgb:Ao},fromMode:{rgb:$o},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:f,i:f,q:f,alpha:{use:f,fixup:m}}},Do=Ti;function cr(e){let t=W("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function pt(e,t){let r=cr(e),n=cr(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Ec=g(Ar),Yc=g(Br),Wc=g(Ur),Gc=g(Vr),Zc=g(Qr),Bc=g(Fe),Fc=g(Ke),Kc=g(no),Uc=g(io),Vc=g(so),Qc=g(fo),em=g(he),tm=g(po),rm=g(be),om=g(mo),nm=g(go),am=g(xo),im=g(vo),lm=g(yo),sm=g(Mo),fm=g(To),dm=g(zo),um=g(Lo),pm=g(Ro),cm=g(_o),mm=g(C),hm=g(Po),bm=g(Co),gm=g(qo),xm=g(Do);var jo={descriptions:[{criteria:{hsl:{h:null,s:[.75,1],l:[.4,.55]}},descriptive:["saturated","strong","lush","ablaze","beaming","bold","brilliant","flamboyant","vibrant","vivid","loud"]},{criteria:{hsl:{h:null,s:null,l:[0,.07]}},descriptive:["dark","ashy","somber","bleak","muddy","sooty"]},{criteria:{hsl:{h:null,s:null,l:[0,.3]}},descriptive:["dark","dim","gloomy","dull"]},{criteria:{hsl:{h:null,s:[.1,.7],l:[.15,.5]}},descriptive:["bleak","muted","matte","dusty"]},{criteria:{hsl:{h:null,s:[.12,1],l:[.7,1]}},descriptive:["tinted"]},{criteria:{hsl:{h:null,s:[.2,1],l:[.75,.95]}},descriptive:["pastel"]},{criteria:{hsl:{h:null,s:null,l:[.88,1]}},descriptive:["pale","light","faded","delicate","glistening","bleached"]},{criteria:{hsl:{h:null,s:[.5,1],l:[.7,.9]}},descriptive:["fresh","sparkling","glittering","glowing","jazzy","opalescent"]},{criteria:{hsl:{h:null,s:null,l:[.9,1]}},descriptive:["neutral"]},{criteria:{hsl:{h:null,s:[.74,1],l:[.9,1]}},descriptive:["muted"]},{criteria:{hsl:{h:null,s:null,l:1}},descriptive:["colorless","bright","brilliant","high"]},{criteria:{hsl:{h:null,s:null,l:0}},descriptive:["colorless","low","dark"]},{criteria:{hsl:{h:null,s:[0,.01],l:null}},descriptive:["colorless","neutral"]},{criteria:{hsl:{h:null,s:null,l:[.01,.3]}},descriptive:["shady"]},{criteria:{hsl:{h:null,s:[0,.4],l:null}},descriptive:["ashy","dusty"]},{criteria:{hsl:{h:null,s:null,l:[.01,.08]}},descriptive:["almost black"]},{criteria:{hsl:{h:null,s:null,l:[0,.02]}},descriptive:["black"]},{criteria:{hsl:{h:null,s:null,l:[0,.09]}},descriptive:["very dark"]},{criteria:{hsl:{h:null,s:[0,.4],l:[0,.22]}},descriptive:["dark"]},{criteria:{hsl:{h:null,s:[.1,.4],l:[0,.6]}},descriptive:["dark","inky","dim","gloomy"]},{criteria:{hsl:{h:null,s:[0,.04],l:[.1,.99]}},descriptive:["grey"],nouns:["grey"],description:["Grey is a color often linked with neutrality, balance, and calm. It sits between black and white on the color spectrum, giving it a muted, understated quality. When you think of grey, you might picture misty mornings, smooth stone, or the quiet stillness of a cloudy day. It's a versatile color, fitting equally well in minimalist designs or more somber settings. Grey can evoke feelings of tranquility, contemplation, and sophistication. Close your eyes and imagine grey\u2014it might appear as a soft shadow or a subtle haze that wraps the world in a calm, muted tone."]},{criteria:{hsl:{h:null,s:[.04,.1],l:[.17,.99]}},descriptive:["almost grey"]},{criteria:{hsl:{h:null,s:[.1,.3],l:[.17,.99]}},descriptive:["very unsaturated"]},{criteria:{hsl:{h:null,s:[.3,.46],l:null}},descriptive:["unsaturated"]},{criteria:{hsl:{h:null,s:[.46,.6],l:[.4,.55]}},descriptive:["rather unsaturated"]},{criteria:{hsl:{h:null,s:[.601,.8],l:[.45,.6]}},descriptive:["saturated"]},{criteria:{hsl:{h:null,s:[.801,.94],l:[.45,.6]}},descriptive:["rather saturated"]},{criteria:{hsl:{h:null,s:[.941,1],l:[.45,.6]}},descriptive:["very saturated"]},{criteria:{hsl:{h:[0,90],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[270,360],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[90.01,269.99],s:null,l:[.1,1]}},descriptive:["cold","cool"]},{criteria:{hsl:{h:null,s:null,l:[.98,1]}},nouns:["white"],description:["White is a color that is often associated with purity, innocence, and cleanliness. It is the lightest color on the visible spectrum and is often described as having a bright, luminous quality. When you think of white, you might imagine a freshly fallen snow, a blank canvas, or a cloudless sky. It is a versatile color that can be used in a wide range of settings and contexts, from formal to casual. If you close your eyes and picture white, you might imagine a bright, radiant light that illuminates everything around it."],meanings:["purity","cleanliness","simplicity","innocence","freshness","light","goodness","virtue","safety","peace","tranquility","wholeness","perfection","honesty","truth","sincerity"],usage:["health","hospital","sanitary"]},{criteria:{hsl:{h:null,s:null,l:[0,.08]}},nouns:["black"],description:["Black is a color that is often associated with power, elegance, and sophistication. It is a color that is often used to create a sense of mystery, depth, and contrast, and it is often described as a color that can be both bold and elegant. In art and design, black is often used to create a sense of sophistication and drama, and it is often used in fashion to create a sense of sophistication and refinement."],meanings:["power","control","authority","discipline","discretion","secrecy","elegance","mystery"],usage:["intimidate","create fear","authority","luxury"]},{criteria:{hsl:{h:[0,15],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage","excite"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.4,.99]}},descriptive:["orange"],nouns:["orange"],description:["Orange is a vibrant and playful color that is often associated with creativity, energy, and warmth. It is a secondary color that is made by combining red and yellow, and it is often described as a warm and friendly color that can be both invigorating and calming. It is often associated with joy, enthusiasm, and warmth, and it is often used in art and design to create a sense of excitement and playfulness."],meanings:["optimism","independence","adventure","creativity","fun"],usage:["stimulate","draw attention","express freedom","fascinate"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.07,.4]}},descriptive:["brown"],nouns:["brown"],description:["Brown is a warm and earthy color that is often associated with nature, stability, and reliability. It is a secondary color that is made by combining red, blue, and yellow in different proportions, and it is often described as a rich and luxurious color that can be both comforting and grounding. It is often associated with wood, soil, and the natural world, and it is often used in art and design to create a sense of warmth and permanence."],meanings:["strength","reliability","resilience","loneliness","sadness","isolation","warmth","comfort","security"],usage:["agriculture","legal","food","tobacco","alcohol"]},{criteria:{hsl:{h:[45,70],s:[.1,1],l:[.07,.99]}},descriptive:["yellow"],nouns:["yellow"],description:["Yellow is a bright and cheerful color that is often associated with sunshine, happiness, and warmth. It is a primary color that is made by combining red and green light, and it is usually described as a warm and vibrant color that can be both calming and energizing. It is often associated with joy, happiness, and friendship, and it is often used in art and design to create a sense of cheerfulness and playfulness."],meanings:["enthusiasm","opportunity","spontaneity","happiness","positivity"],usage:["stimulate","relax","awake awareness","energize","affect mood","sale","cheap","budget","construction","convey competence"]},{criteria:{hsl:{h:[70,79],s:[.1,1],l:[.07,.99]}},descriptive:["lime"],nouns:["lime"],description:["Lime is a bright, vibrant color that is often associated with freshness, energy, and youth. It is a pale shade of green that is similar to chartreuse, but it is slightly lighter and more vibrant. Some people may associate the color lime with feelings of playfulness and excitement, while others may associate it with feelings of rejuvenation and renewal. In terms of wavelength, lime is a mixture of green and yellow light, and it is often used in art and design to create a sense of energy and vitality. Overall, lime is a lively and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["growth","harmony","fertility","kindness","dependability"],usage:["restore energy","promote growth","awake awareness","rejuvenate","nature"]},{criteria:{hsl:{h:[79,163],s:[.1,1],l:[.07,.99]}},descriptive:["green","greenish"],nouns:["green"],description:["Green is a cool, refreshing color that is often associated with nature, growth, and freshness. It is the color of grass, leaves, and trees, and it is often used to create a sense of harmony and balance. Some people may associate the color green with feelings of jealousy or envy, while others may associate it with feelings of peace and tranquility. In terms of wavelength, green is a primary color of light, and it is located between blue and yellow on the visible light spectrum. It is often used in art and design to create a sense of growth and renewal. Overall, green is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["safety","harmony","stability","reliability","balance"],usage:["relax","ballance","revitalize","encourage","posses"]},{criteria:{hsl:{h:[163,193],s:[.1,1],l:[.07,.99]}},descriptive:["cyan"],nouns:["cyan","sky blue"],description:["Cyan is a bright, fresh color that is often associated with the ocean, the sky, and the natural world. It is a pale shade of blue that is similar to teal, but it is slightly lighter and more muted. Some people may associate the color cyan with feelings of peace and serenity, while others may associate it with feelings of youth and playfulness. In terms of wavelength, cyan is a mixture of blue and green light, and it is often used in art and design to create a sense of freshness and vitality. Overall, cyan is a versatile and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["freedom","trust","wisdom","joy","refreshing","consciousness","stimulating"],usage:["self expression","communication","children products","technology","aerospace","entertainment","productivity"]},{criteria:{hsl:{h:[193,240],s:[.1,1],l:[.07,.99]}},descriptive:["blue","blueish"],nouns:["blue"],description:["Blue is a cool, calming color that is often associated with trust, reliability, and intelligence. It is the color of the sky and the ocean, and it is often used to create a sense of peace and tranquility. Some people may associate the color blue with feelings of sadness or melancholy, while others may associate it with feelings of calm and relaxation. In terms of wavelength, blue is a primary color of light, and it is located between green and violet on the visible light spectrum. It is often used in art and design to create a sense of balance and harmony. Overall, blue is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["trust","responsibility","honesty","loyalty","security","relying","calmness","control"],usage:["security","finance","technology","health care","accounting"]},{criteria:{hsl:{h:[240,260],s:[.1,1],l:[.07,.99]}},descriptive:["indigo"],nouns:["indigo"],description:["Indigo is a deep, rich color that is often associated with spirituality, intuition, and wisdom. It is a dark shade of blue that is similar to navy, but it is slightly lighter and more muted. Some people may associate the color indigo with feelings of calm and relaxation, while others may associate it with feelings of mystery and intrigue. In terms of wavelength, indigo is a deep blue color that is located between blue and violet on the visible light spectrum. It is often used in art and design to add a touch of depth and complexity. Overall, indigo is a beautiful and versatile color that can be used to create a wide range of moods and atmospheres."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[260,270],s:[.1,1],l:[.07,.99]}},descriptive:["violet"],nouns:["violet"],description:["Violet is a rich, regal color that is often associated with luxury, royalty, and sophistication. It is a deep shade of purple that is similar to lavender, but it is slightly darker and more intense. Some people may associate the color violet with feelings of mystery and spirituality, while others may associate it with feelings of calm and tranquility. In terms of wavelength, violet is a mixture of blue and red light, and it is often used in art and design to add a touch of elegance and refinement. Overall, violet is a beautiful and sophisticated color that can be used to create a calm and peaceful atmosphere."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[270,291],s:[.1,1],l:[.07,.99]}},descriptive:["purple","purplish"],nouns:["purple"],description:["Purple is a rich and vibrant color that is often associated with royalty, luxury, and creativity. It is a combination of blue and red, with more red than blue, giving it a warm and passionate quality. The shade of purple can vary from a deep, dark hue to a light, almost lavender color, and each shade can evoke different emotions and meanings. Some people may associate purple with spirituality and mysticism, while others may see it as a symbol of extravagance and decadence. In terms of wavelength, purple is located between blue and violet on the visible light spectrum and has a shorter wavelength than most other colors. Because of its striking and eye-catching nature, purple is frequently used in fashion, art, and design to add a pop of color and flair. Overall, purple is a captivating and dynamic color that can express a wide range of moods and emotions, making it a favorite among many people."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic","royalty"]},{criteria:{hsl:{h:[291,327],s:[.1,1],l:[.07,.99]}},descriptive:["magenta"],nouns:["magenta"],description:["Magenta is a deep, rich color that is often associated with creativity, passion, and intensity. It is a vibrant shade of pink that is similar to fuchsia, but it is slightly darker and more muted. Some people may associate the color magenta with feelings of excitement and energy, while others may associate it with feelings of love and romance. In terms of wavelength, magenta is a mixture of red and blue light, and it is often used in art and design to add a bold and striking touch. Overall, magenta is a vibrant and lively color that can be used to add drama and excitement to any setting."],meanings:["support","kind","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products",,"erotica"]},{criteria:{hsl:{h:[327,344],s:[.1,1],l:[.07,.99]}},descriptive:["pink"],nouns:["pink"],description:["Pink is a light, delicate color that is often associated with femininity, romance, and sweetness. It is a pale shade of red, and it is often described as a softer, more gentle version of the color. Some people may associate the color pink with feelings of happiness and playfulness, while others may associate it with feelings of warmth and comfort. In terms of wavelength, pink is a mixture of red and white light, and it is often used in decorations and clothing to add a touch of whimsy and fun. Overall, pink is a cheerful and playful color that can be used to create a warm and inviting atmosphere."],meanings:["support","kindness","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products","erotica"]},{criteria:{hsl:{h:[344,360],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage"]}],temperatures:[{value:1800,descriptive:["ultra warm"]},{value:2400,descriptive:["very warm"]},{value:2700,descriptive:["warm"]},{value:3e3,descriptive:["warm white"]},{value:4e3,descriptive:["cool or cold"]},{value:6500,descriptive:["cool"]}],percentWords:[{maxPercentile:.06,word:"a dash of"},{maxPercentile:.16,word:"a little bit of"},{maxPercentile:.31,word:"some"},{maxPercentile:.56,word:"a good bit of"},{maxPercentile:.71,word:"a lot of"},{maxPercentile:.86,word:"a whole lot of"},{maxPercentile:.99,word:"neatly entirely"},{maxPercentile:1,word:"entirely"}]};var Jo={rgb:W("rgb"),hsl:W("hsl")},ki={rgb:["r","g","b"],cmyk:["c","m","y","k"],hsl:["h","s","l"]},j,Eo,ge,mr=class{constructor(t,r=jo){wr(this,j);vt(this,"formats",{});vt(this,"currentColor",null);this.color=t,this.descriptions=r.descriptions,this.temperatures=r.temperatures,this.percentWords=r.percentWords}set color(t){this.currentColor=te(this,j,Eo).call(this,t);let r=Jo.rgb(this.currentColor);this.formats.rgb=r,this.formats.hsl=Jo.hsl(this.currentColor),this.formats.cmyk=zr(r)}get color(){return this.currentColor}get temperatureWords(){let t=Tr(this.formats.rgb);return this.temperatures.reduce((r,n)=>Math.abs(n.value-t)r[a]),o=n.reduce((a,i)=>a+i,0);return n.map(a=>o?a/o:0)}percentageWords(t="rgb"){return this.percentages(t).map(r=>this.percentWords.find(n=>n.maxPercentile>=r).word)}get descriptiveWords(){return te(this,j,ge).call(this,"descriptive")}get nouns(){return te(this,j,ge).call(this,"nouns")}get meanings(){return te(this,j,ge).call(this,"meanings")}get usage(){return te(this,j,ge).call(this,"usage")}get description(){return te(this,j,ge).call(this,"description")}get bestContrast(){return pt(this.color,"black")>pt(this.color,"white")?"black":"white"}getDescriptiveList(t,r){let n=[...this.descriptiveWords];if(t&&(n=Mt(n)),r&&(n=n.slice(0,r)),n.length>1){let o=n.pop();return`${n.join(", ")} and ${o}`}else return n[0]}};j=new WeakSet,Eo=function(t){try{return Le(t)}catch{throw new TypeError("Invalid color. Check the chroma-js documentation.")}},ge=function(t="descriptive",r=!1,n){let o=this.descriptions.reduce((a,i)=>i.hasOwnProperty(t)&&Object.keys(i.criteria).every(p=>{let c=this.formats[p];return Object.entries(i.criteria[p]).every(([h,b])=>{if(!(h in c)||c[h]===void 0||c[h]===null||b===null)return!0;let x=c[h];return h==="h"&&(x=Math.round(x)),Array.isArray(b)?kr(x,b[0],b[1]):isNaN(b)?!1:x===b})})?[...new Set([...a,...i[t]])]:a,[]);return r?Mt(o).slice(0,n):o.slice(0,n)};var Xm=mr;export{Xm as default}; diff --git a/index.iife.js b/index.iife.js index e393c88..03adad5 100644 --- a/index.iife.js +++ b/index.iife.js @@ -1,4 +1,4 @@ var ColorDescription=(()=>{var De=Object.defineProperty,Qo=Object.defineProperties,en=Object.getOwnPropertyDescriptor,tn=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertyNames,zr=Object.getOwnPropertySymbols;var Lr=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable;var Rr=e=>{throw TypeError(e)};var wt=(e,t,r)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))Lr.call(t,r)&&wt(e,r,t[r]);if(zr)for(var r of zr(t))on.call(t,r)&&wt(e,r,t[r]);return e},M=(e,t)=>Qo(e,tn(t));var nn=(e,t)=>{for(var r in t)De(e,r,{get:t[r],enumerable:!0})},an=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rn(t))!Lr.call(e,o)&&o!==r&&De(e,o,{get:()=>t[o],enumerable:!(n=en(t,o))||n.enumerable});return e};var ln=e=>an(De({},"__esModule",{value:!0}),e);var Tt=(e,t,r)=>wt(e,typeof t!="symbol"?t+"":t,r),sn=(e,t,r)=>t.has(e)||Rr("Cannot "+r);var Xr=(e,t,r)=>t.has(e)?Rr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var oe=(e,t,r)=>(sn(e,t,"access private method"),r);var $i={};nn($i,{default:()=>qi});var{round:fn,min:kt,max:Je,log:je,floor:dn,random:un}=Math,pn=e=>{let t=e/100,r,n,o;return t<66?(r=1,n=t<6?0:(-155.25485562709179-.44596950469579133*(n=t-2)+104.49216199393888*je(n))/255,o=t<20?0:(-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*je(o))/255):(r=(351.97690566805693+.114206453784165*(r=t-55)-40.25366309332127*je(r))/255,n=(325.4494125711974+.07943456536662342*(n=t-50)-28.0852963507957*je(n))/255,o=1),{r:Je(0,kt(1,r)),g:Je(0,kt(1,n)),b:Je(0,kt(1,o)),a:1}},Hr=e=>{let{r:t,g:r,b:n}=e,o=1e3,a=4e4,i=.4,l;for(;a-o>i;){l=(a+o)*.5;let d=pn(l);d.b/d.r>=n/t?a=l:o=l}return fn(l)},_r=(e,t,r)=>e>=t&&e<=r,zt=e=>{let t=[...e];for(let r=t.length-1;r>0;r--){let n=dn(un()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t},Sr=e=>{let{r:t,g:r,b:n}=e,o=1-Je(t,r,n),a=1-o;return{mode:"cmyk",c:a&&(a-t)/a,m:a&&(a-r)/a,y:a&&(a-n)/a,k:o}};var cn=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Ee=cn;var mn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ir=mn;var hn=e=>Ee(Ir[e.toLowerCase()],6),Pr=hn;var bn=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,gn=e=>{let t;return(t=e.match(bn))?Ee(parseInt(t[1],16),t[1].length):void 0},Cr=gn;var _="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Bi=`(?:${_}|none)`,ne=`${_}%`,Fi=`(?:${_}%|none)`,Re=`(?:${_}%|${_})`,xn=`(?:${_}%|${_}|none)`,Or=`(?:${_}(deg|grad|rad|turn)|${_})`,Ki=`(?:${_}(deg|grad|rad|turn)|${_}|none)`,G="\\s*,\\s*";var Ui=new RegExp("^"+xn+"$");var vn=new RegExp(`^rgba?\\(\\s*${_}${G}${_}${G}${_}\\s*(?:,\\s*${Re}\\s*)?\\)$`),yn=new RegExp(`^rgba?\\(\\s*${ne}${G}${ne}${G}${ne}\\s*(?:,\\s*${Re}\\s*)?\\)$`),Mn=e=>{let t={mode:"rgb"},r;if(r=e.match(vn))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(yn))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Nr=Mn;var wn=(e,t)=>e===void 0?void 0:typeof e!="object"?Xe(e):e.mode!==void 0?e:t?M(y({},e),{mode:t}):void 0,qr=wn;var Tn=(e="rgb")=>t=>(t=qr(t,e))!==void 0?t.mode===e?t:A[t.mode][e]?A[t.mode][e](t):e==="rgb"?A[t.mode].rgb(t):A.rgb[e](A[t.mode].rgb(t)):void 0,Z=Tn;var A={},$r={},He=[],Lt={},kn=e=>e,g=e=>(A[e.mode]=y(y({},A[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{A[t]||(A[t]={}),A[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=kn)}),$r[e.mode]=e,(e.parse||[]).forEach(t=>{zn(t,e.mode)}),Z(e.mode)),Ar=e=>$r[e],zn=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Lt[e]=t}else typeof e=="function"&&He.indexOf(e)<0&&He.push(e)};var Rt=/[^\x00-\x7F]|[a-zA-Z_]/,Ln=/[^\x00-\x7F]|[-\w]/,s={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},u=0;function Ye(e){let t=e[u],r=e[u+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[u+2]):t==="."?/\d/.test(r):/\d/.test(t)}function Xt(e){if(u>=e.length)return!1;let t=e[u];if(Rt.test(t))return!0;if(t==="-"){if(e.length-u<2)return!1;let r=e[u+1];return!!(r==="-"||Rt.test(r))}return!1}var Rn={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function _e(e){let t="";if((e[u]==="-"||e[u]==="+")&&(t+=e[u++]),t+=We(e),e[u]==="."&&/\d/.test(e[u+1])&&(t+=e[u++]+We(e)),(e[u]==="e"||e[u]==="E")&&((e[u+1]==="-"||e[u+1]==="+")&&/\d/.test(e[u+2])?t+=e[u++]+e[u++]+We(e):/\d/.test(e[u+1])&&(t+=e[u++]+We(e))),Xt(e)){let r=Ge(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:s.Hue,value:t*Rn[r]}:void 0}return e[u]==="%"?(u++,{type:s.Percentage,value:+t}):{type:s.Number,value:+t}}function We(e){let t="";for(;/\d/.test(e[u]);)t+=e[u++];return t}function Ge(e){let t="";for(;u4)){if(r.length===4){if(r[3].type!==s.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:s.None,value:void 0}),r.every(o=>o.type!==s.Alpha)?r:void 0}}function Sn(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==s.Function)return;let n=Dr(e,t);if(n)return n.unshift(r.value),n}var In=e=>{if(typeof e!="string")return;let t=Hn(e),r=t?Sn(t,!0):void 0,n,o=0,a=He.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Jr=Cn;var Er=(e,t,r)=>e+r*(t-e);var On=e=>{let t=[];for(let r=0;rt=>{let r=On(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var f=Yr(Er);var m=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var Nn={mode:"rgb",channels:["r","g","b","alpha"],parse:[jr,Cr,Nr,Pr,Jr,"srgb"],serialize:"srgb",interpolate:{r:f,g:f,b:f,alpha:{use:f,fixup:m}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},N=Nn;var Ht=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),qn=e=>{let t=Ht(e.r),r=Ht(e.g),n=Ht(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},_t=qn;var St=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),$n=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:St(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:St(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:St(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},It=$n;var Pt=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},An=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Pt(e),g:Pt(t),b:Pt(r)};return n!==void 0&&(o.alpha=n),o},q=An;var Dn=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},I=Dn;var Ct=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},jn=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:Ct(e),g:Ct(t),b:Ct(r)};return n!==void 0&&(a.alpha=n),a},$=jn;var Jn=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},P=Jn;var En=M(y({},N),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>It(I(e)),xyz65:It},toMode:{rgb:e=>P(_t(e)),xyz65:_t}}),Wr=En;var Yn=e=>(e=e%360)<0?e+360:e,x=Yn;var Wn=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=x(r);return n===0||e[n-1]===void 0?a:t(a-x(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),L=e=>Wn(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var T=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Gr=Math.PI/180,Zr=180/Math.PI;var Br=T[3]*T[4],Fr=T[1]*T[4],Kr=T[1]*T[2]-T[0]*T[3],Gn=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Kr*r+e*Br-t*Fr)/(Kr+Br-Fr),a=r-o,i=(T[4]*(t-o)-T[2]*a)/T[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(T[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(i,a)*Zr-120),n!==void 0&&(l.alpha=n),l},Ur=Gn;var Zn=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Gr,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),l=Math.sin(e);return o.r=r+a*(T[0]*i+T[1]*l),o.g=r+a*(T[2]*i+T[3]*l),o.b=r+a*(T[4]*i+T[5]*l),n!==void 0&&(o.alpha=n),o},Vr=Zn;var B=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=x(e.h),n=x(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Qr=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=x(e.h),n=x(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},F=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=x(e.h),n=x(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var R=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Bn={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Ur},toMode:{rgb:Vr},interpolate:{h:{use:f,fixup:L},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:B},average:{h:R}},eo=Bn;var Fn=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=x(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},C=Fn;var Kn=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},O=Kn;var Ze=Math.pow(29,3)/Math.pow(3,3),Be=Math.pow(6,3)/Math.pow(29,3);var w={X:.9642956764295677,Y:1,Z:.8251046025104602},K={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},cs=Math.pow(29,3)/Math.pow(3,3),ms=Math.pow(6,3)/Math.pow(29,3);var Ot=e=>Math.pow(e,3)>Be?Math.pow(e,3):(116*e-16)/Ze,Un=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz65",x:Ot(a)*K.X,y:Ot(o)*K.Y,z:Ot(i)*K.Z};return n!==void 0&&(l.alpha=n),l},Fe=Un;var Vn=e=>P(Fe(e)),U=Vn;var Nt=e=>e>Be?Math.cbrt(e):(Ze*e+16)/116,Qn=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Nt(e/K.X),a=Nt(t/K.Y),i=Nt(r/K.Z),l={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},Ke=Qn;var ea=e=>{let t=Ke(I(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V=ea;var ae=.14444444444444443*Math.PI,se=Math.cos(ae),fe=Math.sin(ae),Ue=100/Math.log(139/100);var ta=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Ue)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-ae),l=a*Math.sin(r/180*Math.PI-ae);return o.a=i*se-l/.83*fe,o.b=i*fe+l/.83*se,n!==void 0&&(o.alpha=n),o},Ie=ta;var ra=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*se+r*fe,a=.83*(r*se-t*fe),i=Math.sqrt(o*o+a*a),l={mode:"dlch",l:Ue/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return l.c&&(l.h=x((Math.atan2(a,o)+ae)/Math.PI*180)),n!==void 0&&(l.alpha=n),l},Pe=ra;var to=e=>Ie(C(e,"dlch")),ro=e=>O(Pe(e),"dlab"),oa={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:to,rgb:e=>U(to(e))},fromMode:{lab65:ro,rgb:e=>ro(V(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},oo=oa;var na={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ie,dlab:e=>O(e,"dlab"),rgb:e=>U(Ie(e))},fromMode:{lab65:Pe,dlab:e=>C(e,"dlch"),rgb:e=>Pe(V(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:f,c:f,h:{use:f,fixup:L},alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},no=na;function $t({h:e,s:t,i:r,alpha:n}){e=x(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function At({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},io=ia;var la=new RegExp(`^hsla?\\(\\s*${Or}${G}${ne}${G}${ne}\\s*(?:,\\s*${Re}\\s*)?\\)$`),sa=e=>{let t=e.match(la);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=io(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},lo=sa;function fa(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.s=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.l=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var so=fa;var da={mode:"hsl",toMode:{rgb:Dt},fromMode:{rgb:jt},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[so,lo],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:L},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:B},average:{h:R}},Ve=da;function Ce({h:e,s:t,v:r,alpha:n}){e=x(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Oe({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t1){let o=t+r;t/=o,r/=o}return Ce({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function Et(e){let t=Oe(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function pa(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.w=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.b=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var fo=pa;var ca={mode:"hwb",toMode:{rgb:Jt},fromMode:{rgb:Et},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[fo],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:L},w:f,b:f,alpha:{use:f,fixup:m}},difference:{h:Qr},average:{h:R}},uo=ca;var de=.1593017578125,po=78.84375,ue=.8359375,pe=18.8515625,ce=18.6875;function et(e){if(e<0)return 0;let t=Math.pow(e,1/po);return 1e4*Math.pow(Math.max(0,t-ue)/(pe-ce*t),1/de)}function tt(e){if(e<0)return 0;let t=Math.pow(e/1e4,de);return Math.pow((ue+pe*t)/(1+ce*t),po)}var Yt=e=>Math.max(e/203,0),ha=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=et(e+.008609037037932761*t+.11102962500302593*r),a=et(e-.00860903703793275*t-.11102962500302599*r),i=et(e+.5600313357106791*t-.32062717498731885*r),l={mode:"xyz65",x:Yt(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:Yt(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:Yt(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(l.alpha=n),l},Wt=ha;var Gt=(e=0)=>Math.max(e*203,0),ba=({x:e,y:t,z:r,alpha:n})=>{let o=Gt(e),a=Gt(t),i=Gt(r),l=tt(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),d=tt(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),p=tt(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*l+.5*d,b=1.61376953125*l-3.323486328125*d+1.709716796875*p,h=4.378173828125*l-4.24560546875*d-.132568359375*p,v={mode:"itp",i:c,t:b,p:h};return n!==void 0&&(v.alpha=n),v},Zt=ba;var ga={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Wt,rgb:e=>P(Wt(e))},fromMode:{xyz65:Zt,rgb:e=>Zt(I(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:f,t:f,p:f,alpha:{use:f,fixup:m}}},co=ga;var xa=134.03437499999998,va=16295499532821565e-27,Bt=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,de);return Math.pow((ue+pe*t)/(1+ce*t),xa)},Ft=(e=0)=>Math.max(e*203,0),ya=({x:e,y:t,z:r,alpha:n})=>{e=Ft(e),t=Ft(t),r=Ft(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=Bt(.41478972*o+.579999*a+.014648*r),l=Bt(-.20151*o+1.120649*a+.0531008*r),d=Bt(-.0166008*o+.2648*a+.6684799*r),p=(i+l)/2,c={mode:"jab",j:.44*p/(1-.56*p)-va,a:3.524*i-4.066708*l+.542708*d,b:.199076*i+1.096799*l-1.295875*d};return n!==void 0&&(c.alpha=n),c},rt=ya;var Ma=134.03437499999998,mo=16295499532821565e-27,Kt=e=>{if(e<0)return 0;let t=Math.pow(e,1/Ma);return 1e4*Math.pow((ue-t)/(ce*t-pe),1/de)},Ut=e=>e/203,wa=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+mo)/(.44+.56*(e+mo)),a=Kt(o+.13860504*t+.058047316*r),i=Kt(o-.13860504*t-.058047316*r),l=Kt(o-.096019242*t-.8118919*r),d={mode:"xyz65",x:Ut(1.661373024652174*a-.914523081304348*i+.23136208173913045*l),y:Ut(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*l),z:Ut(-.090982811*a-.31272829*i+1.5227666*l)};return n!==void 0&&(d.alpha=n),d},ot=wa;var Ta=e=>{let t=rt(I(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},nt=Ta;var ka=e=>P(ot(e)),at=ka;var za={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:nt,xyz65:rt},toMode:{rgb:at,xyz65:ot},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:f,a:f,b:f,alpha:{use:f,fixup:m}}},ho=za;var La=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=x(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Vt=La;var Ra=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Qt=Ra;var Xa={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qt,rgb:e=>at(Qt(e))},fromMode:{rgb:e=>Vt(nt(e)),jab:Vt},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:f,fixup:L},c:f,j:f,alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},bo=Xa;var Q=Math.pow(29,3)/Math.pow(3,3),me=Math.pow(6,3)/Math.pow(29,3);var er=e=>Math.pow(e,3)>me?Math.pow(e,3):(116*e-16)/Q,Ha=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz50",x:er(a)*w.X,y:er(o)*w.Y,z:er(i)*w.Z};return n!==void 0&&(l.alpha=n),l},he=Ha;var _a=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},D=_a;var Sa=e=>D(he(e)),it=Sa;var Ia=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},j=Ia;var tr=e=>e>me?Math.cbrt(e):(Q*e+16)/116,Pa=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=tr(e/w.X),a=tr(t/w.Y),i=tr(r/w.Z),l={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},be=Pa;var Ca=e=>{let t=be(j(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},lt=Ca;function Oa(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*125/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*125/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var go=Oa;var Na={mode:"lab",toMode:{xyz50:he,rgb:it},fromMode:{xyz50:be,rgb:lt},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[go],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},ge=Na;var qa=M(y({},ge),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Fe,rgb:U},fromMode:{xyz65:Ke,rgb:V},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}}),xo=qa;function $a(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*150/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var vo=$a;var Aa={mode:"lch",toMode:{lab:O,rgb:e=>it(O(e))},fromMode:{rgb:e=>C(lt(e)),lab:C},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[vo],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:L},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},xe=Aa;var Da=M(y({},xe),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>O(e,"lab65"),rgb:e=>U(O(e,"lab65"))},fromMode:{rgb:e=>C(V(e),"lch65"),lab65:e=>C(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}}),yo=Da;var ja=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=x(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},rr=ja;var Ja=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},or=Ja;var Mo=(e,t,r)=>4*e/(e+15*t+3*r),wo=(e,t,r)=>9*t/(e+15*t+3*r),Ea=Mo(w.X,w.Y,w.Z),Ya=wo(w.X,w.Y,w.Z),Wa=e=>e<=me?Q*e:116*Math.cbrt(e)-16,Ga=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Wa(t/w.Y),a=Mo(e,t,r),i=wo(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-Ea),i=13*o*(i-Ya));let l={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(l.alpha=n),l},Ne=Ga;var Za=(e,t,r)=>4*e/(e+15*t+3*r),Ba=(e,t,r)=>9*t/(e+15*t+3*r),Fa=Za(w.X,w.Y,w.Z),Ka=Ba(w.X,w.Y,w.Z),Ua=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+Fa,a=r/(13*e)+Ka,i=w.Y*(e<=8?e/Q:Math.pow((e+16)/116,3)),l=i*(9*o)/(4*a),d=i*(12-3*o-20*a)/(4*a),p={mode:"xyz50",x:l,y:i,z:d};return n!==void 0&&(p.alpha=n),p},qe=Ua;var Va=e=>rr(Ne(j(e))),Qa=e=>D(qe(or(e))),ei={mode:"lchuv",toMode:{luv:or,rgb:Qa},fromMode:{rgb:Va,luv:rr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:f,fixup:L},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},To=ei;var ti=M(y({},N),{mode:"lrgb",toMode:{rgb:$},fromMode:{rgb:q},parse:["srgb-linear"],serialize:"srgb-linear"}),ko=ti;var ri={mode:"luv",toMode:{xyz50:qe,rgb:e=>D(qe(e))},fromMode:{xyz50:Ne,rgb:e=>Ne(j(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:f,u:f,v:f,alpha:{use:f,fixup:m}}},zo=ri;var oi=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*r),a=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*r),i=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*r),l={mode:"oklab",l:.2104542553*o+.793617785*a-.0040720468*i,a:1.9779984951*o-2.428592205*a+.4505937099*i,b:.0259040371*o+.7827717662*a-.808675766*i};return n!==void 0&&(l.alpha=n),l},st=oi;var ni=e=>{let t=st(q(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ee=ni;var ai=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*r,3),a=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*r,3),i=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*r,3),l={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*a+.230969928729428*i,g:-1.2684380040921763*o+2.6097574006633715*a-.3413193963102197*i,b:-.004196086541837188*o-.7034186144594493*a+1.7076147009309444*i};return n!==void 0&&(l.alpha=n),l},J=ai;var ii=e=>$(J(e)),te=ii;function $e(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function ie(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function li(e,t){let r,n,o,a,i,l,d,p;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,l=4.0767416621,d=-3.3077115913,p=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,l=-1.2684380046,d=2.6097574011,p=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,l=-.0041960863,d=-.7034186147,p=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,b=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,v=-.0894841775*e-1.291485548*t;{let k=1+c*b,X=1+c*h,z=1+c*v,S=k*k*k,H=X*X*X,W=z*z*z,ye=3*b*k*k,Me=3*h*X*X,we=3*v*z*z,Te=6*b*b*k,ke=6*h*h*X,ze=6*v*v*z,le=l*S+d*H+p*W,re=l*ye+d*Me+p*we,Le=l*Te+d*ke+p*ze;c=c-le*re/(re*re-.5*le*Le)}return c}function nr(e,t){let r=li(e,t),n=J({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function si(e,t,r,n,o,a=null){a||(a=nr(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let l=r-o,d=n,p=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,b=-.0894841775*e-1.291485548*t,h=l+d*p,v=l+d*c,k=l+d*b;{let X=o*(1-i)+i*r,z=i*n,S=X+z*p,H=X+z*c,W=X+z*b,ye=S*S*S,Me=H*H*H,we=W*W*W,Te=3*h*S*S,ke=3*v*H*H,ze=3*k*W*W,le=6*h*h*S,re=6*v*v*H,Le=6*k*k*W,vr=4.0767416621*ye-3.3077115913*Me+.2309699292*we-1,bt=4.0767416621*Te-3.3077115913*ke+.2309699292*ze,Ko=4.0767416621*le-3.3077115913*re+.2309699292*Le,yr=bt/(bt*bt-.5*vr*Ko),gt=-vr*yr,Mr=-1.2684380046*ye+2.6097574011*Me-.3413193965*we-1,xt=-1.2684380046*Te+2.6097574011*ke-.3413193965*ze,Uo=-1.2684380046*le+2.6097574011*re-.3413193965*Le,wr=xt/(xt*xt-.5*Mr*Uo),vt=-Mr*wr,Tr=-.0041960863*ye-.7034186147*Me+1.707614701*we-1,yt=-.0041960863*Te-.7034186147*ke+1.707614701*ze,Vo=-.0041960863*le-.7034186147*re+1.707614701*Le,kr=yt/(yt*yt-.5*Tr*Vo),Mt=-Tr*kr;gt=yr>=0?gt:1e6,vt=wr>=0?vt:1e6,Mt=kr>=0?Mt:1e6,i+=Math.min(gt,Math.min(vt,Mt))}}}return i}function Ae(e,t,r=null){r||(r=nr(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function ft(e,t,r){let n=nr(t,r),o=si(t,r,e,1,e,n),a=Ae(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),l=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),d=o/Math.min(e*a[0],(1-e)*a[1]),p=e*i,c=(1-e)*l,b=.9*d*Math.sqrt(Math.sqrt(1/(1/(p*p*p*p)+1/(c*c*c*c))));return p=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(p*p)+1/(c*c))),b,o]}function dt(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:$e(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,l,d]=ft(t,r/a,n/a),p;if(adt(ee(e))},toMode:{oklab:ut,rgb:e=>te(ut(e))}}),Lo=fi;function pt(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[l,d]=Ae(a,i),p=.5,c=1-p/l,b=d/(o+t*d),h=b*t,v=b*o,k=ie(h),X=v*k/h,z=J({l:k,a:a*X,b:i*X}),S=Math.cbrt(1/Math.max(z.r,z.g,z.b,0));t=t/S,o=o/S*$e(t)/t,t=$e(t);let H={mode:"okhsv",s:o?(p+d)*v/(d*p+d*c*v):0,v:t?t/h:0};return H.s&&(H.h=x(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(H.alpha=e.alpha),H}function ct(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[l,d]=Ae(a,i),p=.5,c=1-p/l,b=1-n*p/(p+d-d*c*n),h=n*d*p/(p+d-d*c*n),v=ie(b),k=h*v/b,X=J({l:v,a:a*k,b:i*k}),z=Math.cbrt(1/Math.max(X.r,X.g,X.b,0)),S=ie(o*b),H=h*S/b;return t.l=S*z,t.a=H*a*z,t.b=H*i*z,t}var di=M(y({},Qe),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:pt,rgb:e=>pt(ee(e))},toMode:{oklab:ct,rgb:e=>te(ct(e))}}),Ro=di;function ui(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*.4/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*.4/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var Xo=ui;var pi=M(y({},ge),{mode:"oklab",toMode:{lrgb:J,rgb:te},fromMode:{lrgb:st,rgb:ee},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Xo],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),Ho=pi;function ci(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*.4/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var _o=ci;var mi=M(y({},xe),{mode:"oklch",toMode:{oklab:e=>O(e,"oklab"),rgb:e=>te(O(e,"oklab"))},fromMode:{rgb:e=>C(ee(e),"oklch"),oklab:e=>C(e,"oklch")},parse:[_o],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),So=mi;var hi=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},ar=hi;var bi=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},ir=bi;var gi=M(y({},N),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ir(I(e)),xyz65:ir},toMode:{rgb:e=>P(ar(e)),xyz65:ar}}),Io=gi;var lr=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},xi=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:lr(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:lr(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:lr(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},sr=xi;var fr=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},vi=e=>{let t=fr(e.r),r=fr(e.g),n=fr(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},dr=vi;var yi=M(y({},N),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:sr,rgb:e=>sr(j(e))},toMode:{xyz50:dr,rgb:e=>D(dr(e))}}),Po=yi;var Co=1.09929682680944,Mi=.018053968510807,ur=e=>{let t=Math.abs(e);return t>Mi?(Math.sign(e)||1)*(Co*Math.pow(t,.45)-(Co-1)):4.5*e},wi=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:ur(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:ur(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:ur(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},pr=wi;var Oo=1.09929682680944,Ti=.018053968510807,cr=(e=0)=>{let t=Math.abs(e);return t{let t=cr(e.r),r=cr(e.g),n=cr(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},mr=ki;var zi=M(y({},N),{mode:"rec2020",fromMode:{xyz65:pr,rgb:e=>pr(I(e))},toMode:{xyz65:mr,rgb:e=>P(mr(e))},parse:["rec2020"],serialize:"rec2020"}),No=zi;var Y=.0037930732552754493,mt=Math.cbrt(Y);var hr=e=>Math.cbrt(e)-mt,Li=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a=hr(.3*t+.622*r+.078*n+Y),i=hr(.23*t+.692*r+.078*n+Y),l=hr(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+Y),d={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:l-(a+i)/2};return o!==void 0&&(d.alpha=o),d},qo=Li;var br=e=>Math.pow(e+mt,3),Ri=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=br(e+t)-Y,a=br(t-e)-Y,i=br(r+t)-Y,l=$({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(l.alpha=n),l},$o=Ri;var Xi={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:$o},fromMode:{rgb:qo},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:f,y:f,b:f,alpha:{use:f,fixup:m}}},Ao=Xi;var Hi={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:D,lab:be},fromMode:{rgb:j,lab:he},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},Do=Hi;var _i=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},jo=_i;var Si=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},Jo=Si;var Ii={mode:"xyz65",toMode:{rgb:P,xyz50:jo},fromMode:{rgb:I,xyz50:Jo},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},Eo=Ii;var Pi=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},Yo=Pi;var Ci=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},Wo=Ci;var Oi={mode:"yiq",toMode:{rgb:Wo},fromMode:{rgb:Yo},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:f,i:f,q:f,alpha:{use:f,fixup:m}}},Go=Oi;function gr(e){let t=Z("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function ht(e,t){let r=gr(e),n=gr(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var bm=g(Wr),gm=g(eo),xm=g(oo),vm=g(no),ym=g(ao),Mm=g(Ve),wm=g(Qe),Tm=g(uo),km=g(co),zm=g(ho),Lm=g(bo),Rm=g(ge),Xm=g(xo),Hm=g(xe),_m=g(yo),Sm=g(To),Im=g(ko),Pm=g(zo),Cm=g(Lo),Om=g(Ro),Nm=g(Ho),qm=g(So),$m=g(Io),Am=g(Po),Dm=g(No),jm=g(N),Jm=g(Ao),Em=g(Do),Ym=g(Eo),Wm=g(Go);var Zo={descriptions:[{criteria:{hsl:{h:null,s:[.75,1],l:[.4,.55]}},descriptive:["saturated","strong","lush","ablaze","beaming","bold","brilliant","flamboyant","vibrant","vivid","loud"]},{criteria:{hsl:{h:null,s:null,l:[0,.07]}},descriptive:["dark","ashy","somber","bleak","muddy","sooty"]},{criteria:{hsl:{h:null,s:null,l:[0,.3]}},descriptive:["dark","dim","gloomy","dull"]},{criteria:{hsl:{h:null,s:[.1,.7],l:[.15,.5]}},descriptive:["bleak","muted","matte","dusty"]},{criteria:{hsl:{h:null,s:[.12,1],l:[.7,1]}},descriptive:["tinted"]},{criteria:{hsl:{h:null,s:[.2,1],l:[.75,.95]}},descriptive:["pastel"]},{criteria:{hsl:{h:null,s:null,l:[.88,1]}},descriptive:["pale","light","faded","delicate","glistening","bleached"]},{criteria:{hsl:{h:null,s:[.5,1],l:[.7,.9]}},descriptive:["fresh","sparkling","glittering","glowing","jazzy","opalescent"]},{criteria:{hsl:{h:null,s:null,l:[.9,1]}},descriptive:["neutral"]},{criteria:{hsl:{h:null,s:[.74,1],l:[.9,1]}},descriptive:["muted"]},{criteria:{hsl:{h:null,s:null,l:1}},descriptive:["colorless","bright","brilliant","high"]},{criteria:{hsl:{h:null,s:null,l:0}},descriptive:["colorless","low","dark"]},{criteria:{hsl:{h:null,s:[0,.01],l:null}},descriptive:["colorless","neutral"]},{criteria:{hsl:{h:null,s:null,l:[.01,.3]}},descriptive:["shady"]},{criteria:{hsl:{h:null,s:[0,.4],l:null}},descriptive:["ashy","dusty"]},{criteria:{hsl:{h:null,s:null,l:[.01,.08]}},descriptive:["almost black"]},{criteria:{hsl:{h:null,s:null,l:[0,.02]}},descriptive:["black"]},{criteria:{hsl:{h:null,s:null,l:[0,.09]}},descriptive:["very dark"]},{criteria:{hsl:{h:null,s:[0,.4],l:[0,.22]}},descriptive:["dark"]},{criteria:{hsl:{h:null,s:[.1,.4],l:[0,.6]}},descriptive:["dark","inky","dim","gloomy"]},{criteria:{hsl:{h:null,s:[0,.04],l:[.1,.99]}},descriptive:["grey"],nouns:["grey"],description:["Grey is a color often linked with neutrality, balance, and calm. It sits between black and white on the color spectrum, giving it a muted, understated quality. When you think of grey, you might picture misty mornings, smooth stone, or the quiet stillness of a cloudy day. It's a versatile color, fitting equally well in minimalist designs or more somber settings. Grey can evoke feelings of tranquility, contemplation, and sophistication. Close your eyes and imagine grey\u2014it might appear as a soft shadow or a subtle haze that wraps the world in a calm, muted tone."]},{criteria:{hsl:{h:null,s:[.04,.1],l:[.17,.99]}},descriptive:["almost grey"]},{criteria:{hsl:{h:null,s:[.1,.3],l:[.17,.99]}},descriptive:["very unsaturated"]},{criteria:{hsl:{h:null,s:[.3,.46],l:null}},descriptive:["unsaturated"]},{criteria:{hsl:{h:null,s:[.46,.6],l:[.4,.55]}},descriptive:["rather unsaturated"]},{criteria:{hsl:{h:null,s:[.601,.8],l:[.45,.6]}},descriptive:["saturated"]},{criteria:{hsl:{h:null,s:[.801,.94],l:[.45,.6]}},descriptive:["rather saturated"]},{criteria:{hsl:{h:null,s:[.941,1],l:[.45,.6]}},descriptive:["very saturated"]},{criteria:{hsl:{h:[0,90],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[270,360],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[90.01,269.99],s:null,l:[.1,1]}},descriptive:["cold","cool"]},{criteria:{hsl:{h:null,s:null,l:[.98,1]}},nouns:["white"],description:["White is a color that is often associated with purity, innocence, and cleanliness. It is the lightest color on the visible spectrum and is often described as having a bright, luminous quality. When you think of white, you might imagine a freshly fallen snow, a blank canvas, or a cloudless sky. It is a versatile color that can be used in a wide range of settings and contexts, from formal to casual. If you close your eyes and picture white, you might imagine a bright, radiant light that illuminates everything around it."],meanings:["purity","cleanliness","simplicity","innocence","freshness","light","goodness","virtue","safety","peace","tranquility","wholeness","perfection","honesty","truth","sincerity"],usage:["health","hospital","sanitary"]},{criteria:{hsl:{h:null,s:null,l:[0,.08]}},nouns:["black"],description:["Black is a color that is often associated with power, elegance, and sophistication. It is a color that is often used to create a sense of mystery, depth, and contrast, and it is often described as a color that can be both bold and elegant. In art and design, black is often used to create a sense of sophistication and drama, and it is often used in fashion to create a sense of sophistication and refinement."],meanings:["power","control","authority","discipline","discretion","secrecy","elegance","mystery"],usage:["intimidate","create fear","authority","luxury"]},{criteria:{hsl:{h:[0,15],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage","excite"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.4,.99]}},descriptive:["orange"],nouns:["orange"],description:["Orange is a vibrant and playful color that is often associated with creativity, energy, and warmth. It is a secondary color that is made by combining red and yellow, and it is often described as a warm and friendly color that can be both invigorating and calming. It is often associated with joy, enthusiasm, and warmth, and it is often used in art and design to create a sense of excitement and playfulness."],meanings:["optimism","independence","adventure","creativity","fun"],usage:["stimulate","draw attention","express freedom","fascinate"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.07,.4]}},descriptive:["brown"],nouns:["brown"],description:["Brown is a warm and earthy color that is often associated with nature, stability, and reliability. It is a secondary color that is made by combining red, blue, and yellow in different proportions, and it is often described as a rich and luxurious color that can be both comforting and grounding. It is often associated with wood, soil, and the natural world, and it is often used in art and design to create a sense of warmth and permanence."],meanings:["strength","reliability","resilience","loneliness","sadness","isolation","warmth","comfort","security"],usage:["agriculture","legal","food","tobacco","alcohol"]},{criteria:{hsl:{h:[45,70],s:[.1,1],l:[.07,.99]}},descriptive:["yellow"],nouns:["yellow"],description:["Yellow is a bright and cheerful color that is often associated with sunshine, happiness, and warmth. It is a primary color that is made by combining red and green light, and it is usually described as a warm and vibrant color that can be both calming and energizing. It is often associated with joy, happiness, and friendship, and it is often used in art and design to create a sense of cheerfulness and playfulness."],meanings:["enthusiasm","opportunity","spontaneity","happiness","positivity"],usage:["stimulate","relax","awake awareness","energize","affect mood","sale","cheap","budget","construction","convey competence"]},{criteria:{hsl:{h:[70,79],s:[.1,1],l:[.07,.99]}},descriptive:["lime"],nouns:["lime"],description:["Lime is a bright, vibrant color that is often associated with freshness, energy, and youth. It is a pale shade of green that is similar to chartreuse, but it is slightly lighter and more vibrant. Some people may associate the color lime with feelings of playfulness and excitement, while others may associate it with feelings of rejuvenation and renewal. In terms of wavelength, lime is a mixture of green and yellow light, and it is often used in art and design to create a sense of energy and vitality. Overall, lime is a lively and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["growth","harmony","fertility","kindness","dependability"],usage:["restore energy","promote growth","awake awareness","rejuvenate","nature"]},{criteria:{hsl:{h:[79,163],s:[.1,1],l:[.07,.99]}},descriptive:["green","greenish"],nouns:["green"],description:["Green is a cool, refreshing color that is often associated with nature, growth, and freshness. It is the color of grass, leaves, and trees, and it is often used to create a sense of harmony and balance. Some people may associate the color green with feelings of jealousy or envy, while others may associate it with feelings of peace and tranquility. In terms of wavelength, green is a primary color of light, and it is located between blue and yellow on the visible light spectrum. It is often used in art and design to create a sense of growth and renewal. Overall, green is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["safety","harmony","stability","reliability","balance"],usage:["relax","ballance","revitalize","encourage","posses"]},{criteria:{hsl:{h:[163,193],s:[.1,1],l:[.07,.99]}},descriptive:["cyan"],nouns:["cyan","sky blue"],description:["Cyan is a bright, fresh color that is often associated with the ocean, the sky, and the natural world. It is a pale shade of blue that is similar to teal, but it is slightly lighter and more muted. Some people may associate the color cyan with feelings of peace and serenity, while others may associate it with feelings of youth and playfulness. In terms of wavelength, cyan is a mixture of blue and green light, and it is often used in art and design to create a sense of freshness and vitality. Overall, cyan is a versatile and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["freedom","trust","wisdom","joy","refreshing","consciousness","stimulating"],usage:["self expression","communication","children products","technology","aerospace","entertainment","productivity"]},{criteria:{hsl:{h:[193,240],s:[.1,1],l:[.07,.99]}},descriptive:["blue","blueish"],nouns:["blue"],description:["Blue is a cool, calming color that is often associated with trust, reliability, and intelligence. It is the color of the sky and the ocean, and it is often used to create a sense of peace and tranquility. Some people may associate the color blue with feelings of sadness or melancholy, while others may associate it with feelings of calm and relaxation. In terms of wavelength, blue is a primary color of light, and it is located between green and violet on the visible light spectrum. It is often used in art and design to create a sense of balance and harmony. Overall, blue is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["trust","responsibility","honesty","loyalty","security","relying","calmness","control"],usage:["security","finance","technology","health care","accounting"]},{criteria:{hsl:{h:[240,260],s:[.1,1],l:[.07,.99]}},descriptive:["indigo"],nouns:["indigo"],description:["Indigo is a deep, rich color that is often associated with spirituality, intuition, and wisdom. It is a dark shade of blue that is similar to navy, but it is slightly lighter and more muted. Some people may associate the color indigo with feelings of calm and relaxation, while others may associate it with feelings of mystery and intrigue. In terms of wavelength, indigo is a deep blue color that is located between blue and violet on the visible light spectrum. It is often used in art and design to add a touch of depth and complexity. Overall, indigo is a beautiful and versatile color that can be used to create a wide range of moods and atmospheres."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[260,270],s:[.1,1],l:[.07,.99]}},descriptive:["violet"],nouns:["violet"],description:["Violet is a rich, regal color that is often associated with luxury, royalty, and sophistication. It is a deep shade of purple that is similar to lavender, but it is slightly darker and more intense. Some people may associate the color violet with feelings of mystery and spirituality, while others may associate it with feelings of calm and tranquility. In terms of wavelength, violet is a mixture of blue and red light, and it is often used in art and design to add a touch of elegance and refinement. Overall, violet is a beautiful and sophisticated color that can be used to create a calm and peaceful atmosphere."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[270,291],s:[.1,1],l:[.07,.99]}},descriptive:["purple","purplish"],nouns:["purple"],description:["Purple is a rich and vibrant color that is often associated with royalty, luxury, and creativity. It is a combination of blue and red, with more red than blue, giving it a warm and passionate quality. The shade of purple can vary from a deep, dark hue to a light, almost lavender color, and each shade can evoke different emotions and meanings. Some people may associate purple with spirituality and mysticism, while others may see it as a symbol of extravagance and decadence. In terms of wavelength, purple is located between blue and violet on the visible light spectrum and has a shorter wavelength than most other colors. Because of its striking and eye-catching nature, purple is frequently used in fashion, art, and design to add a pop of color and flair. Overall, purple is a captivating and dynamic color that can express a wide range of moods and emotions, making it a favorite among many people."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic","royalty"]},{criteria:{hsl:{h:[291,327],s:[.1,1],l:[.07,.99]}},descriptive:["magenta"],nouns:["magenta"],description:["Magenta is a deep, rich color that is often associated with creativity, passion, and intensity. It is a vibrant shade of pink that is similar to fuchsia, but it is slightly darker and more muted. Some people may associate the color magenta with feelings of excitement and energy, while others may associate it with feelings of love and romance. In terms of wavelength, magenta is a mixture of red and blue light, and it is often used in art and design to add a bold and striking touch. Overall, magenta is a vibrant and lively color that can be used to add drama and excitement to any setting."],meanings:["support","kind","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products",,"erotica"]},{criteria:{hsl:{h:[327,344],s:[.1,1],l:[.07,.99]}},descriptive:["pink"],nouns:["pink"],description:["Pink is a light, delicate color that is often associated with femininity, romance, and sweetness. It is a pale shade of red, and it is often described as a softer, more gentle version of the color. Some people may associate the color pink with feelings of happiness and playfulness, while others may associate it with feelings of warmth and comfort. In terms of wavelength, pink is a mixture of red and white light, and it is often used in decorations and clothing to add a touch of whimsy and fun. Overall, pink is a cheerful and playful color that can be used to create a warm and inviting atmosphere."],meanings:["support","kindness","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products","erotica"]},{criteria:{hsl:{h:[344,360],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage"]}],temperatures:[{value:1800,descriptive:["ultra warm"]},{value:2400,descriptive:["very warm"]},{value:2700,descriptive:["warm"]},{value:3e3,descriptive:["warm white"]},{value:4e3,descriptive:["cool or cold"]},{value:6500,descriptive:["cool"]}],percentWords:[{maxPercentile:.06,word:"a dash of"},{maxPercentile:.16,word:"a little bit of"},{maxPercentile:.31,word:"some"},{maxPercentile:.56,word:"a good bit of"},{maxPercentile:.71,word:"a lot of"},{maxPercentile:.86,word:"a whole lot of"},{maxPercentile:.99,word:"neatly entirely"},{maxPercentile:1,word:"entirely"}]};var Bo={rgb:Z("rgb"),hsl:Z("hsl")},Ni={rgb:["r","g","b"],cmyk:["c","m","y","k"],hsl:["h","s","l"]},E,Fo,ve,xr=class{constructor(t,r=Zo){Xr(this,E);Tt(this,"formats",{});Tt(this,"currentColor",null);this.color=t,this.descriptions=r.descriptions,this.temperatures=r.temperatures,this.percentWords=r.percentWords}set color(t){this.currentColor=oe(this,E,Fo).call(this,t);let r=Bo.rgb(this.currentColor);this.formats.rgb=r,this.formats.hsl=Bo.hsl(this.currentColor),this.formats.cmyk=Sr(r)}get color(){return this.currentColor}get temperatureWords(){let t=Hr(this.formats.rgb);return this.temperatures.reduce((r,n)=>Math.abs(n.value-t)r[a]),o=n.reduce((a,i)=>a+i,0);return n.map(a=>o?a/o:0)}percentageWords(t="rgb"){return this.percentages(t).map(r=>this.percentWords.find(n=>n.maxPercentile>=r).word)}get descriptiveWords(){return oe(this,E,ve).call(this,"descriptive")}get nouns(){return oe(this,E,ve).call(this,"nouns")}get meanings(){return oe(this,E,ve).call(this,"meanings")}get usage(){return oe(this,E,ve).call(this,"usage")}get description(){return oe(this,E,ve).call(this,"description")}get bestContrast(){return ht(this.color,"black")>ht(this.color,"white")?"black":"white"}getDescriptiveList(t,r){let n=[...this.descriptiveWords];if(t&&(n=zt(n)),r&&(n=n.slice(0,r)),n.length>1){let o=n.pop();return`${n.join(", ")} and ${o}`}else return n[0]}};E=new WeakSet,Fo=function(t){try{return Xe(t)}catch(r){throw new TypeError("Invalid color. Check the chroma-js documentation.")}},ve=function(t="descriptive",r=!1,n){let o=this.descriptions.reduce((a,i)=>i.hasOwnProperty(t)&&Object.keys(i.criteria).every(p=>{let c=this.formats[p];return Object.entries(i.criteria[p]).every(([b,h])=>{if(!(b in c)||c[b]===void 0||c[b]===null||h===null)return!0;let v=c[b];return Array.isArray(h)?_r(v,h[0],h[1]):isNaN(h)?!1:v===h})})?[...new Set([...a,...i[t]])]:a,[]);return r?zt(o).slice(0,n):o.slice(0,n)};var qi=xr;return ln($i);})(); +`||t[u]===" "||t[u]===" ");)u++;let o;if(Ye(t)&&(o=_e(t),o.type!==s.Hue)){r.push({type:s.Alpha,value:o});continue}if(Xt(t)&&Ge(t)==="none"){r.push({type:s.Alpha,value:{type:s.None,value:void 0}});continue}return}if(/\d/.test(n)){u--,r.push(_e(t));continue}if(Rt.test(n)){u--,r.push(Xn(t));continue}return}return r}function _n(e){e._i=0;let t=e[e._i++];if(!t||t.type!==s.Function||t.value!=="color"||(t=e[e._i++],t.type!==s.Ident))return;let r=Lt[t.value];if(!r)return;let n={mode:r},o=Dr(e,!1);if(!o)return;let a=Ar(r).channels;for(let i=0,l,d;i4)){if(r.length===4){if(r[3].type!==s.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:s.None,value:void 0}),r.every(o=>o.type!==s.Alpha)?r:void 0}}function Sn(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==s.Function)return;let n=Dr(e,t);if(n)return n.unshift(r.value),n}var In=e=>{if(typeof e!="string")return;let t=Hn(e),r=t?Sn(t,!0):void 0,n,o=0,a=He.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Jr=Cn;var Er=(e,t,r)=>e+r*(t-e);var On=e=>{let t=[];for(let r=0;rt=>{let r=On(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var f=Yr(Er);var m=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var Nn={mode:"rgb",channels:["r","g","b","alpha"],parse:[jr,Cr,Nr,Pr,Jr,"srgb"],serialize:"srgb",interpolate:{r:f,g:f,b:f,alpha:{use:f,fixup:m}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},N=Nn;var Ht=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),qn=e=>{let t=Ht(e.r),r=Ht(e.g),n=Ht(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},_t=qn;var St=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),$n=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:St(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:St(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:St(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},It=$n;var Pt=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},An=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Pt(e),g:Pt(t),b:Pt(r)};return n!==void 0&&(o.alpha=n),o},q=An;var Dn=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},I=Dn;var Ct=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},jn=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:Ct(e),g:Ct(t),b:Ct(r)};return n!==void 0&&(a.alpha=n),a},$=jn;var Jn=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},P=Jn;var En=M(y({},N),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>It(I(e)),xyz65:It},toMode:{rgb:e=>P(_t(e)),xyz65:_t}}),Wr=En;var Yn=e=>(e=e%360)<0?e+360:e,v=Yn;var Wn=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=v(r);return n===0||e[n-1]===void 0?a:t(a-v(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),L=e=>Wn(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var T=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Gr=Math.PI/180,Zr=180/Math.PI;var Br=T[3]*T[4],Fr=T[1]*T[4],Kr=T[1]*T[2]-T[0]*T[3],Gn=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Kr*r+e*Br-t*Fr)/(Kr+Br-Fr),a=r-o,i=(T[4]*(t-o)-T[2]*a)/T[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(T[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(i,a)*Zr-120),n!==void 0&&(l.alpha=n),l},Ur=Gn;var Zn=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Gr,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),l=Math.sin(e);return o.r=r+a*(T[0]*i+T[1]*l),o.g=r+a*(T[2]*i+T[3]*l),o.b=r+a*(T[4]*i+T[5]*l),n!==void 0&&(o.alpha=n),o},Vr=Zn;var B=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=v(e.h),n=v(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},Qr=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=v(e.h),n=v(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},F=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=v(e.h),n=v(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var R=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Bn={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Ur},toMode:{rgb:Vr},interpolate:{h:{use:f,fixup:L},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:B},average:{h:R}},eo=Bn;var Fn=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=v(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},C=Fn;var Kn=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},O=Kn;var Ze=Math.pow(29,3)/Math.pow(3,3),Be=Math.pow(6,3)/Math.pow(29,3);var w={X:.9642956764295677,Y:1,Z:.8251046025104602},K={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},cs=Math.pow(29,3)/Math.pow(3,3),ms=Math.pow(6,3)/Math.pow(29,3);var Ot=e=>Math.pow(e,3)>Be?Math.pow(e,3):(116*e-16)/Ze,Un=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz65",x:Ot(a)*K.X,y:Ot(o)*K.Y,z:Ot(i)*K.Z};return n!==void 0&&(l.alpha=n),l},Fe=Un;var Vn=e=>P(Fe(e)),U=Vn;var Nt=e=>e>Be?Math.cbrt(e):(Ze*e+16)/116,Qn=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Nt(e/K.X),a=Nt(t/K.Y),i=Nt(r/K.Z),l={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},Ke=Qn;var ea=e=>{let t=Ke(I(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V=ea;var ae=.14444444444444443*Math.PI,se=Math.cos(ae),fe=Math.sin(ae),Ue=100/Math.log(139/100);var ta=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Ue)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-ae),l=a*Math.sin(r/180*Math.PI-ae);return o.a=i*se-l/.83*fe,o.b=i*fe+l/.83*se,n!==void 0&&(o.alpha=n),o},Ie=ta;var ra=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*se+r*fe,a=.83*(r*se-t*fe),i=Math.sqrt(o*o+a*a),l={mode:"dlch",l:Ue/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return l.c&&(l.h=v((Math.atan2(a,o)+ae)/Math.PI*180)),n!==void 0&&(l.alpha=n),l},Pe=ra;var to=e=>Ie(C(e,"dlch")),ro=e=>O(Pe(e),"dlab"),oa={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:to,rgb:e=>U(to(e))},fromMode:{lab65:ro,rgb:e=>ro(V(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},oo=oa;var na={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Ie,dlab:e=>O(e,"dlab"),rgb:e=>U(Ie(e))},fromMode:{lab65:Pe,dlab:e=>C(e,"dlch"),rgb:e=>Pe(V(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:f,c:f,h:{use:f,fixup:L},alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},no=na;function $t({h:e,s:t,i:r,alpha:n}){e=v(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function At({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},io=ia;var la=new RegExp(`^hsla?\\(\\s*${Or}${G}${ne}${G}${ne}\\s*(?:,\\s*${Re}\\s*)?\\)$`),sa=e=>{let t=e.match(la);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=io(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},lo=sa;function fa(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.s=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.l=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var so=fa;var da={mode:"hsl",toMode:{rgb:Dt},fromMode:{rgb:jt},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[so,lo],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:L},s:f,l:f,alpha:{use:f,fixup:m}},difference:{h:B},average:{h:R}},Ve=da;function Ce({h:e,s:t,v:r,alpha:n}){e=v(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Oe({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t1){let o=t+r;t/=o,r/=o}return Ce({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function Et(e){let t=Oe(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function pa(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Percentage)return;r.h=n.value}if(o.type!==s.None){if(o.type===s.Hue)return;r.w=o.value/100}if(a.type!==s.None){if(a.type===s.Hue)return;r.b=a.value/100}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var fo=pa;var ca={mode:"hwb",toMode:{rgb:Jt},fromMode:{rgb:Et},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[fo],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:L},w:f,b:f,alpha:{use:f,fixup:m}},difference:{h:Qr},average:{h:R}},uo=ca;var de=.1593017578125,po=78.84375,ue=.8359375,pe=18.8515625,ce=18.6875;function et(e){if(e<0)return 0;let t=Math.pow(e,1/po);return 1e4*Math.pow(Math.max(0,t-ue)/(pe-ce*t),1/de)}function tt(e){if(e<0)return 0;let t=Math.pow(e/1e4,de);return Math.pow((ue+pe*t)/(1+ce*t),po)}var Yt=e=>Math.max(e/203,0),ha=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=et(e+.008609037037932761*t+.11102962500302593*r),a=et(e-.00860903703793275*t-.11102962500302599*r),i=et(e+.5600313357106791*t-.32062717498731885*r),l={mode:"xyz65",x:Yt(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:Yt(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:Yt(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(l.alpha=n),l},Wt=ha;var Gt=(e=0)=>Math.max(e*203,0),ba=({x:e,y:t,z:r,alpha:n})=>{let o=Gt(e),a=Gt(t),i=Gt(r),l=tt(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),d=tt(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),p=tt(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*l+.5*d,h=1.61376953125*l-3.323486328125*d+1.709716796875*p,b=4.378173828125*l-4.24560546875*d-.132568359375*p,x={mode:"itp",i:c,t:h,p:b};return n!==void 0&&(x.alpha=n),x},Zt=ba;var ga={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Wt,rgb:e=>P(Wt(e))},fromMode:{xyz65:Zt,rgb:e=>Zt(I(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:f,t:f,p:f,alpha:{use:f,fixup:m}}},co=ga;var xa=134.03437499999998,va=16295499532821565e-27,Bt=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,de);return Math.pow((ue+pe*t)/(1+ce*t),xa)},Ft=(e=0)=>Math.max(e*203,0),ya=({x:e,y:t,z:r,alpha:n})=>{e=Ft(e),t=Ft(t),r=Ft(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=Bt(.41478972*o+.579999*a+.014648*r),l=Bt(-.20151*o+1.120649*a+.0531008*r),d=Bt(-.0166008*o+.2648*a+.6684799*r),p=(i+l)/2,c={mode:"jab",j:.44*p/(1-.56*p)-va,a:3.524*i-4.066708*l+.542708*d,b:.199076*i+1.096799*l-1.295875*d};return n!==void 0&&(c.alpha=n),c},rt=ya;var Ma=134.03437499999998,mo=16295499532821565e-27,Kt=e=>{if(e<0)return 0;let t=Math.pow(e,1/Ma);return 1e4*Math.pow((ue-t)/(ce*t-pe),1/de)},Ut=e=>e/203,wa=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+mo)/(.44+.56*(e+mo)),a=Kt(o+.13860504*t+.058047316*r),i=Kt(o-.13860504*t-.058047316*r),l=Kt(o-.096019242*t-.8118919*r),d={mode:"xyz65",x:Ut(1.661373024652174*a-.914523081304348*i+.23136208173913045*l),y:Ut(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*l),z:Ut(-.090982811*a-.31272829*i+1.5227666*l)};return n!==void 0&&(d.alpha=n),d},ot=wa;var Ta=e=>{let t=rt(I(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},nt=Ta;var ka=e=>P(ot(e)),at=ka;var za={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:nt,xyz65:rt},toMode:{rgb:at,xyz65:ot},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:f,a:f,b:f,alpha:{use:f,fixup:m}}},ho=za;var La=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=v(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Vt=La;var Ra=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Qt=Ra;var Xa={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qt,rgb:e=>at(Qt(e))},fromMode:{rgb:e=>Vt(nt(e)),jab:Vt},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:f,fixup:L},c:f,j:f,alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},bo=Xa;var Q=Math.pow(29,3)/Math.pow(3,3),me=Math.pow(6,3)/Math.pow(29,3);var er=e=>Math.pow(e,3)>me?Math.pow(e,3):(116*e-16)/Q,Ha=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,l={mode:"xyz50",x:er(a)*w.X,y:er(o)*w.Y,z:er(i)*w.Z};return n!==void 0&&(l.alpha=n),l},he=Ha;var _a=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},D=_a;var Sa=e=>D(he(e)),it=Sa;var Ia=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},j=Ia;var tr=e=>e>me?Math.cbrt(e):(Q*e+16)/116,Pa=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=tr(e/w.X),a=tr(t/w.Y),i=tr(r/w.Z),l={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(l.alpha=n),l},be=Pa;var Ca=e=>{let t=be(j(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},lt=Ca;function Oa(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*125/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*125/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var go=Oa;var Na={mode:"lab",toMode:{xyz50:he,rgb:it},fromMode:{xyz50:be,rgb:lt},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[go],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:f,a:f,b:f,alpha:{use:f,fixup:m}}},ge=Na;var qa=M(y({},ge),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Fe,rgb:U},fromMode:{xyz65:Ke,rgb:V},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}}),xo=qa;function $a(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*150/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var vo=$a;var Aa={mode:"lch",toMode:{lab:O,rgb:e=>it(O(e))},fromMode:{rgb:e=>C(lt(e)),lab:C},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[vo],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:f,fixup:L},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},xe=Aa;var Da=M(y({},xe),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>O(e,"lab65"),rgb:e=>U(O(e,"lab65"))},fromMode:{rgb:e=>C(V(e),"lch65"),lab65:e=>C(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}}),yo=Da;var ja=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=v(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},rr=ja;var Ja=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},or=Ja;var Mo=(e,t,r)=>4*e/(e+15*t+3*r),wo=(e,t,r)=>9*t/(e+15*t+3*r),Ea=Mo(w.X,w.Y,w.Z),Ya=wo(w.X,w.Y,w.Z),Wa=e=>e<=me?Q*e:116*Math.cbrt(e)-16,Ga=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Wa(t/w.Y),a=Mo(e,t,r),i=wo(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-Ea),i=13*o*(i-Ya));let l={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(l.alpha=n),l},Ne=Ga;var Za=(e,t,r)=>4*e/(e+15*t+3*r),Ba=(e,t,r)=>9*t/(e+15*t+3*r),Fa=Za(w.X,w.Y,w.Z),Ka=Ba(w.X,w.Y,w.Z),Ua=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+Fa,a=r/(13*e)+Ka,i=w.Y*(e<=8?e/Q:Math.pow((e+16)/116,3)),l=i*(9*o)/(4*a),d=i*(12-3*o-20*a)/(4*a),p={mode:"xyz50",x:l,y:i,z:d};return n!==void 0&&(p.alpha=n),p},qe=Ua;var Va=e=>rr(Ne(j(e))),Qa=e=>D(qe(or(e))),ei={mode:"lchuv",toMode:{luv:or,rgb:Qa},fromMode:{rgb:Va,luv:rr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:f,fixup:L},c:f,l:f,alpha:{use:f,fixup:m}},difference:{h:F},average:{h:R}},To=ei;var ti=M(y({},N),{mode:"lrgb",toMode:{rgb:$},fromMode:{rgb:q},parse:["srgb-linear"],serialize:"srgb-linear"}),ko=ti;var ri={mode:"luv",toMode:{xyz50:qe,rgb:e=>D(qe(e))},fromMode:{xyz50:Ne,rgb:e=>Ne(j(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:f,u:f,v:f,alpha:{use:f,fixup:m}}},zo=ri;var oi=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*r),a=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*r),i=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*r),l={mode:"oklab",l:.2104542553*o+.793617785*a-.0040720468*i,a:1.9779984951*o-2.428592205*a+.4505937099*i,b:.0259040371*o+.7827717662*a-.808675766*i};return n!==void 0&&(l.alpha=n),l},st=oi;var ni=e=>{let t=st(q(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ee=ni;var ai=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*r,3),a=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*r,3),i=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*r,3),l={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*a+.230969928729428*i,g:-1.2684380040921763*o+2.6097574006633715*a-.3413193963102197*i,b:-.004196086541837188*o-.7034186144594493*a+1.7076147009309444*i};return n!==void 0&&(l.alpha=n),l},J=ai;var ii=e=>$(J(e)),te=ii;function $e(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function ie(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function li(e,t){let r,n,o,a,i,l,d,p;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,l=4.0767416621,d=-3.3077115913,p=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,l=-1.2684380046,d=2.6097574011,p=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,l=-.0041960863,d=-.7034186147,p=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,h=.3963377774*e+.2158037573*t,b=-.1055613458*e-.0638541728*t,x=-.0894841775*e-1.291485548*t;{let k=1+c*h,X=1+c*b,z=1+c*x,S=k*k*k,H=X*X*X,W=z*z*z,ye=3*h*k*k,Me=3*b*X*X,we=3*x*z*z,Te=6*h*h*k,ke=6*b*b*X,ze=6*x*x*z,le=l*S+d*H+p*W,re=l*ye+d*Me+p*we,Le=l*Te+d*ke+p*ze;c=c-le*re/(re*re-.5*le*Le)}return c}function nr(e,t){let r=li(e,t),n=J({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function si(e,t,r,n,o,a=null){a||(a=nr(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let l=r-o,d=n,p=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t,b=l+d*p,x=l+d*c,k=l+d*h;{let X=o*(1-i)+i*r,z=i*n,S=X+z*p,H=X+z*c,W=X+z*h,ye=S*S*S,Me=H*H*H,we=W*W*W,Te=3*b*S*S,ke=3*x*H*H,ze=3*k*W*W,le=6*b*b*S,re=6*x*x*H,Le=6*k*k*W,vr=4.0767416621*ye-3.3077115913*Me+.2309699292*we-1,bt=4.0767416621*Te-3.3077115913*ke+.2309699292*ze,Ko=4.0767416621*le-3.3077115913*re+.2309699292*Le,yr=bt/(bt*bt-.5*vr*Ko),gt=-vr*yr,Mr=-1.2684380046*ye+2.6097574011*Me-.3413193965*we-1,xt=-1.2684380046*Te+2.6097574011*ke-.3413193965*ze,Uo=-1.2684380046*le+2.6097574011*re-.3413193965*Le,wr=xt/(xt*xt-.5*Mr*Uo),vt=-Mr*wr,Tr=-.0041960863*ye-.7034186147*Me+1.707614701*we-1,yt=-.0041960863*Te-.7034186147*ke+1.707614701*ze,Vo=-.0041960863*le-.7034186147*re+1.707614701*Le,kr=yt/(yt*yt-.5*Tr*Vo),Mt=-Tr*kr;gt=yr>=0?gt:1e6,vt=wr>=0?vt:1e6,Mt=kr>=0?Mt:1e6,i+=Math.min(gt,Math.min(vt,Mt))}}}return i}function Ae(e,t,r=null){r||(r=nr(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function ft(e,t,r){let n=nr(t,r),o=si(t,r,e,1,e,n),a=Ae(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),l=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),d=o/Math.min(e*a[0],(1-e)*a[1]),p=e*i,c=(1-e)*l,h=.9*d*Math.sqrt(Math.sqrt(1/(1/(p*p*p*p)+1/(c*c*c*c))));return p=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(p*p)+1/(c*c))),h,o]}function dt(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:$e(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,l,d]=ft(t,r/a,n/a),p;if(adt(ee(e))},toMode:{oklab:ut,rgb:e=>te(ut(e))}}),Lo=fi;function pt(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[l,d]=Ae(a,i),p=.5,c=1-p/l,h=d/(o+t*d),b=h*t,x=h*o,k=ie(b),X=x*k/b,z=J({l:k,a:a*X,b:i*X}),S=Math.cbrt(1/Math.max(z.r,z.g,z.b,0));t=t/S,o=o/S*$e(t)/t,t=$e(t);let H={mode:"okhsv",s:o?(p+d)*x/(d*p+d*c*x):0,v:t?t/b:0};return H.s&&(H.h=v(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(H.alpha=e.alpha),H}function ct(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[l,d]=Ae(a,i),p=.5,c=1-p/l,h=1-n*p/(p+d-d*c*n),b=n*d*p/(p+d-d*c*n),x=ie(h),k=b*x/h,X=J({l:x,a:a*k,b:i*k}),z=Math.cbrt(1/Math.max(X.r,X.g,X.b,0)),S=ie(o*h),H=b*S/h;return t.l=S*z,t.a=H*a*z,t.b=H*i*z,t}var di=M(y({},Qe),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:pt,rgb:e=>pt(ee(e))},toMode:{oklab:ct,rgb:e=>te(ct(e))}}),Ro=di;function ui(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===s.Hue||o.type===s.Hue||a.type===s.Hue))return n.type!==s.None&&(r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)),o.type!==s.None&&(r.a=o.type===s.Number?o.value:o.value*.4/100),a.type!==s.None&&(r.b=a.type===s.Number?a.value:a.value*.4/100),i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var Xo=ui;var pi=M(y({},ge),{mode:"oklab",toMode:{lrgb:J,rgb:te},fromMode:{lrgb:st,rgb:ee},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Xo],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),Ho=pi;function ci(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==s.None){if(n.type===s.Hue)return;r.l=Math.min(Math.max(0,n.type===s.Number?n.value:n.value/100),1)}if(o.type!==s.None&&(r.c=Math.max(0,o.type===s.Number?o.value:o.value*.4/100)),a.type!==s.None){if(a.type===s.Percentage)return;r.h=a.value}return i.type!==s.None&&(r.alpha=Math.min(1,Math.max(0,i.type===s.Number?i.value:i.value/100))),r}var _o=ci;var mi=M(y({},xe),{mode:"oklch",toMode:{oklab:e=>O(e,"oklab"),rgb:e=>te(O(e,"oklab"))},fromMode:{rgb:e=>C(ee(e),"oklch"),oklab:e=>C(e,"oklch")},parse:[_o],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),So=mi;var hi=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},ar=hi;var bi=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},ir=bi;var gi=M(y({},N),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ir(I(e)),xyz65:ir},toMode:{rgb:e=>P(ar(e)),xyz65:ar}}),Io=gi;var lr=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},xi=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:lr(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:lr(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:lr(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},sr=xi;var fr=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},vi=e=>{let t=fr(e.r),r=fr(e.g),n=fr(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},dr=vi;var yi=M(y({},N),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:sr,rgb:e=>sr(j(e))},toMode:{xyz50:dr,rgb:e=>D(dr(e))}}),Po=yi;var Co=1.09929682680944,Mi=.018053968510807,ur=e=>{let t=Math.abs(e);return t>Mi?(Math.sign(e)||1)*(Co*Math.pow(t,.45)-(Co-1)):4.5*e},wi=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:ur(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:ur(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:ur(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},pr=wi;var Oo=1.09929682680944,Ti=.018053968510807,cr=(e=0)=>{let t=Math.abs(e);return t{let t=cr(e.r),r=cr(e.g),n=cr(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},mr=ki;var zi=M(y({},N),{mode:"rec2020",fromMode:{xyz65:pr,rgb:e=>pr(I(e))},toMode:{xyz65:mr,rgb:e=>P(mr(e))},parse:["rec2020"],serialize:"rec2020"}),No=zi;var Y=.0037930732552754493,mt=Math.cbrt(Y);var hr=e=>Math.cbrt(e)-mt,Li=e=>{let{r:t,g:r,b:n,alpha:o}=q(e),a=hr(.3*t+.622*r+.078*n+Y),i=hr(.23*t+.692*r+.078*n+Y),l=hr(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+Y),d={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:l-(a+i)/2};return o!==void 0&&(d.alpha=o),d},qo=Li;var br=e=>Math.pow(e+mt,3),Ri=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=br(e+t)-Y,a=br(t-e)-Y,i=br(r+t)-Y,l=$({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(l.alpha=n),l},$o=Ri;var Xi={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:$o},fromMode:{rgb:qo},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:f,y:f,b:f,alpha:{use:f,fixup:m}}},Ao=Xi;var Hi={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:D,lab:be},fromMode:{rgb:j,lab:he},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},Do=Hi;var _i=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},jo=_i;var Si=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},Jo=Si;var Ii={mode:"xyz65",toMode:{rgb:P,xyz50:jo},fromMode:{rgb:I,xyz50:Jo},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:f,y:f,z:f,alpha:{use:f,fixup:m}}},Eo=Ii;var Pi=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},Yo=Pi;var Ci=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},Wo=Ci;var Oi={mode:"yiq",toMode:{rgb:Wo},fromMode:{rgb:Yo},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:f,i:f,q:f,alpha:{use:f,fixup:m}}},Go=Oi;function gr(e){let t=Z("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function ht(e,t){let r=gr(e),n=gr(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var bm=g(Wr),gm=g(eo),xm=g(oo),vm=g(no),ym=g(ao),Mm=g(Ve),wm=g(Qe),Tm=g(uo),km=g(co),zm=g(ho),Lm=g(bo),Rm=g(ge),Xm=g(xo),Hm=g(xe),_m=g(yo),Sm=g(To),Im=g(ko),Pm=g(zo),Cm=g(Lo),Om=g(Ro),Nm=g(Ho),qm=g(So),$m=g(Io),Am=g(Po),Dm=g(No),jm=g(N),Jm=g(Ao),Em=g(Do),Ym=g(Eo),Wm=g(Go);var Zo={descriptions:[{criteria:{hsl:{h:null,s:[.75,1],l:[.4,.55]}},descriptive:["saturated","strong","lush","ablaze","beaming","bold","brilliant","flamboyant","vibrant","vivid","loud"]},{criteria:{hsl:{h:null,s:null,l:[0,.07]}},descriptive:["dark","ashy","somber","bleak","muddy","sooty"]},{criteria:{hsl:{h:null,s:null,l:[0,.3]}},descriptive:["dark","dim","gloomy","dull"]},{criteria:{hsl:{h:null,s:[.1,.7],l:[.15,.5]}},descriptive:["bleak","muted","matte","dusty"]},{criteria:{hsl:{h:null,s:[.12,1],l:[.7,1]}},descriptive:["tinted"]},{criteria:{hsl:{h:null,s:[.2,1],l:[.75,.95]}},descriptive:["pastel"]},{criteria:{hsl:{h:null,s:null,l:[.88,1]}},descriptive:["pale","light","faded","delicate","glistening","bleached"]},{criteria:{hsl:{h:null,s:[.5,1],l:[.7,.9]}},descriptive:["fresh","sparkling","glittering","glowing","jazzy","opalescent"]},{criteria:{hsl:{h:null,s:null,l:[.9,1]}},descriptive:["neutral"]},{criteria:{hsl:{h:null,s:[.74,1],l:[.9,1]}},descriptive:["muted"]},{criteria:{hsl:{h:null,s:null,l:1}},descriptive:["colorless","bright","brilliant","high"]},{criteria:{hsl:{h:null,s:null,l:0}},descriptive:["colorless","low","dark"]},{criteria:{hsl:{h:null,s:[0,.01],l:null}},descriptive:["colorless","neutral"]},{criteria:{hsl:{h:null,s:null,l:[.01,.3]}},descriptive:["shady"]},{criteria:{hsl:{h:null,s:[0,.4],l:null}},descriptive:["ashy","dusty"]},{criteria:{hsl:{h:null,s:null,l:[.01,.08]}},descriptive:["almost black"]},{criteria:{hsl:{h:null,s:null,l:[0,.02]}},descriptive:["black"]},{criteria:{hsl:{h:null,s:null,l:[0,.09]}},descriptive:["very dark"]},{criteria:{hsl:{h:null,s:[0,.4],l:[0,.22]}},descriptive:["dark"]},{criteria:{hsl:{h:null,s:[.1,.4],l:[0,.6]}},descriptive:["dark","inky","dim","gloomy"]},{criteria:{hsl:{h:null,s:[0,.04],l:[.1,.99]}},descriptive:["grey"],nouns:["grey"],description:["Grey is a color often linked with neutrality, balance, and calm. It sits between black and white on the color spectrum, giving it a muted, understated quality. When you think of grey, you might picture misty mornings, smooth stone, or the quiet stillness of a cloudy day. It's a versatile color, fitting equally well in minimalist designs or more somber settings. Grey can evoke feelings of tranquility, contemplation, and sophistication. Close your eyes and imagine grey\u2014it might appear as a soft shadow or a subtle haze that wraps the world in a calm, muted tone."]},{criteria:{hsl:{h:null,s:[.04,.1],l:[.17,.99]}},descriptive:["almost grey"]},{criteria:{hsl:{h:null,s:[.1,.3],l:[.17,.99]}},descriptive:["very unsaturated"]},{criteria:{hsl:{h:null,s:[.3,.46],l:null}},descriptive:["unsaturated"]},{criteria:{hsl:{h:null,s:[.46,.6],l:[.4,.55]}},descriptive:["rather unsaturated"]},{criteria:{hsl:{h:null,s:[.601,.8],l:[.45,.6]}},descriptive:["saturated"]},{criteria:{hsl:{h:null,s:[.801,.94],l:[.45,.6]}},descriptive:["rather saturated"]},{criteria:{hsl:{h:null,s:[.941,1],l:[.45,.6]}},descriptive:["very saturated"]},{criteria:{hsl:{h:[0,90],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[270,360],s:[.3,1],l:[.1,1]}},descriptive:["warm","mellow"]},{criteria:{hsl:{h:[90.01,269.99],s:null,l:[.1,1]}},descriptive:["cold","cool"]},{criteria:{hsl:{h:null,s:null,l:[.98,1]}},nouns:["white"],description:["White is a color that is often associated with purity, innocence, and cleanliness. It is the lightest color on the visible spectrum and is often described as having a bright, luminous quality. When you think of white, you might imagine a freshly fallen snow, a blank canvas, or a cloudless sky. It is a versatile color that can be used in a wide range of settings and contexts, from formal to casual. If you close your eyes and picture white, you might imagine a bright, radiant light that illuminates everything around it."],meanings:["purity","cleanliness","simplicity","innocence","freshness","light","goodness","virtue","safety","peace","tranquility","wholeness","perfection","honesty","truth","sincerity"],usage:["health","hospital","sanitary"]},{criteria:{hsl:{h:null,s:null,l:[0,.08]}},nouns:["black"],description:["Black is a color that is often associated with power, elegance, and sophistication. It is a color that is often used to create a sense of mystery, depth, and contrast, and it is often described as a color that can be both bold and elegant. In art and design, black is often used to create a sense of sophistication and drama, and it is often used in fashion to create a sense of sophistication and refinement."],meanings:["power","control","authority","discipline","discretion","secrecy","elegance","mystery"],usage:["intimidate","create fear","authority","luxury"]},{criteria:{hsl:{h:[0,15],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage","excite"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.4,.99]}},descriptive:["orange"],nouns:["orange"],description:["Orange is a vibrant and playful color that is often associated with creativity, energy, and warmth. It is a secondary color that is made by combining red and yellow, and it is often described as a warm and friendly color that can be both invigorating and calming. It is often associated with joy, enthusiasm, and warmth, and it is often used in art and design to create a sense of excitement and playfulness."],meanings:["optimism","independence","adventure","creativity","fun"],usage:["stimulate","draw attention","express freedom","fascinate"]},{criteria:{hsl:{h:[15,45],s:[.1,1],l:[.07,.4]}},descriptive:["brown"],nouns:["brown"],description:["Brown is a warm and earthy color that is often associated with nature, stability, and reliability. It is a secondary color that is made by combining red, blue, and yellow in different proportions, and it is often described as a rich and luxurious color that can be both comforting and grounding. It is often associated with wood, soil, and the natural world, and it is often used in art and design to create a sense of warmth and permanence."],meanings:["strength","reliability","resilience","loneliness","sadness","isolation","warmth","comfort","security"],usage:["agriculture","legal","food","tobacco","alcohol"]},{criteria:{hsl:{h:[45,70],s:[.1,1],l:[.07,.99]}},descriptive:["yellow"],nouns:["yellow"],description:["Yellow is a bright and cheerful color that is often associated with sunshine, happiness, and warmth. It is a primary color that is made by combining red and green light, and it is usually described as a warm and vibrant color that can be both calming and energizing. It is often associated with joy, happiness, and friendship, and it is often used in art and design to create a sense of cheerfulness and playfulness."],meanings:["enthusiasm","opportunity","spontaneity","happiness","positivity"],usage:["stimulate","relax","awake awareness","energize","affect mood","sale","cheap","budget","construction","convey competence"]},{criteria:{hsl:{h:[70,79],s:[.1,1],l:[.07,.99]}},descriptive:["lime"],nouns:["lime"],description:["Lime is a bright, vibrant color that is often associated with freshness, energy, and youth. It is a pale shade of green that is similar to chartreuse, but it is slightly lighter and more vibrant. Some people may associate the color lime with feelings of playfulness and excitement, while others may associate it with feelings of rejuvenation and renewal. In terms of wavelength, lime is a mixture of green and yellow light, and it is often used in art and design to create a sense of energy and vitality. Overall, lime is a lively and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["growth","harmony","fertility","kindness","dependability"],usage:["restore energy","promote growth","awake awareness","rejuvenate","nature"]},{criteria:{hsl:{h:[79,163],s:[.1,1],l:[.07,.99]}},descriptive:["green","greenish"],nouns:["green"],description:["Green is a cool, refreshing color that is often associated with nature, growth, and freshness. It is the color of grass, leaves, and trees, and it is often used to create a sense of harmony and balance. Some people may associate the color green with feelings of jealousy or envy, while others may associate it with feelings of peace and tranquility. In terms of wavelength, green is a primary color of light, and it is located between blue and yellow on the visible light spectrum. It is often used in art and design to create a sense of growth and renewal. Overall, green is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["safety","harmony","stability","reliability","balance"],usage:["relax","ballance","revitalize","encourage","posses"]},{criteria:{hsl:{h:[163,193],s:[.1,1],l:[.07,.99]}},descriptive:["cyan"],nouns:["cyan","sky blue"],description:["Cyan is a bright, fresh color that is often associated with the ocean, the sky, and the natural world. It is a pale shade of blue that is similar to teal, but it is slightly lighter and more muted. Some people may associate the color cyan with feelings of peace and serenity, while others may associate it with feelings of youth and playfulness. In terms of wavelength, cyan is a mixture of blue and green light, and it is often used in art and design to create a sense of freshness and vitality. Overall, cyan is a versatile and refreshing color that can be used to create a wide range of moods and atmospheres."],meanings:["freedom","trust","wisdom","joy","refreshing","consciousness","stimulating"],usage:["self expression","communication","children products","technology","aerospace","entertainment","productivity"]},{criteria:{hsl:{h:[193,240],s:[.1,1],l:[.07,.99]}},descriptive:["blue","blueish"],nouns:["blue"],description:["Blue is a cool, calming color that is often associated with trust, reliability, and intelligence. It is the color of the sky and the ocean, and it is often used to create a sense of peace and tranquility. Some people may associate the color blue with feelings of sadness or melancholy, while others may associate it with feelings of calm and relaxation. In terms of wavelength, blue is a primary color of light, and it is located between green and violet on the visible light spectrum. It is often used in art and design to create a sense of balance and harmony. Overall, blue is a versatile and popular color that can be used to create a wide range of moods and atmospheres."],meanings:["trust","responsibility","honesty","loyalty","security","relying","calmness","control"],usage:["security","finance","technology","health care","accounting"]},{criteria:{hsl:{h:[240,260],s:[.1,1],l:[.07,.99]}},descriptive:["indigo"],nouns:["indigo"],description:["Indigo is a deep, rich color that is often associated with spirituality, intuition, and wisdom. It is a dark shade of blue that is similar to navy, but it is slightly lighter and more muted. Some people may associate the color indigo with feelings of calm and relaxation, while others may associate it with feelings of mystery and intrigue. In terms of wavelength, indigo is a deep blue color that is located between blue and violet on the visible light spectrum. It is often used in art and design to add a touch of depth and complexity. Overall, indigo is a beautiful and versatile color that can be used to create a wide range of moods and atmospheres."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[260,270],s:[.1,1],l:[.07,.99]}},descriptive:["violet"],nouns:["violet"],description:["Violet is a rich, regal color that is often associated with luxury, royalty, and sophistication. It is a deep shade of purple that is similar to lavender, but it is slightly darker and more intense. Some people may associate the color violet with feelings of mystery and spirituality, while others may associate it with feelings of calm and tranquility. In terms of wavelength, violet is a mixture of blue and red light, and it is often used in art and design to add a touch of elegance and refinement. Overall, violet is a beautiful and sophisticated color that can be used to create a calm and peaceful atmosphere."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic"]},{criteria:{hsl:{h:[270,291],s:[.1,1],l:[.07,.99]}},descriptive:["purple","purplish"],nouns:["purple"],description:["Purple is a rich and vibrant color that is often associated with royalty, luxury, and creativity. It is a combination of blue and red, with more red than blue, giving it a warm and passionate quality. The shade of purple can vary from a deep, dark hue to a light, almost lavender color, and each shade can evoke different emotions and meanings. Some people may associate purple with spirituality and mysticism, while others may see it as a symbol of extravagance and decadence. In terms of wavelength, purple is located between blue and violet on the visible light spectrum and has a shorter wavelength than most other colors. Because of its striking and eye-catching nature, purple is frequently used in fashion, art, and design to add a pop of color and flair. Overall, purple is a captivating and dynamic color that can express a wide range of moods and emotions, making it a favorite among many people."],meanings:["spirituality","structure","compassion","sensitivity","mystery","tolerance","integrity","order","wisdom","inspiration"],usage:["luxury","religion","psychic","royalty"]},{criteria:{hsl:{h:[291,327],s:[.1,1],l:[.07,.99]}},descriptive:["magenta"],nouns:["magenta"],description:["Magenta is a deep, rich color that is often associated with creativity, passion, and intensity. It is a vibrant shade of pink that is similar to fuchsia, but it is slightly darker and more muted. Some people may associate the color magenta with feelings of excitement and energy, while others may associate it with feelings of love and romance. In terms of wavelength, magenta is a mixture of red and blue light, and it is often used in art and design to add a bold and striking touch. Overall, magenta is a vibrant and lively color that can be used to add drama and excitement to any setting."],meanings:["support","kind","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products",,"erotica"]},{criteria:{hsl:{h:[327,344],s:[.1,1],l:[.07,.99]}},descriptive:["pink"],nouns:["pink"],description:["Pink is a light, delicate color that is often associated with femininity, romance, and sweetness. It is a pale shade of red, and it is often described as a softer, more gentle version of the color. Some people may associate the color pink with feelings of happiness and playfulness, while others may associate it with feelings of warmth and comfort. In terms of wavelength, pink is a mixture of red and white light, and it is often used in decorations and clothing to add a touch of whimsy and fun. Overall, pink is a cheerful and playful color that can be used to create a warm and inviting atmosphere."],meanings:["support","kindness","change","harmony","kink","charm","politeness","sensitivity","tenderness","sweetness","femininity","romance","seductiveness","sexiness"],usage:["children products","erotica"]},{criteria:{hsl:{h:[344,360],s:[.1,1],l:[.07,.99]}},descriptive:["red","reddish"],nouns:["red"],description:["Red is a warm, vibrant color that is often associated with passion and excitement. It is the color of fire, and it is often used to grab attention and convey a sense of urgency or danger. In terms of wavelength, red is the color that is associated with the longest wavelengths of visible light, and it is one of the primary colors of light, along with blue and green. Some people may associate the color red with feelings of love and warmth, while others may associate it with anger or danger. Overall, red is a bold and striking color that can be used to convey a wide range of emotions and messages."],meanings:["excitement","energy","passion","courage","attention","lust","power","love","speed","anger","lust","excitement","danger","ferocity","violence","fury","anger","vigor","urgency"],usage:["stimulate","create urgency","draw attention","caution","encourage"]}],temperatures:[{value:1800,descriptive:["ultra warm"]},{value:2400,descriptive:["very warm"]},{value:2700,descriptive:["warm"]},{value:3e3,descriptive:["warm white"]},{value:4e3,descriptive:["cool or cold"]},{value:6500,descriptive:["cool"]}],percentWords:[{maxPercentile:.06,word:"a dash of"},{maxPercentile:.16,word:"a little bit of"},{maxPercentile:.31,word:"some"},{maxPercentile:.56,word:"a good bit of"},{maxPercentile:.71,word:"a lot of"},{maxPercentile:.86,word:"a whole lot of"},{maxPercentile:.99,word:"neatly entirely"},{maxPercentile:1,word:"entirely"}]};var Bo={rgb:Z("rgb"),hsl:Z("hsl")},Ni={rgb:["r","g","b"],cmyk:["c","m","y","k"],hsl:["h","s","l"]},E,Fo,ve,xr=class{constructor(t,r=Zo){Xr(this,E);Tt(this,"formats",{});Tt(this,"currentColor",null);this.color=t,this.descriptions=r.descriptions,this.temperatures=r.temperatures,this.percentWords=r.percentWords}set color(t){this.currentColor=oe(this,E,Fo).call(this,t);let r=Bo.rgb(this.currentColor);this.formats.rgb=r,this.formats.hsl=Bo.hsl(this.currentColor),this.formats.cmyk=Sr(r)}get color(){return this.currentColor}get temperatureWords(){let t=Hr(this.formats.rgb);return this.temperatures.reduce((r,n)=>Math.abs(n.value-t)r[a]),o=n.reduce((a,i)=>a+i,0);return n.map(a=>o?a/o:0)}percentageWords(t="rgb"){return this.percentages(t).map(r=>this.percentWords.find(n=>n.maxPercentile>=r).word)}get descriptiveWords(){return oe(this,E,ve).call(this,"descriptive")}get nouns(){return oe(this,E,ve).call(this,"nouns")}get meanings(){return oe(this,E,ve).call(this,"meanings")}get usage(){return oe(this,E,ve).call(this,"usage")}get description(){return oe(this,E,ve).call(this,"description")}get bestContrast(){return ht(this.color,"black")>ht(this.color,"white")?"black":"white"}getDescriptiveList(t,r){let n=[...this.descriptiveWords];if(t&&(n=zt(n)),r&&(n=n.slice(0,r)),n.length>1){let o=n.pop();return`${n.join(", ")} and ${o}`}else return n[0]}};E=new WeakSet,Fo=function(t){try{return Xe(t)}catch(r){throw new TypeError("Invalid color. Check the chroma-js documentation.")}},ve=function(t="descriptive",r=!1,n){let o=this.descriptions.reduce((a,i)=>i.hasOwnProperty(t)&&Object.keys(i.criteria).every(p=>{let c=this.formats[p];return Object.entries(i.criteria[p]).every(([h,b])=>{if(!(h in c)||c[h]===void 0||c[h]===null||b===null)return!0;let x=c[h];return h==="h"&&(x=Math.round(x)),Array.isArray(b)?_r(x,b[0],b[1]):isNaN(b)?!1:x===b})})?[...new Set([...a,...i[t]])]:a,[]);return r?zt(o).slice(0,n):o.slice(0,n)};var qi=xr;return ln($i);})(); diff --git a/index.js b/index.js index 609efec..50131dc 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -var k=Object.defineProperty;var m=s=>{throw TypeError(s)};var E=(s,r,e)=>r in s?k(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var g=(s,r,e)=>E(s,typeof r!="symbol"?r+"":r,e),M=(s,r,e)=>r.has(s)||m("Cannot "+e);var b=(s,r,e)=>r.has(s)?m("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e);var c=(s,r,e)=>(M(s,r,"access private method"),e);var o,W,h;import{rgb2temperature as j,isInRange as A,randomizeArr as v,rgbToCMYK as x}from"./utils";import{wcagContrast as C,parse as I,converter as y}from"culori";import N from"./en";const w={rgb:y("rgb"),hsl:y("hsl")},O={rgb:["r","g","b"],cmyk:["c","m","y","k"],hsl:["h","s","l"]};class T{constructor(r,e=N){b(this,o);g(this,"formats",{});g(this,"currentColor",null);this.color=r,this.descriptions=e.descriptions,this.temperatures=e.temperatures,this.percentWords=e.percentWords}set color(r){this.currentColor=c(this,o,W).call(this,r);const e=w.rgb(this.currentColor);this.formats.rgb=e,this.formats.hsl=w.hsl(this.currentColor),this.formats.cmyk=x(e)}get color(){return this.currentColor}get temperatureWords(){const r=j(this.formats.rgb);return this.temperatures.reduce((e,t)=>Math.abs(t.value-r)e[n]),i=t.reduce((n,a)=>n+a,0);return t.map(n=>i?n/i:0)}percentageWords(r="rgb"){return this.percentages(r).map(e=>this.percentWords.find(t=>t.maxPercentile>=e).word)}get descriptiveWords(){return c(this,o,h).call(this,"descriptive")}get nouns(){return c(this,o,h).call(this,"nouns")}get meanings(){return c(this,o,h).call(this,"meanings")}get usage(){return c(this,o,h).call(this,"usage")}get description(){return c(this,o,h).call(this,"description")}get bestContrast(){return C(this.color,"black")>C(this.color,"white")?"black":"white"}getDescriptiveList(r,e){let t=[...this.descriptiveWords];if(r&&(t=v(t)),e&&(t=t.slice(0,e)),t.length>1){const i=t.pop();return`${t.join(", ")} and ${i}`}else return t[0]}}o=new WeakSet,W=function(r){try{return I(r)}catch{throw new TypeError("Invalid color. Check the chroma-js documentation.")}},h=function(r="descriptive",e=!1,t){const i=this.descriptions.reduce((n,a)=>a.hasOwnProperty(r)&&Object.keys(a.criteria).every(d=>{const u=this.formats[d];return Object.entries(a.criteria[d]).every(([p,l])=>{if(!(p in u)||u[p]===void 0||u[p]===null||l===null)return!0;const f=u[p];return Array.isArray(l)?A(f,l[0],l[1]):isNaN(l)?!1:f===l})})?[...new Set([...n,...a[r]])]:n,[]);return e?v(i).slice(0,t):i.slice(0,t)};export default T; +var M=Object.defineProperty;var m=s=>{throw TypeError(s)};var k=(s,r,e)=>r in s?M(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var d=(s,r,e)=>k(s,typeof r!="symbol"?r+"":r,e),E=(s,r,e)=>r.has(s)||m("Cannot "+e);var b=(s,r,e)=>r.has(s)?m("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e);var a=(s,r,e)=>(E(s,r,"access private method"),e);var o,W,h;import{rgb2temperature as j,isInRange as A,randomizeArr as v,rgbToCMYK as x}from"./utils";import{wcagContrast as C,parse as I,converter as y}from"culori";import N from"./en";const w={rgb:y("rgb"),hsl:y("hsl")},O={rgb:["r","g","b"],cmyk:["c","m","y","k"],hsl:["h","s","l"]};class T{constructor(r,e=N){b(this,o);d(this,"formats",{});d(this,"currentColor",null);this.color=r,this.descriptions=e.descriptions,this.temperatures=e.temperatures,this.percentWords=e.percentWords}set color(r){this.currentColor=a(this,o,W).call(this,r);const e=w.rgb(this.currentColor);this.formats.rgb=e,this.formats.hsl=w.hsl(this.currentColor),this.formats.cmyk=x(e)}get color(){return this.currentColor}get temperatureWords(){const r=j(this.formats.rgb);return this.temperatures.reduce((e,t)=>Math.abs(t.value-r)e[n]),i=t.reduce((n,c)=>n+c,0);return t.map(n=>i?n/i:0)}percentageWords(r="rgb"){return this.percentages(r).map(e=>this.percentWords.find(t=>t.maxPercentile>=e).word)}get descriptiveWords(){return a(this,o,h).call(this,"descriptive")}get nouns(){return a(this,o,h).call(this,"nouns")}get meanings(){return a(this,o,h).call(this,"meanings")}get usage(){return a(this,o,h).call(this,"usage")}get description(){return a(this,o,h).call(this,"description")}get bestContrast(){return C(this.color,"black")>C(this.color,"white")?"black":"white"}getDescriptiveList(r,e){let t=[...this.descriptiveWords];if(r&&(t=v(t)),e&&(t=t.slice(0,e)),t.length>1){const i=t.pop();return`${t.join(", ")} and ${i}`}else return t[0]}}o=new WeakSet,W=function(r){try{return I(r)}catch{throw new TypeError("Invalid color. Check the chroma-js documentation.")}},h=function(r="descriptive",e=!1,t){const i=this.descriptions.reduce((n,c)=>c.hasOwnProperty(r)&&Object.keys(c.criteria).every(f=>{const p=this.formats[f];return Object.entries(c.criteria[f]).every(([u,l])=>{if(!(u in p)||p[u]===void 0||p[u]===null||l===null)return!0;let g=p[u];return u==="h"&&(g=Math.round(g)),Array.isArray(l)?A(g,l[0],l[1]):isNaN(l)?!1:g===l})})?[...new Set([...n,...c[r]])]:n,[]);return e?v(i).slice(0,t):i.slice(0,t)};export default T;