
    h$*                         S SK Jr  SSKr\" S5      r\" S5      r\" S5      r\R                  " S5      r\R                  " S5      r	\R                  " S	5      r
\R                  " S
5      rS rS\	4S\	4S\	4S\
4S\
4S\	4S\	44rS rS\4S jrg)   )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              #   J  #    S n[         R                  U 5       H^  nU[        ;   a  U[        ;   a  UOS nUv   M!  U(       a   [	        U5       S h  vN   M>  [        R                  U5       H  nUv   M	     M`     g  N+! [
         a  n[        SU U S35      UeS nAff = f7f)NzInvalid arc command: '')
COMMAND_REsplitCOMMANDSARC_COMMANDS_tokenize_arc_arguments
ValueErrorFLOAT_REfindall)pathdefarc_cmdxetokens        N/var/www/html/env/lib/python3.13/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<   A B#A?A=A?'B#=A??
B 	BB  B#rxryzx-axis-rotationzlarge-arc-flagz
sweep-flagr   yc              #     #    [         R                  U 5       Vs/ s H  o(       d  M  UPM     nnU(       d  [        SU  S35      eUR                  5         SnU(       a  UR	                  5       n[
        U   u  pVUR                  U5      nU(       d  [        SU SU< 35      eUR                  5       u  pXHU	 v   XIS  nU(       a  UR                  U5        US:X  a  SnOUS-  nU(       a  M  US:w  a  [        SU  S35      eg s  snf 7f)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-s#5dV=PQQzz|Ah"gOOC  6AFA' (* 	Av26(!<== 7 <s   D

DDB?D
/D
)r   r   c           	      h   [        U6 n[        [        U 5      5      nUR                  5         SnSnSn[	        US5      nU(       GaX  US   [
        ;   a,  Un	UR                  5       nU[        ;   n
UR                  5       nO;Uc6  [        SU < S[        U R                  5       5      [        U5      -
  < 35      eUn	US:X  a  UR                  5       nUR                  5       n[        U5      [        U5      S-  -   nW
(       a  UnOX--  nUb  UR                  5         UR                  UR                  UR                   45        UnSnGOLUS	:X  aD  X%:w  a'  UR#                  UR                  UR                   45        UR%                  5         UnSnSnGOUS:X  ap  UR                  5       nUR                  5       n[        U5      [        U5      S-  -   nW
(       d  X-  nUR#                  UR                  UR                   45        UnGOUS
:X  ak  UR                  5       n[        U5      UR                   S-  -   nW
(       d  XR                  -  nUR#                  UR                  UR                   45        UnGOUS:X  an  UR                  5       nUR                  [        U5      S-  -   nW
(       d  XR                   S-  -  nUR#                  UR                  UR                   45        UnGOUS:X  Ga  [        UR                  5       5      [        UR                  5       5      S-  -   n[        UR                  5       5      [        UR                  5       5      S-  -   n[        UR                  5       5      [        UR                  5       5      S-  -   nW
(       d  X-  nX-  nUU-  nUR'                  UR                  UR                   4UR                  UR                   4UR                  UR                   45        UnUnGOUS:X  a  U	S;  a  UnOX"-   U-
  n[        UR                  5       5      [        UR                  5       5      S-  -   n[        UR                  5       5      [        UR                  5       5      S-  -   nW
(       d	  X-  nUU-  nUR'                  UR                  UR                   4UR                  UR                   4UR                  UR                   45        UnUnGOUS:X  a  [        UR                  5       5      [        UR                  5       5      S-  -   n[        UR                  5       5      [        UR                  5       5      S-  -   nW
(       d
  UU-  nUU-  nUR)                  UR                  UR                   4UR                  UR                   45        UnUnGOUS:X  a  U	S;  a  UnOX"-   U-
  n[        UR                  5       5      [        UR                  5       5      S-  -   nW
(       d  UU-  nUR)                  UR                  UR                   4UR                  UR                   45        UnUnGO?US:X  Ga8  [+        [        UR                  5       5      5      n[+        [        UR                  5       5      5      n[        UR                  5       5      n[-        [/        UR                  5       5      5      n[-        [/        UR                  5       5      5      n[        UR                  5       5      [        UR                  5       5      S-  -   nW
(       d  UU-  nU(       a-  UR1                  UUUUUUR                  UR                   45        OU" UUUUUUU5      nUR3                  U5        UnU(       a  GMX  Ub  UR                  5         gg)a3  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   _   sj   , ;'KN7+,HIGLg&J
B<8#"LllnG)+HmmoG  GMMO 4s8} DF  #Lc>AA(U1X]*C!" $JJ((+*:*:;<
 $I
 G^'

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''{"KK..388$
 K#L^ 4' '
 '4|CX\\^,uX\\^/Dr/IIH'%*?"*DDC'{"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	ZZ23
 ::	 **W
zzF$& 
8	8!w7(O(O >@ *0= cre   