import e from"node:path";var t=/([/#?\\]|%(2f|23|3f|5c))/gi;function n(e){return e.replace(t,e=>encodeURIComponent(e))}function r(e){try{return n(decodeURIComponent(e))}catch{return e}}function i(e){return n(decodeURIComponent(e))}function a(e){return e.split(`/`).map(e=>r(e)).join(`/`)}function o(e){return a(e).split(`/`).filter(Boolean)}function s(e){return e.split(`/`).map(e=>i(e)).join(`/`)}function c(e){try{return decodeURIComponent(e)}catch{return e}}function l(e){let t=Object.create(null);for(let[n,r]of e)t[n]=r;return t}function u(e){for(let t of Object.keys(e)){let n=e[t];Array.isArray(n)?e[t]=n.map(c):e[t]=c(n)}}function d(e){return e.split(`/`).filter(Boolean)}function f(e){return e.startsWith(`[...`)&&e.endsWith(`]`)&&e.length>5}function p(e){return e.startsWith(`[[...`)&&e.endsWith(`]]`)&&e.length>7}var m=/\\/g,h=process.platform===`win32`,g=e=>e.startsWith(`\\\\?\\`)?e:e.replace(m,`/`),_=e.win32;function v(e){return(...t)=>g(e(...t))}var y={resolve:v(_.resolve),normalize:v(_.normalize),join:v(_.join),relative:v(_.relative),dirname:v(_.dirname),format:v(_.format),parse:e=>{let t=_.parse(e);return t.root=g(t.root),t.dir=g(t.dir),t},basename:_.basename,extname:_.extname,isAbsolute:_.isAbsolute,matchesGlob:_.matchesGlob,toNamespacedPath:_.toNamespacedPath,delimiter:_.delimiter,sep:`/`},b={...e.posix};b.posix=y.posix=b,b.win32=y.win32=y;var{basename:x,delimiter:S,dirname:C,extname:w,format:T,isAbsolute:E,join:D,matchesGlob:O,normalize:k,parse:A,relative:j,resolve:M,sep:N,toNamespacedPath:P}=h?y:b;export{a,o as c,p as i,u as n,s as o,f as r,d as s,l as t};