{"version":3,"sources":["../src/index.ts","../node_modules/tsup/assets/cjs_shims.js"],"sourcesContent":["// @dada78641/bwmapgfx <https://github.com/msikma/bwmapgfx>\n\nimport {fileURLToPath} from 'node:url'\nimport {dirname, resolve} from 'node:path'\n\n/**\n * Returns the path to the StarCraft: Brood War graphics.\n *\n * The path is calculated based on the file structure of the module.\n */\nexport function getBwGraphicsPath(): string {\n  return resolve(dirname(fileURLToPath(import.meta.url)), '..', 'resources')\n}\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n  typeof document === 'undefined'\n    ? new URL(`file:${__filename}`).href\n    : (document.currentScript && document.currentScript.src) ||\n      new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,OAClD,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEpC,IAAM,gBAAgC,iCAAiB;;;ADT9D,sBAA4B;AAC5B,uBAA+B;AAOxB,SAAS,oBAA4B;AAC1C,aAAO,8BAAQ,8BAAQ,+BAAc,aAAe,CAAC,GAAG,MAAM,WAAW;AAC3E;","names":[]}