{
  "version": 3,
  "sources": ["../src/main.ts"],
  "sourcesContent": ["import type {} from '@alwatr/type-helper';\n\n/**\n * Represents information about the current platform.\n */\ninterface PlatformInfo {\n  /**\n   * Whether the NODE_ENV environment variable is not `production` or in browser location.hostname is `localhost`.\n   */\n  readonly development: boolean;\n\n  /**\n   * Whether the current platform is node.js.\n   */\n  readonly isNode: boolean;\n\n  /**\n   * Whether the current platform is a browser.\n   */\n  readonly isBrowser: boolean;\n\n  /**\n   * Whether the current platform is a not a browser.\n   */\n  readonly isCli: boolean;\n\n  /**\n   * Whether the current platform is a web worker.\n   */\n  readonly isWebWorker: boolean;\n\n  /**\n   * Whether the current platform is deno.\n   */\n  readonly isDeno: boolean;\n\n  /**\n   * Whether the current platform is bun.\n   */\n  readonly isBun: boolean;\n\n  /**\n   * Whether the current platform is nw.js.\n   */\n  readonly isNw: boolean;\n\n  /**\n   * Whether the current platform is electron.\n   */\n  readonly isElectron: boolean;\n}\n\nexport const platformInfo: PlatformInfo = (() => {\n  /**\n   * Represents information about the current platform.\n   */\n  const platformInfo_: Mutable<PlatformInfo> = {\n    development: false,\n    isNode: false,\n    isBrowser: false,\n    isWebWorker: false,\n    isDeno: false,\n    isBun: false,\n    isCli: false,\n    isNw: false,\n    isElectron: false,\n  };\n\n  if (typeof window === 'object' && typeof document === 'object' && document.nodeType === Node.DOCUMENT_NODE) {\n    platformInfo_.isBrowser = true;\n    // @ts-expect-error - Cannot find name 'WorkerGlobalScope'\n    platformInfo_.isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n  }\n  else if (typeof process === 'object') {\n    platformInfo_.isCli = true;\n\n    if (process.versions?.node != null) {\n      platformInfo_.isNode = true;\n    }\n\n    // @ts-expect-error - Cannot find name 'Bun'\n    if (typeof Bun !== 'undefined') {\n      platformInfo_.isBun = true;\n    }\n    else if (process.versions?.electron != null) {\n      platformInfo_.isElectron = true;\n    }\n    // @ts-expect-error - Cannot find name 'nw'\n    else if (typeof nw !== 'undefined') {\n      platformInfo_.isNw = true;\n    }\n  }\n\n  // other platforms\n  // @ts-expect-error - Cannot find name 'Deno'\n  if (typeof Deno !== 'undefined') {\n    platformInfo_.isCli = true;\n    platformInfo_.isDeno = true;\n  }\n\n  // development\n  if (platformInfo_.isBrowser === true) {\n    platformInfo_.development = location.hostname === 'localhost' || location.hostname.indexOf('127.') === 0;\n  }\n  else if (platformInfo_.isCli === true) {\n    platformInfo_.development = process.env.NODE_ENV !== 'production';\n  }\n\n  return platformInfo_;\n})();\n"],
  "mappings": ";;qqBAAA,qHAoDO,IAAM,cAA8B,IAAM,CAI/C,MAAM,cAAuC,CAC3C,YAAa,MACb,OAAQ,MACR,UAAW,MACX,YAAa,MACb,OAAQ,MACR,MAAO,MACP,MAAO,MACP,KAAM,MACN,WAAY,KACd,EAEA,GAAI,OAAO,SAAW,UAAY,OAAO,WAAa,UAAY,SAAS,WAAa,KAAK,cAAe,CAC1G,cAAc,UAAY,KAE1B,cAAc,YAAc,OAAO,oBAAsB,aAAe,gBAAgB,iBAC1F,SACS,OAAO,UAAY,SAAU,CACpC,cAAc,MAAQ,KAEtB,GAAI,QAAQ,UAAU,MAAQ,KAAM,CAClC,cAAc,OAAS,IACzB,CAGA,GAAI,OAAO,MAAQ,YAAa,CAC9B,cAAc,MAAQ,IACxB,SACS,QAAQ,UAAU,UAAY,KAAM,CAC3C,cAAc,WAAa,IAC7B,SAES,OAAO,KAAO,YAAa,CAClC,cAAc,KAAO,IACvB,CACF,CAIA,GAAI,OAAO,OAAS,YAAa,CAC/B,cAAc,MAAQ,KACtB,cAAc,OAAS,IACzB,CAGA,GAAI,cAAc,YAAc,KAAM,CACpC,cAAc,YAAc,SAAS,WAAa,aAAe,SAAS,SAAS,QAAQ,MAAM,IAAM,CACzG,SACS,cAAc,QAAU,KAAM,CACrC,cAAc,YAAc,QAAQ,IAAI,WAAa,YACvD,CAEA,OAAO,aACT,GAAG",
  "names": []
}
