extract(t) {
    let s;
    t.doc ? s = t.doc : s = t, v.info(s), this.clear(!0), v.info("Extract initial document:", s), s.forEach((r) => {
      switch (v.warn("Statement", r.stmt), r.stmt) {
        case dt:
          this.addState(
            r.id.trim(),
            r.type,
            r.doc,
            r.description,
            r.note,
            r.classes,
            r.styles,
            r.textStyles
          );
          break;
        case vt:
          this.addRelation(r.state1, r.state2, r.description);
          break;
        case _e:
          this.addStyleClass(r.id.trim(), r.classes);
          break;
        case Ee:
          {
            const d = r.id.trim().split(","), f = r.styleClass.split(",");
            d.forEach((g) => {
              let E = this.getState(g);
              if (E === void 0) {
                const m = g.trim();
                this.addState(m), E = this.getState(m);
              }
              E.styles = f.map((m) => {
                var I;
                return (I = m.replace(/;/g, "")) == null ? void 0 : I.trim();
              });
            });
          }
          break;
        case me:
          this.setCssClass(r.id.trim(), r.styleClass);
          break;
      }
    });
    const n = this.getStates(), c = A().look;
    Ve(), Q(
      void 0,
      this.getRootDocV2(),
      n,
      this.nodes,
      this.edges,
      !0,
      c,
      this.classes
    ), this.nodes.forEach((r) => {
      if (Array.isArray(r.label)) {
        if (r.description = r.label.slice(1), r.isGroup && r.description.length > 0)
          throw new Error(
            "Group nodes can only have label. Remove the additional description for node [" + r.id + "]"
          );
        r.label = r.label[0];
      }
    });
  }
Convert all of the statements (stmts) that were parsed into states and relationships.
This is done because a state diagram may have nested sections,
where each section is a 'document' and has its own set of statements.
Ex: the section within a fork has its own statements, and incoming and outgoing statements
refer to the fork as a whole (document).
See the parser grammar:  the definition of a document is a document then a 'line', where a line can be a statement.
This will push the statement into the list of statements for the current document.
@private
@param _doc