addRelation(t, s, n) {
    if (typeof t == "object")
      this.addRelationObjs(t, s, n);
    else {
      const o = this.startIdIfNeeded(t.trim()), c = this.startTypeIfNeeded(t), r = this.endIdIfNeeded(s.trim()), d = this.endTypeIfNeeded(s);
      this.addState(o, c), this.addState(r, d), this.currentDocument.relations.push({
        id1: o,
        id2: r,
        title: j.sanitizeText(n, A())
      });
    }
  }
Add a relation between two items.  The items may be full objects or just the string id of a state.

@param {string | object} item1
@param {string | object} item2
@param {string} title