1var e=[50,100,200,300,400,500,600,700,800,900,950];function t(e){let t=e.replace(`#`,``);return[parseInt(t.substring(0,2),16)/255,parseInt(t.substring(2,4),16)/255,parseInt(t.substring(4,6),16)/255]}function n(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function r(e){return e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}function i(e,t,r){let i=n(e),a=n(t),o=n(r),s=Math.cbrt(.4122214708*i+.5363325363*a+.0514459929*o),c=Math.cbrt(.2119034982*i+.6806995451*a+.1073969566*o),l=Math.cbrt(.0883024619*i+.2817188376*a+.6299787005*o),u=.2104542553*s+.793617785*c-.0040720468*l,d=1.9779984951*s-2.428592205*c+.4505937099*l,f=.0259040371*s+.7827717662*c-.808675766*l,p=Math.sqrt(d*d+f*f),m=Math.atan2(f,d)*180/Math.PI;return m<0&&(m+=360),{L:u,C:p,H:m}}function a(e,t,n){let i=n*Math.PI/180,a=t*Math.cos(i),o=t*Math.sin(i),s=e+.3963377774*a+.2158037573*o,c=e-.1055613458*a-.0638541728*o,l=e-.0894841775*a-1.291485548*o,u=s*s*s,d=c*c*c,f=l*l*l,p=4.0767416621*u-3.3077115913*d+.2309699292*f,m=-1.2684380046*u+2.6097574011*d-.3413193965*f,h=-.0041960863*u-.7034186147*d+1.707614701*f,g=e=>Math.max(0,Math.min(1,e)),_=Math.round(g(r(p))*255),v=Math.round(g(r(m))*255),y=Math.round(g(r(h))*255);return`#${_.toString(16).padStart(2,`0`)}${v.toString(16).padStart(2,`0`)}${y.toString(16).padStart(2,`0`)}`}var o={50:.97,100:.93,200:.87,300:.77,400:.66,500:.55,600:.47,700:.39,800:.32,900:.26,950:.2};function s(n){let[r,s,c]=t(n),{C:l,H:u}=i(r,s,c),d={};for(let t of e){let e=o[t],n=l;e>.85?n=l*.3:e>.7?n=l*.6:e<.25&&(n=l*.7),d[t]=a(e,n,u)}return d}function c(t){let n=document.documentElement;if(!t){for(let t of e)n.style.removeProperty(`--ui-color-primary-${t}`);return}let r=s(t);for(let t of e)n.style.setProperty(`--ui-color-primary-${t}`,r[t]??``)}var l=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function u(e){let t=`ef-tenant-page-bg`,n=document.getElementById(t);if(!e||!l.test(e)){n?.remove();return}let r=n??document.createElement(`style`);n||(r.id=t,document.head.appendChild(r)),r.textContent=`:root{--ef-page-bg:${e}}`}function d(e){if(typeof e!=`string`||!l.test(e))return e;let[n,r,o]=t(e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e),{L:s,C:c,H:u}=i(n,r,o),d=Math.min(s,.32-.16*s);return a(d,d<.25?c*.7:c,u)}function f(e,n=.93){if(typeof e!=`string`||!l.test(e))return e;let[r,o,s]=t(e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e),{L:c,C:u,H:d}=i(r,o,s),f=Math.max(c,n);return a(f,f>.85?u*.3:f>.7?u*.6:u,d)}function p(e,t=400){if(typeof e!=`string`||!l.test(e))return e;let n=e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e;return s(n)[t]??n}function m(e){if(typeof e!=`string`||!l.test(e))return NaN;let[r,i,a]=t(e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e);return .2126*n(r)+.7152*n(i)+.0722*n(a)}function h(e,t){let n=m(e),r=m(t);if(Number.isNaN(n)||Number.isNaN(r))return NaN;let i=Math.max(n,r),a=Math.min(n,r);
1return(i+.05)/(a+.05)}function g(e){let t=document.documentElement,n=(e,n)=>{n?t.style.setProperty(e,n):t.style.removeProperty(e)};n(`--ef-primary`,e.theme_primary),n(`--ef-primary-hover`,e.theme_primary_hover),n(`--ef-accent`,e.theme_accent),u(e.theme_page_bg),c(e.theme_primary)}var _=()=>({applyPrimaryColor:c,applyTheme:g,generatePalette:s,deriveDarkColor:d,deriveDarkText:f,deriveDarkBrand:p,contrastRatio:h,relativeLuminance:m});export{_ as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.