/* Socket Lib - Built with esbuild */
var T=Object.create;var f=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var q=(e,r)=>{for(var i in r)f(e,i,{get:r[i],enumerable:!0})},m=(e,r,i,_)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of l(r))!I.call(e,c)&&c!==i&&f(e,c,{get:()=>r[c],enumerable:!(_=k(r,c))||_.enumerable});return e};var C=(e,r,i)=>(i=e!=null?T(R(e)):{},m(r||!e||!e.__esModule?f(i,"default",{value:e,enumerable:!0}):i,e)),O=e=>m(f({},"__esModule",{value:!0}),e);var M={};q(M,{getOsHomeDir:()=>d,getOsTmpDir:()=>H,getSocketAppCacheDir:()=>P,getSocketAppCacheTtlDir:()=>h,getSocketAppDir:()=>p,getSocketCacacheDir:()=>j,getSocketCliDir:()=>U,getSocketDlxDir:()=>v,getSocketHomePath:()=>K,getSocketRegistryDir:()=>$,getSocketRegistryGithubCacheDir:()=>G,getSocketUserDir:()=>s,getUserHomeDir:()=>A,invalidateCache:()=>x});module.exports=O(M);var D=C(require("node:os")),n=C(require("node:path")),S=require("#env/home"),o=require("#env/socket"),E=require("#env/windows"),t=require("./path"),g=require("./paths/rewire");function d(){return(0,g.getPathValue)("homedir",()=>D.homedir())}function H(){return(0,g.getPathValue)("tmpdir",()=>D.tmpdir())}function K(){return s()}let a;function s(){return a===void 0&&(a=(0,t.normalizePath)(n.join(A(),require("#constants/paths").DOT_SOCKET_DIR))),a}function p(e){return(0,t.normalizePath)(n.join(s(),`${require("#constants/socket").SOCKET_APP_PREFIX}${e}`))}let u;function j(){return u===void 0&&((0,o.getSocketCacacheDir)()?u=(0,t.normalizePath)((0,o.getSocketCacacheDir)()):u=(0,t.normalizePath)(n.join(s(),`${require("#constants/socket").SOCKET_APP_PREFIX}cacache`))),u}function v(){return(0,o.getSocketDlxDirEnv)()?(0,t.normalizePath)((0,o.getSocketDlxDirEnv)()):(0,t.normalizePath)(n.join(s(),`${require("#constants/socket").SOCKET_APP_PREFIX}${require("#constants/socket").SOCKET_DLX_APP_NAME}`))}function P(e){return(0,t.normalizePath)(n.join(p(e),require("#constants/paths").CACHE_DIR))}function h(e){return(0,t.normalizePath)(n.join(P(e),require("#constants/paths").CACHE_TTL_DIR))}function U(){return p(require("#constants/socket").SOCKET_CLI_APP_NAME)}function $(){return p(require("#constants/socket").SOCKET_REGISTRY_APP_NAME)}function G(){return(0,t.normalizePath)(n.join(h(require("#constants/socket").SOCKET_REGISTRY_APP_NAME),require("#constants/github").CACHE_GITHUB_DIR))}function A(){const e=(0,S.getHome)();if(e)return e;const r=(0,E.getUserprofile)();return r||d()}function x(){a=void 0,u=void 0}(0,g.registerCacheInvalidation)(x);0&&(module.exports={getOsHomeDir,getOsTmpDir,getSocketAppCacheDir,getSocketAppCacheTtlDir,getSocketAppDir,getSocketCacacheDir,getSocketCliDir,getSocketDlxDir,getSocketHomePath,getSocketRegistryDir,getSocketRegistryGithubCacheDir,getSocketUserDir,getUserHomeDir,invalidateCache});
//# sourceMappingURL=paths.js.map
