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