import{cq as i}from"./index-CNZMR1GT.js";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",p=()=>Array.from({length:5},()=>r[Math.floor(Math.random()*r.length)]).join(""),w=(e,t)=>({base_url:location.origin+i,...e,...t}),u=/^\+(?=\d+[wdHms])(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)H)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/,n=e=>{if(e===void 0)return 0;const t=Number.parseInt(e);return Number.isNaN(t)?0:t},g=e=>{const t=u.exec(e);if(t){const o=n(t[1]),s=n(t[2])+o*7,a=n(t[3])+s*24,c=n(t[4])+a*60,m=n(t[5])+c*60,d=n(t[6])+m*1e3;return new Date(Date.now()+d)}else return new Date(e)};export{g,w as m,p as r};
