
    Mcg$*                        d dl mZ ddlZ ed      Z ed      Z ed      Z ej                  d      Z ej                  d      Z	 ej                  d	      Z
 ej                  d
      Zd Zde	fde	fde	fde
fde
fde	fde	ffZd ZdefdZy)   )EllipticalArc    NMmZzLlHhVvCcSsQqTtAaAa
MZLHVCSQTAz([MmZzLlHhVvCcSsQqTtAa])z\[-+]?(?:(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][-+]?[0-9]+)?|(?:\.[0-9]+(?:[eE][-+]?[0-9]+)?))z^[01]z[, 	]c              #   *  K   d }t         j                  |       D ]P  }|t        v r|t        v r|nd }| |r	 t	        |      E d {    3t        j                  |      D ]  }|  R y 7 &# t
        $ r}t        d| | d      |d }~ww xY ww)NzInvalid arc command: '')
COMMAND_REsplitCOMMANDSARC_COMMANDS_tokenize_arc_arguments
ValueErrorFLOAT_REfindall)pathdefarc_cmdxetokens        W/var/www/html/bid-api/venv/lib/python3.12/site-packages/fontTools/svgLib/path/parser.py_tokenize_pathr   "   s     Gg&=,a$GGP21555 "))!, - ' 6 P #9'1#Q!GHaOPs:   6BA0A.A0"B.A00	B9BBBrxryzx-axis-rotationzlarge-arc-flagz
sweep-flagr   yc              #     K   t         j                  |       D cg c]  }|s|	 }}|st        d|  d      |j                          d}|r|j	                         }t
        |   \  }}|j                  |      }|st        d| d|      |j                         \  }}	|||	  ||	d  }|r|j                  |       |dk(  rd}n|dz  }|r|dk7  rt        d|  d      y c c}w w)NzNot enough arguments: 'r	   r   zInvalid argument for 'z' parameter:    r   )	SEPARATOR_REr   r   reversepopARC_ARGUMENT_TYPESsearchspanappend)
arcdefsraw_argsiargnamepatternmatchjks
             r   r   r   ?   s    '--f5;5a5H;26(!<==	A
lln*1-gs#5dV=PQQzz|1!Ah!"gOOC  6AFA' * 	Av26(!<== 7 <s   C)C$C$B(C)C))r   r   c           	         t        | }t        t        |             }|j                          d}d}d}t	        |d      }|r|d   t
        v r+|}	|j                         }|t        v }
|j                         }n8|4t        d| dt        | j                               t        |      z
        |}	|dk(  r|j                         }|j                         }t        |      t        |      dz  z   }
r|}n||z  }||j                          |j                  |j                  |j                   f       |}d}n|d	k(  rD||k7  r'|j#                  |j                  |j                   f       |j%                          |}d}d}n|dk(  rl|j                         }|j                         }t        |      t        |      dz  z   }
s||z  }|j#                  |j                  |j                   f       |}n`|d
k(  rg|j                         }t        |      |j                   dz  z   }
s||j                  z  }|j#                  |j                  |j                   f       |}n|dk(  rj|j                         }|j                  t        |      dz  z   }
s||j                   dz  z  }|j#                  |j                  |j                   f       |}n|dk(  rt        |j                               t        |j                               dz  z   }t        |j                               t        |j                               dz  z   }t        |j                               t        |j                               dz  z   }
s||z  }||z  }||z  }|j'                  |j                  |j                   f|j                  |j                   f|j                  |j                   f       |}|}nq|dk(  r|	dvr|}n||z   |z
  }t        |j                               t        |j                               dz  z   }t        |j                               t        |j                               dz  z   }
s
||z  }||z  }|j'                  |j                  |j                   f|j                  |j                   f|j                  |j                   f       |}|}n|dk(  rt        |j                               t        |j                               dz  z   }t        |j                               t        |j                               dz  z   }
s
||z  }||z  }|j)                  |j                  |j                   f|j                  |j                   f       |}|}n|dk(  r|	dvr|}n||z   |z
  }t        |j                               t        |j                               dz  z   }
s||z  }|j)                  |j                  |j                   f|j                  |j                   f       |}|}n4|dk(  r.t+        t        |j                                     }t+        t        |j                                     }t        |j                               }t-        t/        |j                                     }t-        t/        |j                                     }t        |j                               t        |j                               dz  z   }
s||z  }|r-|j1                  ||||||j                  |j                   f       n ||||||||      }|j3                  |       |}|r||j                          yy)a_  Parse SVG path definition (i.e. "d" attribute of <path> elements)
    and call a 'pen' object's moveTo, lineTo, curveTo, qCurveTo and closePath
    methods.

    If 'current_pos' (2-float tuple) is provided, the initial moveTo will
    be relative to that instead being absolute.

    If the pen has an "arcTo" method, it is called with the original values
    of the elliptical arc curve commands:

    .. code-block::

        pen.arcTo(rx, ry, rotation, arc_large, arc_sweep, (x, y))

    Otherwise, the arcs are approximated by series of cubic Bezier segments
    ("curveTo"), one every 90 degrees.
    NarcTozUnallowed implicit command in z, position My              ?LZHVCSCSQTQTA)complexlistr   r   hasattrr   r    	UPPERCASEupperr   lenr   floatendPathmoveTorealimaglineTo	closePathcurveToqCurveToabsboolintr0   draw)r   pencurrent_pos	arc_classelements	start_poscommandlast_control
have_arcTolast_commandabsoluter   r   poscontrol1control2endcontrolr   r   rotation	arc_large	arc_sweeparcs                           r   
parse_pathrd   _   s|   , ;'KN7+,HIGLg&J
B<8#"LllnG)+HmmoG  GMMO 4s8} DF  #Lc>AA(U1X]*C!s" $JJ((+*:*:;<
 $I
 G^i'

INNINN;<MMO#KIG^AA(U1X]*C{"JJ#((+,K^A([--22C{'''JJ#((+,K^A""U1X]2C{''",,JJ#((+,K^X\\^,uX\\^/Dr/IIHX\\^,uX\\^/Dr/IIH'%*?"*DDCK'K'{"KK..388$
 K#L^ 4' '
 '4|CX\\^,uX\\^/Dr/IIH'%*?"*DDCK'{"KK..388$
 K#L^HLLN+eHLLN.Cb.HHG'%*?"*DDC;&{"LL',,5#((7KLK"L^ 4' &
 &3lB'%*?"*DDC{"LL',,5#((7KLK"L^U8<<>*+BU8<<>*+BX\\^,HS01IS01I'%*?"*DDC{" 		XXsxx(  R9i K{ @      )rc   r   resetr   r   rA   compiler
   r   BOOL_REr   r   r!   r   rd    re   r   <module>rk      s     	 %&4y	RZZ23
 2::	 "**W
rzzF$& 
8	8!w7(O(O >@ *0= cre   