
    ^(j	              	       ,    d dl mZ 	 ddedededefdZy)	    )IOreceived_type
input_typestrictreturnc                    | |k7  sy| t         j                  j                  k(  s|t         j                  j                  k(  ry| t         j                  j                  k(  s|t         j                  j                  k(  ryt	        | t
              r|t         j                  j                  k(  ryt	        | t              rt	        |t              syt        d | j                  d      D              }t        d |j                  d      D              }t         j                  j                  |v st         j                  j                  |v ry|r|j                  |      S t        |j                  |            dkD  S )aq  
    received_type and input_type are both strings of the form "T1,T2,...".

    If strict is True, the input_type must contain the received_type.
      For example, if received_type is "STRING" and input_type is "STRING,INT",
      this will return True. But if received_type is "STRING,INT" and input_type is
      "INT", this will return False.

    If strict is False, the input_type must have overlap with the received_type.
      For example, if received_type is "STRING,BOOLEAN" and input_type is "STRING,INT",
      this will return True.

    Supports pre-union type extension behaviour of ``__ne__`` overrides.
    TFc              3   <   K   | ]  }|j                           y wNstrip.0ts     D/Users/danicosta/Desktop/Flux2/ComfyUI/comfy_execution/validation.py	<genexpr>z&validate_node_input.<locals>.<genexpr>.   s     E,Dq,D   ,c              3   <   K   | ]  }|j                           y wr
   r   r   s     r   r   z&validate_node_input.<locals>.<genexpr>/   s     ?)>Aaggi)>r   r   )r   AnyTypeio_type	MatchType
isinstancelistCombostrsetsplitissubsetlenintersection)r   r   r   received_typesinput_typess        r   validate_node_inputr#      s(   ( J& 

***jBJJ<N<N.N ,,,
bll>R>R0R -&:9I9I+I mS)J1L EM,?,?,DEEN?)9)9#)>??K 
zz^+rzz/A/A[/P&&{33 >..{;<q@@    N)F)comfy_api.latestr   r   boolr#    r$   r   <module>r(      s7     9>6A6A$'6A156A	6Ar$   