Ë
    /�Djö  ã                   ó&   — d gZ  G d„ d e«      Zd„ Zy)ÚOriginc                   óR   — e Zd ZdZd„ Zed„ «       Zd„ Zd„ Zd„ Z	d„ Z
dd„Zd	„ Zd
„ Zy)r   aG  This represents the origin of some object in some string.

    For example, if we have an object ``x1_obj`` that was produced by parsing
    the ``x1`` in the formula ``"y ~ x1:x2"``, then we conventionally keep
    track of that relationship by doing::

      x1_obj.origin = Origin("y ~ x1:x2", 4, 6)

    Then later if we run into a problem, we can do::

      raise PatsyError("invalid factor", x1_obj)

    and we'll produce a nice error message like::

      PatsyError: invalid factor
          y ~ x1:x2
              ^^

    Origins are compared by value, and hashable.
    c                 ó.   — || _         || _        || _        y ©N©ÚcodeÚstartÚend)Úselfr   r   r	   s       úPC:\Crop_Prediction\Backend\crop-ai-system\venv\Lib\site-packages\patsy/origin.pyÚ__init__zOrigin.__init__$   s   € ØˆŒ	ØˆŒ
Øˆ�ó    c                 ó¾  — g }|D ]4  }|�t        |t        «      s|j                  }|€Œ$|j                  |«       Œ6 |syt	        |D �cg c]  }|j
                  ‘Œ c}«      }t        |«      dk(  sJ ‚t        |D �cg c]  }|j                  ‘Œ c}«      }t        |D �cg c]  }|j                  ‘Œ c}«      } | |j                  «       ||«      S c c}w c c}w c c}w )a  Class method for combining a set of Origins into one large Origin
        that spans them.

        Example usage: if we wanted to represent the origin of the "x1:x2"
        term, we could do ``Origin.combine([x1_obj, x2_obj])``.

        Single argument is an iterable, and each element in the iterable
        should be either:

        * An Origin object
        * ``None``
        * An object that has a ``.origin`` attribute which fulfills the above
          criteria.

        Returns either an Origin object, or None.
        Né   )Ú
isinstancer   ÚoriginÚappendÚsetr   ÚlenÚminr   Úmaxr	   Úpop)ÚclsÚorigin_objsÚoriginsÚobjÚoÚcodesr   r	   s           r   ÚcombinezOrigin.combine)   sÄ   € ð$ ˆØò 	 ˆCØˆ¤z°#´vÔ'>Ø—j‘j�Øˆ{ØØ�N‰N˜3Õð	 ñ ØÜ WÖ- �Q—V“VÒ-Ó.ˆÜ�5‹z˜QŠÑÜ gÖ. �Q—W“WÒ.Ó/ˆÜ 'Ö*˜Q�1—5“5Ò*Ó+ˆÙ�5—9‘9“;  sÓ+Ð+ùò	 .ùâ.ùÚ*s   ÁCÁ;CÂCc                 óH   — | j                   | j                  | j                   S )zgExtracts and returns the span of the original code represented by
        this Origin. Example: ``x1``.r   ©r
   s    r   Úrelevant_codezOrigin.relevant_codeJ   s   € ð �y‰y˜Ÿ™ d§h¡hÐ/Ð/r   c                 óÄ   — t        |t        «      xrO | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r   )r   r   r   r   r	   ©r
   Úothers     r   Ú__eq__zOrigin.__eq__O   sR   € ä�uœfÓ%ò &Ø—	‘	˜UŸZ™ZÑ'ò&à—
‘
˜eŸk™kÑ)ò&ð —‘˜EŸI™IÑ%ð		
r   c                 ó   — | |k(   S r   © r#   s     r   Ú__ne__zOrigin.__ne__W   s   € Ø˜5‘=Ð Ð r   c                 ód   — t        t        | j                  | j                  | j                  f«      S r   )Úhashr   r   r   r	   r    s    r   Ú__hash__zOrigin.__hash__Z   s"   € Ü”V˜TŸY™Y¨¯
©
°D·H±HÐ=Ó>Ð>r   c                 óŠ   — d|z  ›| j                   ›dd|z  ›d| j                  z  ›d| j                  | j                  z
  z  ›�S )a3  Produces a user-readable two line string indicating the origin of
        some code. Example::

          y ~ x1:x2
              ^^

        If optional argument 'indent' is given, then both lines will be
        indented by this much. The returned string does not have a trailing
        newline.
        ú ú
