+
    ,i)                        ^ RI Ht ^ RIHtHtHt ^ RIt^ RIH	t	H
t
 ^ RIHtHt ^ RIHtHtHtHt ]'       d   ^ RIHt R R ltR	 R
 ltR R ltRR R lltR R ltR R ltR# )    )annotations)TYPE_CHECKINGAnycastN)FillTypeLineType)as_fill_typeas_line_type)MOVETO
code_dtypeoffset_dtypepoint_dtypec                    V ^8  d   QhRRRR/# )   codesr   returnNone )formats   "5/usr/lib/python3/dist-packages/contourpy/typecheck.py__annotate__r      s     Z ZC ZD Z    c                   \        V \        P                  4      '       g   \        R \	        V 4       24      hV P
                  \        8w  d    \        R\         RV P
                   24      hV P                  ^8X  d   \        V 4      ^8  g   \        RV P                   24      hV ^ ,          \        8w  d   \        R\         RV ^ ,           24      hR# )Expected numpy array not Expected numpy array of dtype  not 'Expected numpy array of shape (?,) not z$First element of code array must be z, not N)
isinstancenpndarray	TypeErrortypedtyper   
ValueErrorndimlenshaper   )r   s   &r   check_code_arrayr(      s    eRZZ((3DK=ABB{{j 9*U5;;-XYYJJ!OE
QB5;;-PQQQx6?xveTUhZXYY r   c                    V ^8  d   QhRRRR/# )r   offsetsr   r   r   r   )r   s   "r   r   r      s     W W W Wr   c                   \        V \        P                  4      '       g   \        R \	        V 4       24      hV P
                  \        8w  d    \        R\         RV P
                   24      hV P                  ^8X  d   \        V 4      ^8  g   \        RV P                   24      hV ^ ,          ^ 8w  d   \        RV ^ ,           24      hR# )r   r   r   r   z-First element of offset array must be 0, not N)r   r   r    r!   r"   r#   r   r$   r%   r&   r'   )r*   s   &r   check_offset_arrayr,      s    grzz**3DM?CDD}}$9,uW]]O\]]LLA#g,"2B7==/RSSqzQHQRUVV r   c                    V ^8  d   QhRRRR/# )r   pointsr   r   r   r   )r   s   "r   r   r   '   s     U Uc Ud Ur   c                   \        V \        P                  4      '       g   \        R \	        V 4       24      hV P
                  \        8w  d    \        R\         RV P
                   24      hV P                  ^8X  d1   V P                  ^,          ^8X  d   V P                  ^ ,          ^8  g   \        RV P                   24      hR# )r   r   r   z)Expected numpy array of shape (?, 2) not N)
r   r   r    r!   r"   r#   r   r$   r%   r'   )r.   s   &r   check_point_arrayr0   '   s    fbjj))3DL>BCC||{"9+eFLL>Z[[KK1a1!4a19LDV\\NSTT :Mr   c               (    V ^8  d   QhRRRRRRRR/# )	r   maybe_tupler   tuple_lengthintallow_empty_listsboolr   r   r   )r   s   "r   r   r   0   s6     E EEE E 
	Er   c                   \        V \        4      '       g   \        R \        V 4       24      h\	        V 4      V8w  d   \        RV R\	        V 4       24      hV  F5  p\        V\        4      '       d   K  RV R\        V4       2p\        V4      h	  V  Uu. uF  p\	        V4      NK  	  pp\	        \        V4      4      ^8w  d   RV RV 2p\        V4      hV'       g    V^ ,          ^ 8X  d   \        RV R24      hR# R# u upi )	zExpected tuple not zExpected tuple of length r   zExpected tuple to contain z lists but found a z	Expected z( lists with same length but lengths are z non-empty listsN)r   tupler!   r"   r&   r$   listset)r2   r3   r5   
maybe_listmsgitemlengthss   &&&    r   &_check_tuple_of_lists_with_same_lengthr?   0   s
   
 k5))-d;.?-@ABB
;<'4\N%KHXGYZ[[!
*d++.|n<OPTU_P`OabCC.  " &11[Ts4y[G1
3w<A,'OPWyYoq9\N2BCDD "1	 2s   Dc               $    V ^8  d   QhRRRRRR/# )r   filledzcpy.FillReturn	fill_typezFillType | strr   r   r   )r   s   "r   r   r   E   s&     P: P: P:N P:t P:r   c                	   \        V4      pV\        P                  8X  d   \        '       d   \	        \
        P                  V 4      p \        V ^4       \        \        V !  4       FE  w  pw  r4\        V4       \        V4       \        V4      \        V4      8w  g   K9  \        RV 24      h	  R# V\        P                  8X  d   \        '       d   \	        \
        P                  V 4      p \        V ^4       \        \        V !  4       FC  w  pw  r5\        V4       \!        V4       VR,          \        V4      8w  g   K7  \        RV 24      h	  R# V\        P"                  8X  d   \        '       d   \	        \
        P$                  V 4      p \        V ^RR7       \        \        V !  4       Fe  w  pw  rxVeD   Ve@   \        V4       \        V4       \        V4      \        V4      8w  d   \        RV 24      hKO  Vf   Vf   KY  \        RV 24      h	  R# V\        P&                  8X  d   \        '       d   \	        \
        P(                  V 4      p \        V ^RR7       \        \        V !  4       Fc  w  pw  ryVeB   V	e>   \        V4       \!        V	4       V	R,          \        V4      8w  d   \        RV 24      hKM  Vf   V	f   KW  \        RV 24      h	  R# V\        P*                  8X  d   \        '       d   \	        \
        P,                  V 4      p \        V ^RR7       \        \        V !  4       F  w  pw  rxp
Vex   Vet   V
ep   \        V4       \        V4       \!        V
4       \        V4      \        V4      8w  d   \        RV 24      hV
R,          \        V4      8w  d   \        R	V 24      hK  Vf   Vf   V
f   K  \        RV 24      h	  R# V\        P.                  8X  d   \        '       d   \	        \
        P0                  V 4      p \        V ^RR7       \        \        V !  4       F  w  pw  ryp
Ve}   V	ey   V
eu   \        V4       \!        V	4       \!        V
4       V	R,          \        V4      8w  d   \        RV 24      hV
R,          \        V	4      ^,
          8w  d   \        R
V 24      hK  Vf   V	f   V
f   K  \        RV 24      h	  R# \        RV 24      h)r   z3Points and codes have different lengths in polygon z+Inconsistent points and offsets in polygon Fr5   N1Points and codes have different lengths in chunk Inconsistent Nones in chunk )Inconsistent points and offsets in chunk z.Inconsistent codes and outer_offsets in chunk z0Inconsistent offsets and outer_offsets in chunk zInvalid FillType )r	   r   	OuterCoder   r   cpyFillReturn_OuterCoder?   	enumeratezipr0   r(   r&   r$   OuterOffsetFillReturn_OuterOffsetr,   ChunkCombinedCodeFillReturn_ChunkCombinedCodeChunkCombinedOffsetFillReturn_ChunkCombinedOffsetChunkCombinedCodeOffset"FillReturn_ChunkCombinedCodeOffsetChunkCombinedOffsetOffset$FillReturn_ChunkCombinedOffsetOffset)rA   rB   ir.   r   r*   chunkpoints_or_nonecodes_or_noneoffsets_or_noneouter_offsets_or_nones   &&         r   check_filledr^   E   s{   Y'IH&&&=#22F;F.vq9"+CL"9Af%U#6{c%j( #VWXVY!Z[[	 #:
 
h**	*=#44f=F.vq9$-c6l$; A f%w'r{c&k) #Nqc!RSS	 %<
 
h00	0=#::FCF.vqER6?V6M2E2N)m.G!.1 /~&#m*<<$'XY^X_%`aa =$,1F #?w!GHH 7N 
h22	2=#<<fEF.vqER8A#v,8O4E4N)o.I!.1"?3"2&#n*==$'PQVPW%XYY >$,1H #?w!GHH 9P 
h66	6=#@@&IF.vqERIRSVX^S_I`EAE/D*}/H)5!.1 /"#89}%^)<<$'XYZX[%\]](,M0BB$'UVWUX%YZZ C$,1F+3 #?s!CDD Ja 
h88	8=#BBFKF.vqERKTUXZ`UaKbGAG1F*/J)5!.1"?3"#89"2&#n*==$'PQRPS%TUU(,O0Dq0HH$'WXYWZ%[\\ I$,1H+3 #?s!CDD Lc ,YK899r   c               $    V ^8  d   QhRRRRRR/# )r   lineszcpy.LineReturn	line_typezLineType | strr   r   r   )r   s   "r   r   r      s!     3: 3:~ 3:. 3:T 3:r   c                z   \        V4      pV\        P                  8X  dj   \        '       d   \	        \
        P                  V 4      p \        V \        4      '       g   \        R \        V 4       24      hV  F  p\        V4       K  	  R# V\        P                  8X  d   \        '       d   \	        \
        P                  V 4      p \        V ^4       \        \!        V !  4       FE  w  pw  r$\        V4       \#        V4       \%        V4      \%        V4      8w  g   K9  \'        RV 24      h	  R# V\        P(                  8X  d   \        '       d   \	        \
        P*                  V 4      p \        V ^RR7       \        \!        V !  4       Fe  w  pw  rgVeD   Ve@   \        V4       \#        V4       \%        V4      \%        V4      8w  d   \'        RV 24      hKO  Vf   Vf   KY  \'        RV 24      h	  R# V\        P,                  8X  d   \        '       d   \	        \
        P.                  V 4      p \        V ^RR7       \        \!        V !  4       Fc  w  pw  rhVeB   Ve>   \        V4       \1        V4       VR	,          \%        V4      8w  d   \'        RV 24      hKM  Vf   Vf   KW  \'        RV 24      h	  R# V\        P2                  8X  dc   \        '       d   \	        \
        P4                  V 4      p \        V ^RR7       \        V ^ ,          4       F  w  rVf   K  \        V4       K  	  R# \'        RV 24      h)
zExpected list not z0Points and codes have different lengths in line FrD   NrE   rF   rG   zInvalid LineType rH   )r
   r   Separater   r   rJ   LineReturn_Separater   r9   r!   r"   r0   SeparateCodeLineReturn_SeparateCoder?   rL   rM   r(   r&   r$   rP   LineReturn_ChunkCombinedCoderR   LineReturn_ChunkCombinedOffsetr,   ChunkCombinedNanLineReturn_ChunkCombinedNan)
r`   ra   r.   rX   r   rY   rZ   r[   r\   _chunks
   &&        r   check_linesrl      s   Y'IH%%%=00%8E%&&0e>??Ff% 	h++	+=44e<E.ua8"+CK"8Af%U#6{c%j( #STUSV!WXX	 #9
 
h00	0=995AE.ua5Q6?U6L2E2N)m.G!.1 /~&#m*<<$'XY^X_%`aa =$,1F #?w!GHH 7M 
h22	2=;;UCE.ua5Q8A#u+8N4E4N)o.I!.1"?3"2&#n*==$'PQVPW%XYY >$,1H #?w!GHH 9O 
h//	/=88%@E.ua5Q&/a&9"F)!.1 ': ,YK899r   )T)
__future__r   typingr   r   r   numpyr   	contourpyr   r   contourpy.enum_utilr	   r
   contourpy.typesr   r   r   r   contourpy._contourpy
_contourpyrJ   r(   r,   r0   r?   r^   rl   r   r   r   <module>ru      sG    " + +  ( : I I&
ZWUE*P:f3:r   