import{u as e}from"./home-CJ8x5tlQ.js";var t=e=>{let t=e.trim();return t&&(t.startsWith(`/`)?t:`/${t}`).replace(/\/{2,}/g,`/`).replace(/\/$/,``)||`/`},n=(e,n)=>{if(!e||!n)return`/`;let r=t(e),i=t(n);return i===`/`?r:r===i?`/`:r.startsWith(`${i}/`)?r.slice(i.length):`/`},r=async(t,r)=>{let i=[...new Set(t.map(e=>e.storageKey).filter(e=>!!e))],a=await Promise.all(i.map(async t=>{try{let n=await e(t);return[t,typeof n.data==`string`?n.data:``]}catch{return[t,``]}})),o=new Map(a);return t.map(e=>{let t=e.storageKey,i=e[r];return{...e,[r]:n(typeof i==`string`?i:``,t&&o.get(t)||``)}})};export{r as t};