ú^r   )r
   Úindents     r   ÚcaretizezOrigin.caretize]   sD   € ð �&ŠLØ�I‹IØ�&ŠLØ�$—*‘*ÒØ�4—8‘8˜dŸj™jÑ(Ò)ð
ð 	
r   c                 óì   — d| j                   d | j                   ›d| j                   | j                  | j                   ›d| j                   | j                  d  ›d| j                  ›d| j                  ›d�S )Nz<Origin z->z<-z (ú-z)>r   r    s    r   Ú__repr__zOrigin.__repr__p   sT   � à�I‰I�l˜Ÿ
™
Ò#Ø�I‰I�d—j‘j 4§8¡8Ò,Ø�I‰I�d—h‘h�jÒ!Ø�J‹JØ�H‹Hð
ð 	
r   c                 ó   — t         ‚r   )ÚNotImplementedErrorr    s    r   Ú__getstate__zOrigin.__getstate__z   s   € Ü!Ð!r   N)é    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úclassmethodr   r!   r%   r(   r+   r1   r4   r7   r'   r   r   r   r      sD   „ ñò*ð
 ñ,ó ð,ò@0ò

ò!ò?ó
ò&
ó"r   c                  ó¤  — t        ddd«      } t        ddd«      }| j                  «       dk(  sJ ‚|j                  «       dk(  sJ ‚t         j                  | |g«      }|j                  dk(  sJ ‚|j                  dk(  sJ ‚|j
                  dk(  sJ ‚|j                  d¬«      dk(  sJ ‚|t        ddd«      k(  sJ ‚ G d	„ d
t        «      }t         j                   || «       |«       d g«      }|| k(  sJ ‚t         j                   || «      |g«      }||k(  sJ ‚t         j                   |«        |«       g«      �J ‚ddlm}  |t        ddd«      «       y )NÚ012345é   é   é   z012345
  ^^z012345
    ^)r0   z  012345
    ^^^c                   ó   — e Zd Zdd„Zy)ú"test_Origin.<locals>.ObjWithOriginNc                 ó   — || _         y r   )r   )r
   r   s     r   r   z+test_Origin.<locals>.ObjWithOrigin.__init__‹   s	   € Ø ˆD�Kr   r   )r9   r:   r;   r   r'   r   r   ÚObjWithOriginrD   Š   s   „ ô	!r   rF   r8   )Úassert_no_picklingÚ )	r   r1   r   r   r   r	   ÚobjectÚ
patsy.utilrG   )Úo1Úo2Úo3rF   Úo4Úo5rG   s          r   Útest_OriginrP   ~   s+  € Ü	�˜!˜QÓ	€BÜ	�˜!˜QÓ	€BØ�;‰;‹=˜NÒ*Ñ*Ø�;‰;‹=˜OÒ+Ñ+Ü	�‰˜˜R˜Ó	!€BØ�7‰7�hÒÑØ�8‰8�qŠ=ÑØ�6‰6�QŠ;ÑØ�;‰;˜aˆ;Ó Ð$7Ò7Ñ7Ø”˜ ! QÓ'Ò'Ñ'ô!œô !ô 
�‰™ rÓ*©M«O¸TÐBÓ	C€BØ�Š8�OÜ	�‰™ rÓ*¨BÐ/Ó	0€BØ�Š8�Oä�>‰>™=›?©M«OÐ<Ó=ÐEÑEå-á”v˜b ! QÓ'Õ(r   N)Ú__all__rI   r   rP   r'   r   r   ú<module>rR      s"   ðð ˆ*€ôm"ˆVô m"ó`)r   