import { isArray as i, isString as u, isRegExp as f } from "lodash-unified";
import { Comment as s } from "vue";
const l = (r) => {
  const e = r?.subTree?.children;
  if (typeof e == "string") return;
  const n = Array.isArray(e) ? e : null;
  if (n)
    return n.filter((t) => !["string", "number", "boolean"].includes(typeof t)).filter((t) => t && typeof t == "object" && "type" in t ? t.type != s : !1);
}, a = (r) => {
  if (r) {
    if (r.length > 1)
      throw Error("ApKeepAlive 组件只能有一个字节点");
    if (r[0])
      return r[0];
  }
}, m = (r) => {
  if (r && !(typeof r == "string" || typeof r == "number" || typeof r == "boolean" || Array.isArray(r)))
    return r;
}, b = (r) => {
  if (r && !(typeof r == "string" || typeof r == "number" || typeof r == "boolean" || Array.isArray(r) || !r.type))
    return r;
}, g = (r, e) => {
  const n = typeof r.type == "object" && "name" in r.type && r.type.name || "";
  let t = n;
  return r.key && r.key !== e && (t = r.key), { VnodeName: n, vnodeSubPath: t };
}, A = (r) => typeof r == "object" && "name" in r && r.name || "";
function y(r, e) {
  return i(r) ? r.some((n) => y(n, e)) : u(r) ? r.split(",").includes(e) : f(r) ? (r.lastIndex = 0, r.test(e)) : !1;
}
function c(r) {
  return [void 0, null].includes(r);
}
export {
  g as getAliveKey,
  A as getComponentName,
  a as getFirstVNodeChirldren,
  l as getVNodeChirldren,
  b as getVNodeObjByVNodeArrayChildren,
  m as getVNodeObjByVNodeChild,
  c as isNoValue,
  y as matches
};
