var n = Object.defineProperty;
var i = (o, e, t) => e in o ? n(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
var c = (o, e, t) => (i(o, typeof e != "symbol" ? e + "" : e, t), t);
import m from "../blots/block.mjs";
import d from "../blots/break.mjs";
import p from "../blots/cursor.mjs";
import N from "../blots/inline.mjs";
import f, { escapeText as u } from "../blots/text.mjs";
import C from "../blots/container.mjs";
import b from "../core/quill.mjs";
class a extends C {
  static create(e) {
    const t = super.create(e);
    return t.setAttribute("spellcheck", "false"), t;
  }
  code(e, t) {
    return this.children.map((l) => l.length() <= 1 ? "" : l.domNode.innerText).join(`
`).slice(e, e + t);
  }
  html(e, t) {
    return `<pre>
${u(this.code(e, t))}
</pre>`;
  }
}
class r extends m {
  static register() {
    b.register(a);
  }
}
c(r, "TAB", "  ");
class s extends N {
}
s.blotName = "code";
s.tagName = "CODE";
r.blotName = "code-block";
r.className = "ql-code-block";
r.tagName = "DIV";
a.blotName = "code-block-container";
a.className = "ql-code-block-container";
a.tagName = "DIV";
a.allowedChildren = [r];
r.allowedChildren = [f, d, p];
r.requiredContainer = a;
export {
  s as Code,
  a as CodeBlockContainer,
  r as default
};
