import m from "./ruler.js";
import n from "./rules_core/state_core.js";
import p from "./rules_core/normalize.js";
import s from "./rules_core/block.js";
import f from "./rules_core/inline.js";
import u from "./rules_core/linkify.js";
import a from "./rules_core/replacements.js";
import c from "./rules_core/smartquotes.js";
import h from "./rules_core/text_join.js";
const t = [
  ["normalize", p],
  ["block", s],
  ["inline", f],
  ["linkify", u],
  ["replacements", a],
  ["smartquotes", c],
  // `text_join` finds `text_special` tokens (for escape sequences)
  // and joins them with the rest of the text
  ["text_join", h]
];
function i() {
  this.ruler = new m();
  for (let r = 0; r < t.length; r++)
    this.ruler.push(t[r][0], t[r][1]);
}
i.prototype.process = function(r) {
  const e = this.ruler.getRules("");
  for (let o = 0, l = e.length; o < l; o++)
    e[o](r);
};
i.prototype.State = n;
export {
  i as default
};
