
    lj                    R    d dl mZ d dlZd dlmZ ddlmZ ddlm	Z	 dgZ
	 	 dddZdS )    )annotationsN)Iterable   )Mobject)remove_list_redundanciesextract_mobject_family_membersFmobjectsIterable[Mobject]use_z_indexboolonly_those_with_pointsreturnlist[Mobject]c                    |rt           j        nt           j        t          t	          t          j        fd| D                                  }|rt          |d           S |S )a  Returns a list of the types of mobjects and their family members present.
    A "family" in this context refers to a mobject, its submobjects, and their
    submobjects, recursively.

    Parameters
    ----------
    mobjects
        The Mobjects currently in the Scene
    only_those_with_points
        Whether or not to only do this for
        those mobjects that have points. By default False

    Returns
    -------
    list
        list of the mobjects and family members.
    c              3  .   K   | ]} |          V  d S N ).0mmethods     M/home/agentuser/manim-venv/lib/python3.11/site-packages/manim/utils/family.py	<genexpr>z1extract_mobject_family_members.<locals>.<genexpr>'   s+      44aq		444444    c                    | j         S r   )z_index)r   s    r   <lambda>z0extract_mobject_family_members.<locals>.<lambda>*   s    	 r   )key)r   family_members_with_points
get_familyr   listitchainsorted)r	   r   r   extracted_mobjectsr   s       @r   r   r      s    ,  $3#1RX44448444566   C(.A.ABBBBr   )FF)r	   r
   r   r   r   r   r   r   )
__future__r   	itertoolsr!   collections.abcr   mobject.mobjectr   utils.iterablesr   __all__r   r   r   r   <module>r+      s    " " " " " "     $ $ $ $ $ $ % % % % % % 6 6 6 6 6 6+
,
 #(      r   