const r=()=>{throw new Error(`[electron-color-picker] unsupported ${process.platform}-${process.arch}`)}
const{runColorPicker:e=r,DARWIN_IS_PLATFORM_PRE_CATALINA:o,darwinRunColorPicker:t=r,darwinGetScreenPermissionGranted:n=r,darwinRequestScreenPermissionPopup:s=r}=(()=>{try{return require(`./${process.platform}`)}catch(r){}return{}})()
exports.DARWIN_IS_PLATFORM_PRE_CATALINA=o
let i=!1
const c=async(r,...e)=>{if(i)throw new Error("color picker already running!")
i=!0
const o=await r(...e)
i=!1
return o}
const a=/#[A-F0-9]{6}/
exports.getColorHexRGB=async()=>{const{possibleColorString:r}=await c(e)
const[o]=a.exec(r.toUpperCase())||[""]
return o}
exports.darwinGetColorHexRGB=async()=>{const{possibleColorString:r}=await c(t)
const[e]=a.exec(r.toUpperCase())||[""]
return e}
exports.darwinGetScreenPermissionGranted=async()=>{const r=await c(n)
return r}
exports.darwinRequestScreenPermissionPopup=async()=>{await c(s)}
