import { Registry as l } from "../../../../../parchment@3.0.0/node_modules/parchment/dist/parchment.mjs";
const c = 100, a = ["block", "break", "cursor", "inline", "scroll", "text"], u = (s, i, o) => {
  const t = new l();
  return a.forEach((e) => {
    const r = i.query(e);
    r && t.register(r);
  }), s.forEach((e) => {
    let r = i.query(e);
    r || o.error(`Cannot register "${e}" specified in "formats" config. Are you sure it was registered?`);
    let n = 0;
    for (; r; )
      if (t.register(r), r = "blotName" in r ? r.requiredContainer ?? null : null, n += 1, n > c) {
        o.error(`Cycle detected in registering blot requiredContainer: "${e}"`);
        break;
      }
  }), t;
};
export {
  u as default
};
