import{F as n}from"./p-2b31742f.js";import{s as l}from"./p-889c70e7.js";async function o(o,i,t){let e=((null==l?void 0:l.services)||[]).filter((n=>!i||"function"!=typeof i||i(n)));return(null==o?void 0:o.length)&&(e=new n(e,{keys:["name","description"]}).search(o,{limit:t}).map((n=>null==n?void 0:n.item))),e}function i(n){return n?n.replace(/\s{2,}/g," ").trim().toLowerCase():n}function t({filterBy:n}={}){const o=n?((null==l?void 0:l.services)||[]).filter(n):(null==l?void 0:l.services)||[];return[...new Set(o.map((n=>i(null==n?void 0:n.tab))))].sort(((n,l)=>n>l?1:-1)).filter((n=>null==n?void 0:n.length)).map((n=>({label:n,value:n})))}export{i as c,t as g,o as s}