import n from "debug";
const c = n, u = (o) => new Proxy(window.console, {
  get(r, e) {
    return (...i) => {
      try {
        return ["log", "debug", "info", "warn", "error"].includes(e) ? r[e](o, ...i) : r[e] instanceof Function ? r[e](...i) : r[e];
      } catch (l) {
        console.error(`Logger error in ${o}:`, l);
        return;
      }
    };
  }
});
window.blocklet?.ENABLE_DEBUG_TMP === "false" ? n.disable() : window.blocklet?.ENABLE_DEBUG_TMP && n.enable(window.blocklet?.ENABLE_DEBUG_TMP);
export {
  c as createDebug,
  u as createLogger
};
