See `8.11.2.2 Optional Content Membership Dictionaries` -> `VE` entry. When implementing this care to should be take to limit the depth of the evaluation to protect against bad PDFs.
}
          if (!this._groups.get(id).visible) {
            return false;
          }
        }
        return true;
      } else if (group.policy === "AnyOff") {
        for (const id of group.ids) {
          if (!this._groups.has(id)) {
            warn(`Optional content group not found: ${id}`);
            return true;
          }
          if (!this._groups.get(id).visible) {
            return true;
          }
        }
        return false;
      } else if (group.policy === "AllOff") {
        for (const id of group.ids) {
          if (!this._groups.has(id)) {
            warn(`Optional content group not found: ${id}`);
            return true;
          }
          if (this._groups.get(id).visible) {
            return false;
          }
        }
        return true;
      }
      warn(`Unknown optional content policy ${group.policy}.`);