"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index = require("./index-skt9-lu6.cjs");
const fs = require("fs");
const path = require("path");
function _interopNamespaceDefault(e) {
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
index.u();
var m = class extends index.ur {
  constructor(t) {
    super(t), this.rootDir = path__namespace.resolve(t), fs__namespace.existsSync(path__namespace.join(this.rootDir)) || fs__namespace.mkdirSync(this.rootDir);
  }
  async init(t, e) {
    return this.pg = t, { emscriptenOpts: { ...e, preRun: [...e.preRun || [], (r) => {
      let c = r.FS.filesystems.NODEFS;
      r.FS.mkdir(index.C), r.FS.mount(c, { root: this.rootDir }, index.C);
    }] } };
  }
  async closeFs() {
    this.pg.Module.FS.quit();
  }
};
exports.NodeFS = m;
//# sourceMappingURL=nodefs-OBy4GK4F.cjs.map
