import "./styles/global.css";
import "abortcontroller-polyfill";

import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import filters from "@/filters";
import { createPinia } from "pinia";
import { vueErrorHandler } from "./utils/monitors";
import { setUUID } from "@/utils/utils";
setUUID();
import "@/utils/alife-logger";

const app = createApp(App);
app.use(router);
app.use(createPinia());
app.config.globalProperties.$filters = filters;
app.config.errorHandler = vueErrorHandler;

/** 解决tailwind样式覆盖问题 */
const meta = document.createElement("meta");
meta.name = "naive-ui-style";
document.head.appendChild(meta);

app.mount("#app");

if (document.getElementById("app-placeholder"))
  document.getElementById("app-placeholder")?.remove();
