"use client"
var f=new RegExp(/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),A=new RegExp(/^[a-zA-Z0-9\-]+$/);var E=s=>{if((void 0)(s))return new URL(s).hostname.replace(/^www\./,"");try{if(s.includes(".")&&!s.includes(" "))return new URL(`https://${s}`).hostname.replace(/^www\./,"")}catch{return null}};async function S(s,r){var i,c;let o=await fetch(s,{...r,...(r==null?void 0:r.headers)&&{headers:r.headers}});if(!o.ok){let p=((c=(i=await o.json())==null?void 0:i.error)==null?void 0:c.message)||"An error occurred while fetching the data.",m=new Error(p);throw m.info=p,m.status=o.status,m}return o.json()}function u(s){return!s||typeof s!="string"?s:s.split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}export{E as a,S as b,u as c,h as d,O as e,I as f,T as g,R as h,d as i,N as j,D as k,_ as l,t as m,a as n,g as o,e as p,b as q,P as r};
