Ë
    D^(hœ	  ã                   óJ   — d dl mZ d dlZdgZej
                  dd„«       Zd„ Zy)é    )ÚdefaultdictNÚk_clique_communitiesc              #   ól  K  — |dk  rt        j                  d|› d�«      ‚|€t        j                  | «      }|D �cg c]  }t        |«      |k\  sŒt	        |«      ‘Œ }}t        t        «      }|D ]  }|D ]  }||   j                  |«       Œ Œ t        j                  «       }|j                  |«       |D ]F  }t        ||«      D ]5  }t        |j                  |«      «      |dz
  k\  sŒ$|j                  ||«       Œ7 ŒH t        j                  |«      D ]  }	t	        j                  |	Ž –— Œ yc c}w ­w)u8  Find k-clique communities in graph using the percolation method.

    A k-clique community is the union of all cliques of size k that
    can be reached through adjacent (sharing k-1 nodes) k-cliques.

    Parameters
    ----------
    G : NetworkX graph

    k : int
       Size of smallest clique

    cliques: list or generator
       Precomputed cliques (use networkx.find_cliques(G))

    Returns
    -------
    Yields sets of nodes, one for each k-clique community.

    Examples
    --------
    >>> G = nx.complete_graph(5)
    >>> K5 = nx.convert_node_labels_to_integers(G, first_label=2)
    >>> G.add_edges_from(K5.edges())
    >>> c = list(nx.community.k_clique_communities(G, 4))
    >>> sorted(list(c[0]))
    [0, 1, 2, 3, 4, 5, 6]
    >>> list(nx.community.k_clique_communities(G, 6))
    []

    References
    ----------
    .. [1] Gergely Palla, Imre DerÃ©nyi, IllÃ©s Farkas1, and TamÃ¡s Vicsek,
       Uncovering the overlapping community structure of complex networks
       in nature and society Nature 435, 814-818, 2005,
       doi:10.1038/nature03607
    é   zk=z, k must be greater than 1.Né   )ÚnxÚNetworkXErrorÚfind_cliquesÚlenÚ	frozensetr   ÚlistÚappendÚGraphÚadd_nodes_fromÚ_get_adjacent_cliquesÚintersectionÚadd_edgeÚconnected_componentsÚunion)
ÚGÚkÚcliquesÚcÚmembership_dictÚcliqueÚnodeÚ
perc_graphÚ
adj_cliqueÚ	components
             úc/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/networkx/algorithms/community/kclique.pyr   r      s8  è ø€ ðN 	ˆ1‚uÜ×Ñ  A 3Ð&AÐBÓCÐCØ€Ü—/‘/ !Ó$ˆØ%,Ö< ´°A³¸!³Œy˜�|Ð<€GÐ<ô "¤$Ó'€OØò 1ˆØò 	1ˆDØ˜DÑ!×(Ñ(¨Õ0ñ	1ð1ô
 —‘“€JØ×Ñ˜gÔ&Øò 8ˆÜ/°¸ÓHò 	8ˆJÜ�6×&Ñ& zÓ2Ó3¸¸A¹Ó>Ø×#Ñ# F¨JÕ7ñ	8ð8ô ×,Ñ,¨ZÓ8ò ,ˆ	Ü�‰ 	Ð*Ó+ñ,ùò% =ùs   ‚:D4¼D/ÁD/ÁBD4Ã*A
D4c                 ój   — t        «       }| D ]#  }||   D ]  }| |k7  sŒ	|j                  |«       Œ Œ% |S ©N)ÚsetÚadd)r   r   Úadjacent_cliquesÚnr   s        r    r   r   I   sK   € Ü“uÐØò 1ˆØ)¨!Ñ,ò 	1ˆJØ˜Ó#Ø ×$Ñ$ ZÕ0ñ	1ð1ð Ðó    r"   )Úcollectionsr   Únetworkxr   Ú__all__Ú_dispatchabler   r   © r'   r    ú<module>r-      s3   ðÝ #ã à!Ð
"€ð ×Ñò=,ó ð=,ó@r'   