"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const cloneDeep$1 = require("../../node_modules/lodash-es/cloneDeep.js");
function cloneDeep(data) {
  return cloneDeep$1.default(data);
}
const loadComponentByPath = (path, router) => {
  var _a;
  const route = router == null ? void 0 : router.getRoutes().find((item) => item.path === path);
  if (!route) return null;
  const comp = ((_a = route.components) == null ? void 0 : _a.default) || route.component;
  if (!comp) return null;
  if (typeof comp === "function") {
    return comp().then((module2) => module2.default);
  }
  return comp;
};
exports.cloneDeep = cloneDeep;
exports.loadComponentByPath = loadComponentByPath;
