import{l as T}from"./chunk-W3T7TSU6.js";import{uc as _}from"./chunk-CBXQYRPM.js";var a=class h{static{this.PRIMARY_COLOR="#abd7fa"}static{this.ACCENT_COLOR="#fec79e"}static{this.HEX_COLOR_LENGTH=6}static{this.HEX_RADIX=16}static{this.HEX_RED_START=0}static{this.HEX_RED_END=2}static{this.HEX_GREEN_START=2}static{this.HEX_GREEN_END=4}static{this.HEX_BLUE_START=4}static{this.HEX_BLUE_END=6}static{this.RED_LIGHT="FFCDD2"}static{this.RED_DARK="991717"}static{this.RED="E53935"}static{this.PINK_LIGHT="F8BBD0"}static{this.PINK_DARK="880E4F"}static{this.PINK="E91E63"}static{this.PURPLE_LIGHT="E1BEE7"}static{this.PURPLE_DARK="4A148C"}static{this.PURPLE="9C27B0"}static{this.INDIGO_LIGHT="C5CAE9"}static{this.INDIGO_DARK="1A237E"}static{this.INDIGO="3F51B5"}static{this.BLUE_LIGHT="BBDEFB"}static{this.BLUE_DARK="0D47A1"}static{this.BLUE="2196F3"}static{this.TEAL_LIGHT="B2DFDB"}static{this.TEAL_DARK="004D40"}static{this.TEAL="009688"}static{this.GREEN_LIGHT="DCEDC8"}static{this.GREEN_DARK="33691E"}static{this.GREEN="8BC34A"}static{this.YELLOW_LIGHT="FFECB3"}static{this.YELLOW_DARK="B24E00"}static{this.YELLOW="FFB700"}static{this.ORANGE_LIGHT="FFCCBC"}static{this.ORANGE_DARK="902909"}static{this.ORANGE="FF5722"}static{this.BROWN_LIGHT="D7CCC8"}static{this.BROWN_DARK="3E2723"}static{this.BROWN="795548"}static{this.WHITE="FFFFFF"}static{this.GRAY="666666"}static{this.DARK_GRAY="212121"}static{this.WHITE_HEX=255}static{this.BLACK="000000"}static{this.COLOR_PALETTE_COMBINATIONS={[this.RED_LIGHT]:this.RED_DARK,[this.RED]:this.RED_LIGHT,[this.RED_DARK]:this.RED_LIGHT,[this.PINK_LIGHT]:this.PINK_DARK,[this.PINK]:this.PINK_LIGHT,[this.PINK_DARK]:this.PINK_LIGHT,[this.PURPLE_LIGHT]:this.PURPLE_DARK,[this.PURPLE]:this.PURPLE_LIGHT,[this.PURPLE_DARK]:this.PURPLE_LIGHT,[this.INDIGO_LIGHT]:this.INDIGO_DARK,[this.INDIGO]:this.INDIGO_LIGHT,[this.INDIGO_DARK]:this.INDIGO_LIGHT,[this.BLUE_LIGHT]:this.BLUE_DARK,[this.BLUE]:this.BLUE_LIGHT,[this.BLUE_DARK]:this.BLUE_LIGHT,[this.TEAL_LIGHT]:this.TEAL_DARK,[this.TEAL]:this.TEAL_LIGHT,[this.TEAL_DARK]:this.TEAL_LIGHT,[this.GREEN_LIGHT]:this.GREEN_DARK,[this.GREEN]:this.GREEN_DARK,[this.GREEN_DARK]:this.GREEN_LIGHT,[this.YELLOW_LIGHT]:this.YELLOW_DARK,[this.YELLOW]:this.YELLOW_DARK,[this.YELLOW_DARK]:this.YELLOW_LIGHT,[this.ORANGE_LIGHT]:this.ORANGE_DARK,[this.ORANGE]:this.ORANGE_LIGHT,[this.ORANGE_DARK]:this.ORANGE_LIGHT,[this.BROWN_LIGHT]:this.BROWN_DARK,[this.BROWN]:this.BROWN_LIGHT,[this.BROWN_DARK]:this.BROWN_LIGHT,[this.WHITE]:this.DARK_GRAY,[this.GRAY]:this.WHITE,[this.DARK_GRAY]:this.WHITE}}static hexToRGB(i){return i.length!==this.HEX_COLOR_LENGTH?null:[parseInt(i.slice(this.HEX_RED_START,this.HEX_RED_END),this.HEX_RADIX),parseInt(i.slice(this.HEX_GREEN_START,this.HEX_GREEN_END),this.HEX_RADIX),parseInt(i.slice(this.HEX_BLUE_START,this.HEX_BLUE_END),this.HEX_RADIX)]}static getNearestHexColor(i){let t=new T;if(t.backgroundColor=this.WHITE,t.foregroundColor=this.DARK_GRAY,_.isNullOrUndefined(i))return t;let s=this.hexToRGB(i);if(_.isNullOrUndefined(s))return t;let E="",c=Number.MAX_VALUE;for(let R of Object.keys(this.COLOR_PALETTE_COMBINATIONS)){let I=this.hexToRGB(R),A=Math.sqrt((s[0]-I[0])**2+(s[1]-I[1])**2+(s[2]-I[2])**2);if(A===0)return{backgroundColor:R,foregroundColor:this.COLOR_PALETTE_COMBINATIONS[R]};A<c&&(c=A,E=R)}let L=new T;return L.backgroundColor=E,L.foregroundColor=this.COLOR_PALETTE_COMBINATIONS[E],L}static getHighestContrastTextColor(i){if(_.isNullOrUndefinedOrEmpty(i))return h.BLACK;let t=h.hexToRGB(i),s=Math.sqrt((t[0]-this.WHITE_HEX)**2+(t[1]-this.WHITE_HEX)**2+(t[2]-this.WHITE_HEX)**2),E=Math.sqrt(t[0]**2+t[1]**2+t[2]**2);return s>E?h.WHITE:h.BLACK}};export{a};
