'use strict';var chunkEXPXWBLP_cjs=require('./chunk-EXPXWBLP.cjs');var c=Array.from({length:256},(t,r)=>r.toString(16).padStart(2,"0")),n=t=>(t&15)+9*(t>>6),u=(t,r)=>n(t.charCodeAt(r))<<4|n(t.charCodeAt(r+1)),g=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,f=t=>{if(typeof t!="string")return null;let r=t.trim();if(!g.test(r))return null;let o=r.length;if(o===4||o===5){let e=n(r.charCodeAt(1)),a=n(r.charCodeAt(2)),l=n(r.charCodeAt(3)),b=o===5?n(r.charCodeAt(4)):15;return {r:e|e<<4,g:a|a<<4,b:l|l<<4,alpha:chunkEXPXWBLP_cjs.b((b|b<<4)/255,3)}}return {r:u(r,1),g:u(r,3),b:u(r,5),alpha:o===9?chunkEXPXWBLP_cjs.b(u(r,7)/255,3):1}},m=({r:t,g:r,b:o,alpha:e})=>{let a="#"+c[chunkEXPXWBLP_cjs.a(Math.round(t),0,255)]+c[chunkEXPXWBLP_cjs.a(Math.round(r),0,255)]+c[chunkEXPXWBLP_cjs.a(Math.round(o),0,255)];return e<1?a+c[chunkEXPXWBLP_cjs.a(Math.round(e*255),0,255)]:a};exports.a=f;exports.b=m;//# sourceMappingURL=chunk-5Q4QJ3KC.cjs.map
//# sourceMappingURL=chunk-5Q4QJ3KC.cjs.map