  A cactus representation of a graph, introduced by Dinitz et al. in 1976, is
an edge sparsifier of $O(n)$ size that exactly captures all global minimum cuts
of the graph. It is a central combinatorial object that has been a key
ingredient in almost all algorithms for the connectivity augmentation problems
and for maintaining minimum cuts under edge insertions (e.g. [NGM97], [CKL+22],
[Hen97]). This sparsifier was generalized to Steiner cactus for a vertex set
$T$, which can be seen as a vertex sparsifier of $O(|T|)$ size that captures
all partitions of $T$ corresponding to a $T$-Steiner minimum cut, and also
hypercactus, an analogous concept in hypergraphs. These generalizations further
extend the applications of cactus to the Steiner and hypergraph settings.
  In a long line of work on fast constructions of cactus and its
generalizations, a near-linear time construction of cactus was shown by [Karger
and Panigrahi 2009]. Unfortunately, their technique based on tree packing
inherently does not generalize. The state-of-the-art algorithms for Steiner
cactus and hypercactus are still slower than linear time by a factor of
$\Omega(|T|)$ [DV94] and $\Omega(n)$ [CX17], respectively.
  We show how to construct both Steiner cactus and hypercactus using
polylogarithmic calls to max flow, which gives the first almost-linear time
algorithms of both problems. The constructions immediately imply
almost-linear-time connectivity augmentation algorithms in the Steiner and
hypergraph settings, as well as speed up the incremental algorithm for
maintaining minimum cuts in hypergraphs by a factor of $n$.
  The key technique behind our result is a novel variant of the influential
isolating mincut technique [LP20, AKL+21] which we called maximal isolating
mincuts. This technique makes the isolating mincuts to be "more balanced"
which, we believe, will likely be useful in future applications.
