import{__module as r}from"../../_virtual/index46.mjs";import e from"../../_virtual/_node_fs.mjs";import t from"../../_virtual/_node_os.mjs";import n from"../../_virtual/_node_path.mjs";import{__require as o}from"../ini/ini.mjs";import{__require as i}from"../which/which.mjs";
/*!
 * global-prefix <https://github.com/jonschlinkert/global-prefix>
 *
 * Copyright (c) 2015-present Jon Schlinkert.
 * Licensed under the MIT license.
 */var s;function m(){return s||(s=1,function(r){const s=e,m=t,c=n,p=o();let a;const f=()=>{if(process.env.PREFIX)return process.env.PREFIX;if(a)return a;let r=m.homedir();if(r&&(a=u(c.resolve(r,".npmrc"))),a)return a;let e=function(){try{return s.realpathSync(i().sync("npm"))}catch(r){}}();if(e&&(a=u(c.resolve(e,"..","..","npmrc")),a&&(a=u(c.resolve(a,"etc","npmrc"))||a)),!a){let{APPDATA:r,DESTDIR:e,OSTYPE:t}=process.env;if("win32"===process.platform||"msys"===t||"cygwin"===t)return a=r?c.join(r,"npm"):c.dirname(process.execPath),a;a=c.dirname(c.dirname(process.execPath)),e&&(a=c.join(e,a))}return a};function u(r){try{return p.parse(s.readFileSync(r,"utf-8")).prefix}catch(r){}}Reflect.defineProperty(r,"exports",{get:()=>f()})}(r)),r.exports}r.exports;export{m as __require};