
    'j                       d dl mZ d dlmZmZmZmZmZmZ d dl	m
Z
 d dlZd dlZd dlZd dlmZ d dlmZ d dlmZ d dlmZmZmZmZmZ d d	lmZ d d
lmZ d dlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' d dl(m)Z) d dl*m+Z+ d dl,m-Z-m.Z. d dl/m0Z0 ddl1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z: ddl;m<Z< ddlm=Z= er2d dl>m?Z? d dl@mAZA d dlBmCZCmDZD d dlEmFZF d dlGmHZH d dlmIZI d dlJmKZK d dl(mLZL g dZM ejN        d           ZO ed!i d" ed#d$%          d& ed'          d( ed)          d* ed+d%          d, ed-e)jP        %          d. ed/          d0 ed1ejQ        %          d2 ed3d%          d4 ed5d%          d6 ed7d8%          d9 ed:          d; ed<d=%          d> ed?d$%          d@ edA          dB edCd%          dD edEd%          dF edGd%          i dH edId$%          dJ edKe)jP        %          dL edMd %          dN edO          dP edQe)jP        %          dR edSejR         eddd          T          dU edVd %          dW edXd %          dY edZd %          d[ ed\d ejS        ]          d^ ed_d ejS        ]          d` edadejS        ]          db edcdejS        ]          dd eded ejT        ]          df edgdhejT        ]          di edjdhejT        ]          dk edld ejU        ]                    ZV eeV          ZWdmZXdnZYdoZZdpZ[dqZ\drZ]dsZ^dtZ_duZ`dd|Za ed}d~          Zb edd          Zce: G d de7                      Zde: G d ded                      Ze G d d          Zf G d d          Zg G d d          Zh G d d          Zi G d d          Zj edi d edad$%          d> ed+d$%          d ed1d%          d ed?d %          d ed)d$%          d edd%          d ed7d%          d* edCd%          d, ed-e)jP        %          d. ed'          d0 edKd%          d2 ed3d%          d ed<d%          d4 ed5d%          d6 edVd8%          d edd%          d9 ed/          i d; edd=%          d edpd%          d@ ed:          dB edGd%          dF edId%          dH edXd %          dD ed_d%          dJ edQe)jP        %          d edcd=%          dL edMd %          d edd %          d edd=%          d edZ          dN edA          dP ede)jP        %          d edd%          d edd%           edd%           ed\d%           edd %           edd %           edd%           edld %           edd %           edd%           eded %           edgdh%           edjdh%           edd          d          Zk eek          ZldZme: G d de5                      Zn G d de<en                   ZodS )    )annotations)TYPE_CHECKINGUnionOptionalIterableAnyIterator)SelfN)
namedtuple)const)
cast_value)DXFAttrDXFAttributesDefSubclassXTypegroup_code_mapping)Tags)EXT_MAX_STR_LEN)	Vec3NULLVECX_AXISY_AXISZ_AXISMatrix44WCSTransformOCSTransformNonUniformScalingError)colors)ProxyGraphicError)safe_stringscale_mtext_inline_commands)safe_handle   )
base_classSubclassProcessor)	DXFObject)
DXFGraphicacdb_entity)register_entity)ObjectCollection)default_copy)Auditor)Drawing)DXFNamespace	DXFEntity)
BaseLayout)AbstractTagWriter)DXFTag)EntityQuery)xref)MultiLeaderMLeaderMLeaderStyleMLeaderStyleCollectionMLeaderContext	MTextData	BlockData
LeaderData
LeaderLineArrowHeadData
AttribDataezdxfAcDbMLeaderversion     )defaultstyle_handleT  property_override_flagsZ   leader_type   leader_line_color[   leader_linetype_handleU  leader_lineweight   has_landing"  
has_dogleg#  dogleg_length)      arrow_head_handleV  arrow_head_size*      content_type   text_style_handleW  text_left_attachment_type   text_right_attachment_type_   text_angle_type   text_alignment_type   
text_color\   has_text_frame$  block_record_handleX  block_color]   block_scale_vector
   )xtyperE   block_rotation+   block_connection_type   is_annotative%  is_text_direction_negative&  )rE   
dxfversiontext_IPE_align   text_attachment_point   scale-   text_attachment_direction  text_bottom_attachment_type  	   text_top_attachment_type  leader_extend_to_text'  zCONTEXT_DATA{zLEADER{zLEADER_LINE{i,  i-  .  i/  0  i1  datalist[DXFTag]	stop_codeintreturnlist[Union[DXFTag, list]]c                d    dfdt          |            t                    |          S )	Ntagr2   stopr   r   r   c                   | g}t                    } | j        |k    r| j        t          k    r%|                     | t                               nZ| j        t
          k    r5| j        t          k    r%|                     | t                               n|                    |            t                    } | j        |k    |S N)	nextcodeSTART_LEADERappend
END_LEADERSTART_LEADER_LINEvalueLEADER_LINE_STREND_LEADER_LINE)r   r   	collectorbuild_structuretagss      P/DATA/AppData/hermes/venv/lib/python3.11/site-packages/ezdxf/entities/mleader.pyr   z-compile_context_tags.<locals>.build_structure   s    E	4jjh$x<''  j!A!ABBBB ...393O3O  o!F!FGGGG  %%%t**C h$     )r   r2   r   r   r   r   )iterr   )r   r   r   r   s     @@r   compile_context_tagsr      sL           ::D?4::y111r   r>   zindex, handler?   zhandle, index, width, textc                      e Zd ZdZ eeee          Ze	j
        Zd@ fdZedAd            ZdBdZdCd
ZedAd            ZdDdZdEdZefdFdZ	 dGdH fdZedId            ZedJd            ZedKd             ZedLd"            ZdMd%ZdN fd&ZdNd'ZdNd(ZdO fd+Z dP fd0Z!dQd1Z"dQd2Z#dRd4Z$dGdSd8Z%dRd9Z&dTd;Z'dUd>Z(d? Z) xZ*S )Vr5   MULTILEADERr   Nonec                    t                                                       t                      | _        g | _        g | _        d S r   )super__init__r9   contextarrow_headsblock_attribs)self	__class__s    r   r   zMultiLeader.__init__	  s<    %''02/1r   boolc                    | j         j        duS )z*``True`` if MULTILEADER has MTEXT content.N)r   mtextr   s    r   has_mtext_contentzMultiLeader.has_mtext_content       |!--r   strc                0    | j         j        }||j        S dS )zYGet MTEXT content as string, return "" if MULTILEADER has
        BLOCK content.
        N )r   r   default_content)r   r   s     r   get_mtext_contentzMultiLeader.get_mtext_content  s"     "((rr   textc                Z    | j         j        }|t          |t                    |_        dS dS )z\Set MTEXT content as string, does nothing if MULTILEADER has
        BLOCK content.
        N)r   r   r    r   r   )r   r   r   s      r   set_mtext_contentzMultiLeader.set_mtext_content  s4     "$/o$F$FE!!! r   c                    | j         j        duS )z*``True`` if MULTILEADER has BLOCK content.N)r   blockr   s    r   has_block_contentzMultiLeader.has_block_content%  r   r   dict[str, str]c                    | j         
J d            | j         j        }t                      }| j        D ]2}|                    |j                  }||j        ||j        j        <   3|S )zGet BLOCK attributes as dictionary of (tag, value) pairs.
        Returns an empty dictionary if MULTILEADER has MTEXT content.
        Nvalid DXF document required)	docentitydbdictr   gethandler   dxfr   )r   r   r   attrattdefs        r   get_block_contentzMultiLeader.get_block_content*  so     x##%B###8$#vv& 	1 	1D\\$+..F!'+yVZ^$r   contentc                j   | j         
J d            | j         j        }t                      }| j        }t	          |          D ]p\  }}|                    |j                  }|O|j        j        }t          |                    |          t                    }	|	|                    |	          ||<   q|S )z{Set BLOCK attributes by a dictionary of (tag, value) pairs.
        Does nothing if MULTILEADER has MTEXT content.
        Nr   )r   )r   r   r   r   	enumerater   r   r   r   r    r   _replace)
r   r   r   r   r   indexr   r   r   new_texts
             r   set_block_contentzMultiLeader.set_block_content7  s     x##%B###8$#vv*$]33 	H 	HKE4\\$+..F!jn&w{{3'7'7II'+/==h=+G+GM%(r   entityr/   c                    t          |t                    sJ t          j        | j                  |_        t          j        | j                  |_        t          j        | j                  |_        dS )zCopy leadersN)
isinstancer5   copydeepcopyr   r   r   )r   r   copy_strategys      r   	copy_datazMultiLeader.copy_dataH  s[    &+.....t|44!]4+;<<#}T-?@@r   N	processorOptional[SubclassProcessor]r.   c                6   t                                          |          }||S |                    d          }|rl|                     |          }|rT	 |                     |          | _        nV# t          j        $ r& t          	                    d|j
         d           Y n"w xY wnt          j        d|j
         d          |                     |          | _        |                     |          | _        |                    |t           |d           |S )NrD   z/Context structure error in entity MULTILEADER(#)z/missing 'AcDbMLeader' subclass in MULTILEADER(#T)subclassrecover)r   load_dxf_attribssubclass_by_indexextract_context_dataload_contextr   r   DXFStructureErrorloggerinfor   extract_arrow_headsr   extract_block_attribsr   fast_load_dxfattribsacdb_mleader_group_codes)r   r   r   r   r   r   s        r   r   zMultiLeader.load_dxf_attribsO  sO    gg&&y11J**1-- 	//55G #'#4#4W#=#=DLL.   KKW#*WWW     )O#*OOO    33D99!77==&&)D$ 	' 	
 	
 	
 
s   A1 12B&%B&r   r   r   c                    d\  }}g }t          |           D ]-\  }}|j        t          k    r|}|j        t          k    r|dz   }.|r|r| ||         }| ||= |S )N)NNr#   )r   r   START_CONTEXT_DATAEND_CONTEXT_DATA)r   startendcontext_datar   r   s         r   r   z MultiLeader.extract_context_datal  s    
s#D// 	  	 JE3x------ai 	 S 	 c	?LU3Yr   r   r9   c                    	 t          | t                    }t                              |          S # t          $ r t
          j        w xY wr   )r   r   r9   loadStopIterationr   r   )r   r   s     r   r   zMultiLeader.load_context|  sS    	0*41ABBG "&&w///  	* 	* 	*))	*s	   1 Alist[ArrowHeadData]c                   fd}g 	 |                      d          }n# t          j        $ r cY S w xY w|}t                      |                     ddh|          D ]\  }}|dz  }||<   |dk    r
 |              | ||= S )Nc            	                              t                               dd                               dd                                                                 d S )N^   r   Y  0)r   r>   r   clear)r   headss   r   
store_headz3MultiLeader.extract_arrow_heads.<locals>.store_head  s`    LLMM"a((MM#s++    OOr   r   r   r#   )	tag_indexr   DXFValueErrorr   collect_consecutive_tags)r   r  r   r   r   r   r   r  s         @@r   r   zMultiLeader.extract_arrow_heads  s    	 	 	 	 	 	 &(	NN2&&EE" 	 	 	LLL	 FF	88"cEJJ 	 	KD%1HC#IdOs{{
 sO   " 66list[AttribData]c                `   fd}g 	 |                      d          }n# t          j        $ r cY S w xY w|}t                      |                     h d|          D ].\  }}|dz  }|dk    rt                    r
 |             ||<   /t                    r
 |             | ||= S )Nc                                          t                              dd                              dd                              dd                              dd                                                                d S )	NJ  r      r   ,         ?r   r   )r   r?   r   r   )attribsr   s   r   store_attribz7MultiLeader.extract_block_attribs.<locals>.store_attrib  s    NNMM#s++MM#q))MM"c**MM#r**	    OOr   r
  >   r  r   r
  r  r#   )r  r   r  r   r  len)r   r  r   r   r   r   r  r   s         @@r   r   z!MultiLeader.extract_block_attribs  s    		 		 		 		 		 		 %'	NN3''EE" 	 	 	NNN	 $(FF	889L9L9LeTT 	$ 	$KD%1HCs{{s9~~{#IdOOy>> 	LNNN sOr  	tagwriterr1   c                x    | j         j        rdS t                              dt	          |            d           dS )NTzIgnore z% at DXF export, invalid context data.F)r   is_validr   debugr   )r   r  s     r   preprocess_exportzMultiLeader.preprocess_export  s=    <  	4LLS3t99SSSTTT5r   c                "   d+fd}t                                          |           | j        |j        }|j         dt
          j                    dj                   | j        	                    |            dj
                    d	j                    d
j                    dj                    dj                    dj                    dj                    dj                    dj                    |dd            dj                    dj                    dj                    dj                    dj                    dj                    dj                    dj                    dj                    |dd            dj                   |                    dj                    d j                    d!j                     d"j!                   |tD          j#        k    rn| $                    |           | %                    |            d#j&                    d$j'                    d%j(                    d&j)                   |tD          j*        k    r3 d'j+                    d(j,                    d)j-                   |tD          j.        k    r d*j/                   d S d S ),Nr   r   namer   c                R                         |          }| | |           d S d S r   )r   )r   r  r   r   
write_tag2s      r   write_handle_if_existz8MultiLeader.export_entity.<locals>.write_handle_if_exist  s8    WWT]]F!
4((((( "!r   d   rC   rG   rI   rK   rM   rO   rQ   rS   rU   rW   rZ   rY   r\   r_   ra   rc   re   rg   ri   rk   rm   ro   rn   rq   rs   rv   rx   rz   r|   r   r   r   r   r   r   r   )r   r   r  r   )0r   export_entityr   r}   r  acdb_mleaderr  rB   r   
export_dxfrF   rH   rJ   rL   rN   rP   rR   rT   rV   r[   r^   r`   rb   rd   rf   rh   rj   rl   rp   write_vertexrr   ru   rw   ry   r   DXF2007export_arrow_headsexport_block_attribsr{   r~   r   r   DXF2010r   r   r   DXF2013r   )r   r  r  rB   r   r  r   s       @@r   r  zMultiLeader.export_entity  s   	) 	) 	) 	) 	) 	) 	)
 	i(((h&)

3)***
3$$$	***
 	
3()))
2s2333
3(((
2s,---
32333
3-...
3(((
3'''
2s()))c#6777
2s*+++
3()))
3-...
35666
2s5666
3+,,,
3/000
2s~&&&
3*+++c#8999
2s'''r3#9:::
2s)***
31222
3)***em####I...%%i000JsC:;;;JsC.///JsC5666Jr39%%%em##JsC9:::JsC;<<<JsC8999em##JsC566666 $#r   c                x    | j         D ]1\  }}|                    d|           |                    d|           2d S )Nr   r   )r   r  )r   r  r   r   s       r   r!  zMultiLeader.export_arrow_heads  sQ    !- 	. 	.ME6  U+++  f----	. 	.r   c                   | j         D ]}|                    d|j                   |                    d|j                   |                    d|j                   |                    dt          |j        t                               d S )Nr
  r  r  r   )r   r  r   r   widthr    r   r   )r   r  attribs      r   r"  z MultiLeader.export_block_attribs  s    ( 	Q 	QF  fm444  fl333  V\222  k&+&O&OPPPP		Q 	Qr   registryxref.Registryc                   t                                          |           | j        }|                    |j                   |                    |j                   |                    |j                   |                    |j                   |                    |j                   | j	        D ]}|                    |j
                   | j                            |           dS z5Register required resources to the resource registry.N)r   register_resourcesr   
add_handlerF   rN   rY   r`   rn   r   r   r   )r   r)  r   
arrow_headr   s       r   r-  zMultiLeader.register_resources  s    ""8,,,hC,---C6777C1222C1222C3444* 	3 	3J
 12222''11111r   cloner
   mappingxref.ResourceMapperc                T   t          |t                    sJ t                                          ||           | j        }|j        }|                    |j                  |_        |                    |j                  |_        |                    |j                  |_        |                    |j	                  |_	        |                    |j
                  |_
        |                    |           |                    |           |j                            |           dS z3Translate resources from self to the copied entity.N)r   r5   r   map_resourcesr   
get_handlerF   rN   rY   r`   rn   map_arrow_head_handlesmap_block_attrib_handlesr   )r   r0  r1  r   	clone_dxfr   s        r   r5  zMultiLeader.map_resources!  s	   %-----eW---hI	!(!3!3C4D!E!E	+2+=+=&,
 ,
	( '.&8&89N&O&O	#&-&8&89N&O&O	#(/(:(:3;R(S(S	%$$W---&&w///##G,,,,,r   c                8    fd| j         D             | _         d S )Nc                l    g | ]0}|                                         |j                             1S )r   r   r6  r   ).0arrowr1  s     r   
<listcomp>z6MultiLeader.map_arrow_head_handles.<locals>.<listcomp>3  sG     
 
 
 NN'"4"4U\"B"BNCC
 
 
r   )r   r   r1  s    `r   r7  z"MultiLeader.map_arrow_head_handles2  s7    
 
 
 
)
 
 
r   c                8    fd| j         D             | _         d S )Nc                l    g | ]0}|                                         |j                             1S r<  r=  )r>  r(  r1  s     r   r@  z8MultiLeader.map_block_attrib_handles.<locals>.<listcomp>9  sG     
 
 
 OO7#5#5fm#D#DOEE
 
 
r   )r   rA  s    `r   r8  z$MultiLeader.map_block_attrib_handles8  s7    
 
 
 
,
 
 
r   Iterator[DXFGraphic]c                *    |                                  S )a  Yields the graphical representation of MULTILEADER as virtual DXF
        primitives.

        These entities are located at the original location, but are not stored
        in the entity database, have no handle and are not assigned to any
        layout.

        )__virtual_entities__r   s    r   virtual_entitieszMultiLeader.virtual_entities>  s     ((***r   target_layoutOptional[BaseLayout]r3   c                &    ddl m}  || |          S )a  Explode MULTILEADER as DXF primitives into target layout,
        if target layout is ``None``, the target layout is the layout of the
        source entity.

        Returns an :class:`~ezdxf.query.EntityQuery` container with all DXF
        primitives.

        Args:
            target_layout: target layout for the DXF primitives, ``None`` for
                same layout as the source entity.

        r   )explode_entity)ezdxf.exploderK  )r   rH  rK  s      r   explodezMultiLeader.explodeI  s(     	100000~dM222r   c                    ddl m} 	 |                    | d          S # t          $ r |                    | d          cY S w xY w)z'Support for "VirtualEntities" protocol.r   )mleaderTproxy_graphicF)ezdxf.renderrO  rG  r   )r   rO  s     r   rF  z MultiLeader.__virtual_entities__Z  sq    ((((((	G++D+EEE  	G 	G 	G++D+FFFFF	Gs    !AAIterable[str]c              #     K   dD ]#}| j                             |d          }||V  $| j        D ]}|j        V  | j        j        | j        j        j        }||V  dS dS dS z(Support for "ReferencedBlocks" protocol.)rn   rY   N)r   r   r   r   r   r   rn   )r   r  r   r/  s       r   __referenced_blocks__z!MultiLeader.__referenced_blocks__c  s       A 	 	DX\\$--F! * 	$ 	$J##### <)\';F! *)!!r   mr   c                4   | j         }| j        }t          |          }|j        st	          d          t          |j        j                  dk    st          |j        j                  dk    r|j	        st	          d          |
                    |           |j        |_        |j        |_        |xj        |j        z  c_        |j        r"|j        j        |_        |j        j        |_        |                     |           |                                  | S )a  Transform the MULTILEADER entity by transformation matrix `m` inplace.

        Non-uniform scaling is not supported.

        Args:
            m: transformation :class:`~ezdxf.math.Matrix44`

        Raises:
            NonUniformScalingError: for non-uniform scaling

        z0MULTILEADER does not support non-uniform scaling-q=)r   r   r   has_uniform_xy_scalingr   absplane_x_axiszplane_y_axishas_uniform_xyz_scaling	transformr[   r   rV   uniform_scaler   rotationru   rr   post_transformupdate_proxy_graphic)r   rW  r   r   wcss        r   r`  zMultiLeader.transformu  s%    h,1oo) 	(B   w#%&&..#g6J6L2M2MPU2U2U. ,F   	#%5M	S..= 	9!(!7C%,]%8C" 	A 	!!###r   c                    d | _         d S r   rP  r   s    r   rd  z MultiLeader.update_proxy_graphic  s    !r   r   r   r   r   )r   r   )r   r   )r   r   )r   r   )r   r/   r   r   r   r   r   r   r.   )r   r   r   r   )r   r   r   r9   )r   r   r   r   )r   r   r   r  )r  r1   r   r   r  r1   r   r   r)  r*  r   r   r0  r
   r1  r2  r   r   )r1  r2  )r   rD  )rH  rI  r   r3   r   rS  )rW  r   r   r5   )+__name__
__module____qualname__DXFTYPEr   r$   r(   r  
DXFATTRIBSr   DXF2000MIN_DXF_VERSION_FOR_EXPORTr   propertyr   r   r   r   r   r   r+   r   r   staticmethodr   r   r   r   r  r  r!  r"  r-  r5  r7  r8  rG  rM  rF  rV  r`  rd  __classcell__r   s   @r   r5   r5     s       Gz;EEJ!&2 2 2 2 2 2 . . . X.   G G G G . . . X.      " :F A A A A A 8<      :    \ 0 0 0 \0    \8    \@   ;7 ;7 ;7 ;7 ;7 ;7z. . . .
Q Q Q Q2 2 2 2 2 2- - - - - -"
 
 
 

 
 
 
	+ 	+ 	+ 	+3 3 3 3 3"G G G G   $, , , ,\" " " " " " "r   r5   c                      e Zd ZdZdS )r6   MLEADERN)rn  ro  rp  rq   r   r   r6   r6     s        GGGr   r6   c                      e Zd Zddddddddd	d
ddddddZd+dZed,d            Zd-dZd.dZe	d/d            Z
e	d0d             Zd1d#Zd2d&Zd3d)Zd*S )4r9   r   
base_pointchar_heightr[   landing_gap_sizeleft_attachmentright_attachmenttext_align_typeattachment_typeplane_originr\  r^  plane_normal_reversedtop_attachmentbottom_attachment)(   rs   rW         rg   ri   rx   r  n   o   p   )  r   r   r   r   c                *   g | _         d| _        t          | _        d| _        d| _        d| _        d| _        d| _        d| _	        d| _
        d | _        d | _        t          | _        t          | _        t           | _        d| _        d| _        d| _        d S )Nr  g      @       @r#   r   r   )leadersr   r   r}  r~  r[   r  r  r  r  r  r   r   r  r   r\  r   r^  r  r  r  r   s    r   r   zMLeaderContext.__init__  s    )+
  !(" #  !  *.
*.
")"("(*+"!"r   r   r   c                >   |d         t           t          fk    sJ  |             }d }|D ]}t          |t                    r3|j                            t                              |                     J|\  }}|r|                    ||          rhd }|dk    r|dk    rt                      }||_
        |dk    r|dk    rt                      }||_        t          j                            |          }|r$|                    |t#          ||                     |S )Nr   rS   r#   (  )r   CONTEXT_STRr   listr  r   r<   r   parser:   r   r;   r   r9   ATTRIBSr   __setattr__r   )clsr   ctxr   r   r   r   r  s           r   r   zMLeaderContext.load  s-   qz0+>>>>>cee04 	C 	CC#t$$ "":??3#7#7888KD% #==u-- #"Gs{{uzz#++#		!#++#		%-11$77 COOD*T5*A*ABBB
r   r)  r*  c                    | j         | j                             |           | j        | j                            |           dS dS r,  )r   r-  r   r   r)  s     r   r-  z!MLeaderContext.register_resources   sL    :!J))(333:!J))(33333 "!r   r1  r2  c                    | j         | j                             |           | j        | j                            |           dS dS r4  )r   r5  r   rA  s     r   r5  zMLeaderContext.map_resources  sL    :!J$$W---:!J$$W----- "!r   r   c                    dS )NTr{  r   s    r   r  zMLeaderContext.is_valid  s    tr   r   c                |    | j                             | j                                                  }| j        r| }|S r   )r\  crossr^  	normalizer  )r   z_axiss     r   plane_z_axiszMLeaderContext.plane_z_axis  s>    "(():;;EEGG% 	WFr   r  r1   c                   |j         }|j        } |t          t                      |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j	                    |d| j
                    |d| j                    |d	| j                   | j        r' |d
d           | j                            |           n |d
d           | j        r' |dd           | j                            |           n |dd            |d| j                    |d| j                    |d| j                    |d| j                   | j        D ]}|                    |           |j        t,          j        k    r" |d| j                    |d| j                    |t4          d           d S )Nr  rs   rW   r  r  rg   ri   rx   r  rS   r#   r   r  r  r  r  r  r   r   })r  r  r   r  r   r}  r~  r[   r  r  r  r  r  r   r  r   r  r\  r^  r  r  r}   r   r#  r  r  r   )r   r  r  r  leaders        r   r  zMLeaderContext.export_dxf  sA   )
 -
%{333
2tz"""R)))
2t'(((
3,---
3-...
3,---
3-...
3,---
3,---: 	JsAJ!!),,,,JsA: 	JsAJ!!),,,,JsAS$+,,,S$+,,,S$+,,,
32333 l 	) 	)Fi(((( 5=00JsD/000JsD2333
#S)))))r   re  r   c                   |j         }|j        }| xj        |z  c_        |                    | j                  | _        | xj        |z  c_        | xj        |z  c_        | xj        |z  c_        |                    | j                  | _        |	                    | j
        d          | _
        |	                    | j        d          | _        d| _        |	                    t          d          }|                    | j                   rd| _        | j        D ]}|                    |           | j        | j                            |           | j        | j                            |           d S d S )NTr  r   r#   )rW  ra  r   r`  r}  r~  r[   r  r  transform_directionr\  r^  r  r   iscloser  r  r   r   )r   re  rW  r   r  r  s         r   r`  zMLeaderContext.transformC  sy   E!

e

++do66E!%&KK(9::11$2Ct1TT11$2Ct1TT%&"&&v&>>>>4,,-- 	+)*D&l 	" 	"FS!!!!:!J  %%%:!J  %%%%% "!r   r   floatc                    	 || j         z  }n# t          $ r Y d S w xY w|| _         | xj        |z  c_        | xj        |z  c_        | xj        |z  c_        d S r   )r   ZeroDivisionErrorr~  r[   r  )r   r   conversion_factors      r   	set_scalezMLeaderContext.set_scaleZ  s    	 %
 2  	 	 	FF	
-- 11!22s   
 
Nrg  )r   r   r   r9   rk  r1  r2  r   r   rh  )r   r   rj  re  r   r   r   )r   r  )rn  ro  rp  r  r   classmethodr   r-  r5  ru  r  r  r  r`  r  r{  r   r   r9   r9     s'       $  G$!# !# !# !#F    [84 4 4 4. . . .    X    X(* (* (* (*T& & & &.3 3 3 3 3 3r   r9   c            
          e Zd Zi ddddddddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+ZdCd.ZdDd1ZdEd4ZdFd8ZdGd;ZdHd>Z	dIdAZ
dBS )Jr:   r   r      	extrusionrG   rF      insert   text_directionr\   rb  rv   r'  r  defined_heightr   line_spacing_factorrK   line_spacing_stylerI   colorrQ   	alignmentr_   flow_directionrM   bg_color   bg_scale_factorrk   bg_transparencyrU   use_window_bg_colorhas_bg_fillcolumn_typeuse_auto_heightcolumn_widthcolumn_gutter_widthcolumn_flow_reversedcolumn_sizesuse_word_break)rm   rc   rz         r|      r   r   r   c                   d| _         t          | _        d| _        t          | _        t          | _        d| _        d| _	        d| _
        d| _        d| _        t          j        | _        d| _        d| _        t          j        | _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        g | _        d| _        d S )Nr   r           r  r#   g      ?r   )r   r   r  rF   r   r  r   r  rb  r'  r  r  r  r   BY_BLOCK_RAW_VALUEr  r  r  WINDOW_BG_RAW_VALUEr  r  r  r  r  r  r  r  r  r  r  r  r   s    r   r   zMTextData.__init__  s    $&%!$#$*"
%(*- '( 3
#$#7&)$%()  ! !$%#&*- )*!)+#$r   r)  r*  c                :    |                     | j                   dS r,  )r.  rF   r  s     r   r-  zMTextData.register_resources  s    D-.....r   r1  r2  c                D    |                     | j                  | _        dS r4  )r6  rF   rA  s     r   r5  zMTextData.map_resources  s!    #..t/@AAr   r   r   r   c                   |dk    r)| j                             t          |                     dS t          j                            |          }|r$|                     |t          ||                     t          |          S )Nr  T)	r  r   r  r:   r  r   r  r   r   r   r   r   r(  s       r   r  zMTextData.parse  sw    3;;$$U5\\2224"&&t,, 	>VZe%<%<===F||r   r  r1   c                   |j         }|j        } |dt          | j        t                                |d| j                    |dt          | j                              |d| j                    |d| j	                    |d| j
                    |d| j                    |d| j                    |d	| j                    |d
| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                    |d| j                   | j        D ]} |d|            |d| j                   d S )Nr   r  rG   r  r  r\   rv   r  r   rK   rI   rQ   r_   rM   r  rk   rU   rm   rc   rz   r  r  r|   r  r   )r  r  r    r   r   r  r"   rF   r  r  rb  r'  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  )r   r  r  r  sizes        r   r  zMTextData.export_dxf  sB   )
 -
3D$8/JJKKKR(((
3D$566777R%%%R,---
2t}%%%
2tz"""
2t*+++
2t/000
3/000
2tz"""
3'''
3+,,,
2t}%%%
3,---
2t+,,,
30111
3()))
3()))
3,---
3)***
30111
31222% 	" 	"DJsD!!!!
3+,,,,,r   re  r   c                f   |j         }t          | j        |          }|j        | _        |                    | j                  | _        |j                             | j        d          | _        |                    | j	                  | _	        |j
        t          j        d          st                    dk    rd S | xj        z  c_        | xj        z  c_        | xj        z  c_        | xj        z  c_        fd| j        D             | _        t'          | j                  | _        d S )NTr  r  rY  c                    g | ]}|z  S r{  r{  )r>  r  r   s     r   r@  z'MTextData.transform.<locals>.<listcomp>  s    HHHdTE\HHHr   )rW  r   r  new_extrusionr`  r  r  r  transform_anglerb  ra  mathr  r[  r'  r  r  r  r  r!   r   )r   re  rW  ocsr   s       @r   r`  zMTextData.transform  s2   E4>1--*kk$+..!e774 8 
 
 ++DM::!<s## 	s5zzU':':F

e

u$U"  E)  HHHHd6GHHH:4;OQVWWr   r  r  c                @   t          j        d          st                    dk    rd S | xj        z  c_        | xj        z  c_        | xj        z  c_        | xj        z  c_        fd| j        D             | _        t          | j	                  | _	        d S )Nr  rY  c                    g | ]}|z  S r{  r{  )r>  hr  s     r   r@  z5MTextData.apply_conversion_factor.<locals>.<listcomp>  s    NNNqQ!22NNNr   )
r  r  r[  r'  r  r  r  r  r!   r   r   r  s    `r   apply_conversion_factorz!MTextData.apply_conversion_factor  s    <)3// 	37H3I3IU3R3RF

''

00..  $55  NNNND<MNNN: "3 
  
r   Nrg  rk  r  r   r   r   r   rj  r  r  r  )rn  ro  rp  r  r   r-  r5  r  r  r`  r  r{  r   r   r:   r:   e  s       
K 	^ 	H	
 	 	J 	G 	 	! 	! 	G 	[ 	 	J 	  	!" 	"#$ "#3  G8% % % %6/ / / /B B B B   - - - -<X X X X*
 
 
 
 
 
r   r:   c                      e Zd ZdddddddZd#d
Zd$dZd%dZed&d            Zej	        d'd            Zd(dZ
d)dZd*dZd+d!Zd"S ),r;   rn   r  r  r   rb  r  )rO            .   rq   r   r   c                    d | _         t          | _        t          | _        t          ddd          | _        d| _        t          j	        | _
        g | _        d S )Nr#   r   )rn   r   r  r   r  r   r   rb  r   r  r  _matrixr   s    r   r   zBlockData.__init__  sG    26 %#1a==
  3
 %'r   r)  r*  c                :    |                     | j                   dS r,  )r.  rn   r  s     r   r-  zBlockData.register_resources  s    D455555r   r1  r2  c                V    | j         J |                    | j                   | _         dS r4  )rn   r6  rA  s     r   r5  zBlockData.map_resources	  s0    '333#*#5#5d6N#O#O   r   r   c                    t          | j                  dk    rt          | j                  }nt                      }|                                 |S )Nr  )r  r  r   	transposer   rW  s     r   matrix44zBlockData.matrix44  sC    t|""&&AA

A	r   rW  c                ~    |                                 }|                                 t          |          | _        d S r   )r   r  r  r  r  s     r   r  zBlockData.matrix44  s-    FFHH	Awwr   r   r   r   c                    t           j                            |          }|r%|                     |t	          ||                     n0|dk    r(| j                            t          |                     ndS dS )N/   FT)r;   r  r   r  r   r  r   r  r  s       r   r  zBlockData.parse  su    "&&t,, 	VZe%<%<====RZZLe----5tr   r  r1   c                   |j         }|j        }| j        r |d| j                   n |dd            |d| j                    |d| j                    |d| j                    |d| j                    |d| j                   | j        }t          |          dk    rt          t                                }|D ]} |d|           d S )	NrO   r   r  r  r  r  rq   r  )r  r  rn   r  r  r   rb  r  r  r  r  r   )r   r  r  r  rW  r   s         r   r  zBlockData.export_dxf(  s   )
 -# 	!JsD45555 JsC   R(((R%%%R$$$
2t}%%%
2tz"""Lq66R<<
 XZZ  A 	" 	"EJr5!!!!	" 	"r   re  r   c                .   |j         }t          | j        |          }|j        | _        |                    | j                  | _        |                    | j                  | _        |                    | j	                  | _	        | j
        |z  | _
        d S r   )rW  r   r  r  r`  r  transform_scale_vectorr   r  rb  r  )r   re  rW  r  s       r   r`  zBlockData.transform@  sy    E4>1--*kk$+..//
;;
++DM::)r   r  r  c                &    | xj         |z  c_         d S r   )r   r  s     r   r  z!BlockData.apply_conversion_factorJ  s    

''



r   Nrg  rk  r  )r   r   )rW  r   r   r   r  rj  r  r  )rn  ro  rp  r  r   r-  r5  ru  r  setterr  r  r`  r  r{  r   r   r;   r;     s       " G	' 	' 	' 	'6 6 6 6P P P P
    X _   _
	 	 	 	" " " "0* * * *( ( ( ( ( (r   r;   c                  V    e Zd ZddZedd            Zedd            ZddZddZ	dS )r<   r   r   c                    g | _         d| _        d| _        t          | _        t
          | _        d| _        d| _        d| _	        g | _
        d S )Nr   r  )lineshas_last_leader_linehas_dogleg_vectorr   last_leader_pointr   dogleg_vectorrV   r   attachment_directionbreaksr   s    r   r   zLeaderData.__init__P  sO    ')
 *+!&''.#)$'
 *+!"$r   r   c                ,    t          | j                   S r   )r   r  r   s    r   has_horizontal_attachmentz$LeaderData.has_horizontal_attachment`  s    12222r   r   r   c                @   |d         t           t          fk    sJ  |             }|D ]}t          |t                    r3|j                            t                              |                     J|\  }}|dk    r||_        ]|dk    r||_	        k|dk    rt          |          |_        |dk    rt          |          |_        |dk    r||_        |dk    r||_        |dk    r||_        |d	v r'|j                            t          |                     |S )
Nr   rS   rU   rs   r  r  rI   r   )r  r  )r   
LEADER_STRr   r  r  r   r=   r   r  r   r   r  r  rV   r   r  r  )r  r   r  r   r   r   s         r   r   zLeaderData.loadd  s9   qzlJ77777 	2 	2C#t$$ ##JOOC$8$8999KD%s{{.3+++0((+/;;(('+E{{$$',$$$.3++!!$$T%[[111r   r  r1   c                   |j         }|j        } |t          t                      |d| j                    |d| j                    |d| j                    |d| j                   d}| j        D ]} |d|z   |           d|z
  } |d| j	                    |d	| j
                   | j        D ]}|                    |           |j        t          j        k    r |d
| j                    |t"          d           d S )NrS   rU   rs   r  r   r  r#   rI   r  r   r  )r  r  r   r  r  r   r  r  r  r   rV   r  r  r}   r   r#  r  r   )r   r  r  r  r   vertexlines          r   r  zLeaderData.export_dxf  s=   )
 -
<,,,
31222
3.///R/000R+,,,k 	 	FLdF+++t8DD
2tz"""
2t)*** J 	' 	'DOOI&&&&5=00JsD5666
:s#####r   re  r   c                   |j         }|                    | j                  | _        	 |                    | j                            | j                            }n9# t          $ r, |                    t          | j        dd                    }Y nw xY w|                                | _        |j	        | _        t          |                    | j                            | _        | j        D ]}|                    |           d S Nr   )rW  r`  r  r  r  r  rV   r  r   	magnituder  transform_verticesr  r  )r   re  rW  dog_legleader_lines        r   r`  zLeaderData.transform  s   E!"T-C!D!D	L++",,T-?@@ GG ! 	L 	L 	L++D1CQ,J,JKKGGG	L$..00$.1//<<==: 	' 	'K!!#&&&&	' 	's   2A 3BBNrg  rh  )r   r   rj  r  )
rn  ro  rp  r   ru  r  r  r   r  r`  r{  r   r   r<   r<   O  s        % % % %  3 3 3 X3    [8$ $ $ $4' ' ' ' ' 'r   r<   c                  >    e Zd ZddZedd            Zdd	ZddZdS )r=   r   r   c                R    g | _         g | _        d| _        t          j        | _        d S r  )verticesr  r   r   r  r  r   s    r   r   zLeaderLine.__init__  s'    $&.0 
 3


r   r   r   c                b   |d         t           t          fk    sJ t                      }|j        }g }|D ]q\  }}|dk    r#|                    t          |                     .|dv r$|                    t          ||                     V|dk    r||_        d|dk    r||_        r|r||_	        |S )Nr   rs   )rI   r  r  rM   rk   )
r   r   r=   r  r   r   r   r   r  r  )r  r   r  r  r  r   r   s          r   r   zLeaderLine.load  s    Aw,o>>>>>||= 	# 	#KD%rzzU,,,,%%ju556666"

"
 	! DKr   r  r1   c                r   |j         }|j        } |t          t                     | j        D ]} |d|           | j        rBd}| j        D ]8}t          |t                    r |d|           $ |d|z   |           d|z
  }9 |d| j                    |d| j	                    |t          d           d S )	Nrs   r   rI   r  r#   rM   rk   r  )r  r  r   r   r  r  r   r   r   r  r   )r   r  r  r  r
  r   r   s          r   r  zLeaderLine.export_dxf  s    )
 -
$o666m 	% 	%FLV$$$$; 
	$D $ $eS)) $Jr5)))) !LdE222t8DD
2tz"""
2tz"""
?C(((((r   re  r   c                J   |j         }t          |                    | j                            | _        | j        rhg }| j        D ]U}t          |t                    r)|                    |                    |                     @|                    |           V|| _        d S d S r   )	rW  r  r  r  r  r   r   r   r`  )r   re  rW  r  r   s        r   r`  zLeaderLine.transform  s    EQ11$-@@AA; 	!-/F ) )eT** )MM!++e"4"45555MM%(((( DKKK	! 	!r   Nrg  )r   r   rj  r  )rn  ro  rp  r   r  r   r  r`  r{  r   r   r=   r=     sp        	4 	4 	4 	4    [$) ) ) ),
! 
! 
! 
! 
! 
!r   r=   AcDbMLeaderStyleunknown1draw_mleader_order_typedraw_leader_order_typemax_leader_segments_pointsfirst_segment_angle_constraintr  r  second_segment_angle_constraintr  r  r     Standardr  default_text_contentr   r~  text_align_always_leftr  align_spacer  has_block_scalingr   block_scale_xr  block_scale_y1   r  r  r  r  r  r  g      @i*  T)optional)block_scale_zhas_block_rotationru   rw   r   overwrite_property_valuery   break_gap_sizer   r   r   unknown2)rN   rY   r`   rn   c                       e Zd ZdZ eee          Zej	        Z
	 d'd( fdZd) fdZd* fdZd+dZej        dej        dfd,dZd-d.dZd/ fd!Zd0d#Zd1 fd&Z xZS )2r7   MLEADERSTYLENr   r   r   r.   c                    t                                          |          }|r|                    |t          d           |S )Nr#   )r   )r   r   r   acdb_mleader_style_group_codes)r   r   r   r   s      r   r   zMLeaderStyle.load_dxf_attribs9  sP     gg&&y11 	**3a +    
r   r)  r*  r   c                    t                                          |           | j        }t          D ]+}|                    |                    |d                     ,d S )Nr   )r   r-  r   MLEADER_STYLE_HANDLE_ATTRIBSr.  r   )r   r)  r   attrib_namer   s       r   r-  zMLeaderStyle.register_resourcesC  s`    ""8,,,h7 	; 	;KS 9 9::::	; 	;r   r0  r
   r1  r2  c           	     P   t                                          ||           | j        }t          D ]s}|                    |          rB|j                            ||                    |                    |                               Y|j                            |           td S r   )	r   r5  r   r4  hasattrsetr6  r   discard)r   r0  r1  r   r5  r   s        r   r5  zMLeaderStyle.map_resourcesI  s    eW---h7 	/ 	/K{{;'' /	k7+=+=cggk>R>R+S+STTTT	!!+....		/ 	/r   r  r   c                    | j         
J d            | j         j                            |          }||j        j        | j        _        d S t          d| d          )Nr   ztext style 'z' does not exist)r   stylesr   r   r   r`   
ValueError)r   r  styles      r   set_mtext_stylezMLeaderStyle.set_mtext_styleR  se    x##%B#####D))).)9DH&&&BDBBBCCCr   BYBLOCKr#   r  Union[int, colors.RGB]linetype
lineweightr   rJ   c                \   | j         
J d            t          j        |          | j        _        | j         j                            |          }|t          d| d          |j        j        | j        _	        t          |          | j        _        t          |          | j        _        d S )Nr   zinvalid linetype name '')r   r   encode_raw_colorr   rL   	linetypesr   r<  r   rN   r   rP   rJ   )r   r  rA  rB  rJ   	linetype_s         r   set_leader_propertiesz"MLeaderStyle.set_leader_propertiesZ  s     x##%B###%+%<U%C%C"H&**844	BxBBBCCC*3-*>'%(__"";//r   r   c                    ddl m} | j        
J d            |r,|                    | j        j        |          | j        _        d S | j        `d S )Nr   )ARROWSr   )ezdxf.render.arrowsrJ  r   arrow_handleblocksr   rY   )r   r  rJ  s      r   set_arrow_headzMLeaderStyle.set_arrow_headj  sg    ......x##%B### 	+)/)<)<TX_d)S)SDH&&& ***r   r  r1   c                   t                                          |           |                    t          j        t
          j                   | j                            |t
          j	        
                                           d S r   )r   r  r  r   SUBCLASS_MARKERacdb_mleader_styler  r   export_dxf_attribsr  keys)r   r  r   s     r   r  zMLeaderStyle.export_entityu  sf    i(((U24F4KLLL##I/A/I/N/N/P/PQQQQQr   rS  c              #  V   K   dD ]#}| j                             |d          }||V  $dS rU  )r   r   )r   r  r   s      r   rV  z"MLeaderStyle.__referenced_blocks__z  sD      @ 	 	DX\\$--F!	 	r   auditorr,   c           	        ddl m} | j        sd S t                                          |           |j        }| j        }t          |           }|                    dd           }|||vr|j	        j
                            d          }|9|j        j        | j        _        |                    |j        | d| d|            nUt                              d           | j                            d           |                    |j        | d| |            d	D ]]}|                    |          }||d
k    r ||vr9|                    |           |                    |j        | d| d| |            ^d S )Nr   )
AuditErrorr`   r!  z: text_style_handle=z0 is not valid, replaced by 'Standard' text stylez-required text style 'Standard' does not existz$: removed invalid text_style_handle=)rY   rn   r   z: removed invalid =)ezdxf.auditrW  is_aliver   auditr   r   r   r   r   r;  r   r`   fixed_errorUNDEFINED_TEXT_STYLEr   warningr9  UNDEFINED_BLOCK)
r   rU  rW  r   r   r  r   standardr(  r   s
            r   r[  zMLeaderStyle.audit  s   ******} 	Fg#h4yy,d33&"8"8{)--j99H#-5\-@*##3 - - - - -	    NOOO  !4555##3IIII  
 C 
	 
	FWWV__F~3X%%F#####.@@v@@@@  
	 
	r   r   ri  rk  rl  )r  r   r   r   )r  r@  rA  r   rB  r   rJ   r   )r   )r  r   rj  rm  )rU  r,   r   r   )rn  ro  rp  rq  r   r$   rQ  rr  r   rs  rt  r   r-  r5  r>  r   r?  LINEWEIGHT_BYBLOCKrH  rN  r  rV  r[  rw  rx  s   @r   r7   r7   3  sU       Gz+=>>J!& 8<      ; ; ; ; ; ;/ / / / / /D D D D )/!20 0 0 0 0 	+ 	+ 	+ 	+ 	+R R R R R R
   & & & & & & & & & &r   r7   c                  (     e Zd Zd fdZddZ xZS )	r8   r   r-   c                x    t                                          |dd           |                                  d S )NACAD_MLEADERSTYLEr0  )	dict_nameobject_type)r   r   create_required_entries)r   r   r   s     r   r   zMLeaderStyleCollection.__init__  s;    (;XXX$$&&&&&r   r   r   c                    d| vrL|                      d          }| j        j                            d          }|j        j        |j        _        d S d S )Nr!  )newr   r;  r   r   r   r`   )r   mleader_style
text_styles      r   rg  z.MLeaderStyleCollection.create_required_entries  sS    T!! HHZ00M,,Z88J2<.2GM///	 "!r   )r   r-   rg  )rn  ro  rp  r   rg  rw  rx  s   @r   r8   r8     sY        ' ' ' ' ' 'H H H H H H H Hr   r8   )r   r   r   r   r   r   )p
__future__r   typingr   r   r   r   r   r	   typing_extensionsr
   r   loggingr  collectionsr   ezdxf.lldxfr   ezdxf.lldxf.typesr   ezdxf.lldxf.attributesr   r   r   r   r   ezdxf.lldxf.tagsr   ezdxf.lldxf.constr   
ezdxf.mathr   r   r   r   r   r   r   r   r   r@   r   ezdxf.proxygraphicr   ezdxf.tools.textr    r!   ezdxf.tools.handler"   	dxfentityr$   r%   dxfobjr&   dxfgfxr'   r(   factoryr)   objectcollectionr*   r+   rY  r,   ezdxf.documentr-   ezdxf.entitiesr.   r/   ezdxf.layoutsr0   ezdxf.lldxf.tagwriterr1   r2   ezdxf.queryr3   r4   __all__	getLoggerr   r  ra  point3dr   r#  r$  r  r   r  r  r   r   r   r   r   r   r   r   r>   r?   r5   r6   r9   r:   r;   r<   r=   rQ  r2  r4  r7   r8   r{  r   r   <module>r     sg   # " " " " " J J J J J J J J J J J J J J J J " " " " " "    " " " " " "       ( ( ( ( ( (              " ! ! ! ! ! - - - - - -
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
       0 0 0 0 0 0 E E E E E E E E * * * * * * 4 4 4 4 4 4 4 4       + + + + + + + + $ $ $ $ $ $ . . . . . .       ######&&&&&&66666666((((((777777((((((''''''   
	7	#	# {|773***||
 	"772;;|R 	wwsA...S|T 	WWR1JKKKU|V 	!''#,,W|X 	WWS%2JKKKY|Z 	wwsA...[|\ 	ggc1---]|^ 	Q///_|b 	WWS\\c|f 	772q111g|h 	Q///i|t 	WWS\\u|v 	$WWS!%<%<%<w|P 	%ggb!&<&<&<Q|R 	773222S| |\ 	wwsA666]|^ 	ggb&*CDDD_|` 	''#q111a|d 	wws||e|f 	wwr6+DEEEg|h 	ggbttAqRS}}UUUi|j 	''"a000k|l 	 a!8!8!8m|r 	a000s|J 	%ggc1&W&W&WK|L 	''#qU]KKKM|N 	 aEM!R!R!RO|V 	Q5=AAAW|` 	$WWS!%V%V%Va|h 	&wwu}(
 (
 (
i|t 	#GGCu}$U$U$Uu|v 	 aEM!R!R!Rw| | Z .-l;; 
   
 2 2 2 2, 
?O<<Z&BCC
 a" a" a" a" a"* a" a" a"H     k   u3 u3 u3 u3 u3 u3 u3 u3pH
 H
 H
 H
 H
 H
 H
 H
V\( \( \( \( \( \( \( \(~Y' Y' Y' Y' Y' Y' Y' Y'x@! @! @! @! @! @! @! @!F ![7GGC+++7Q///7 	"773#:#:#:7 	!''#q"9"9"9	7
 	%ggb!&<&<&<7 	)''"c*B*B*B7 	*772s+C+C+C7 	wwsA...7 	WWR1JKKK7 	!''#,,7 	WWR4447  	wwsA...!7" 	GGB444#7$ 	ggc1---%7& 	Q///'7( 	:...)7, 	WWS\\-7 7. 	772q111/70 	R 8 8 8172 	WWS\\374 	$WWS!%<%<%<576 	773222778 	wwsA66697: 	%ggc1&=&=&=;7< 	ggb&*CDDD=7> 	wwr1---?7@ 	''#q111A7B 	!''#q"9"9"9C7D 	wwr1---E7F 	WWS\\G7H 	wws||I7J 	wwr6+DEEEK7L 	Q///M7N 	Q///O7 7P !a000%gc1555!'#q111!(a!8!8!8a((($+GC$;$;$; a000!'#t444%,WS!%<%<%<'.wsA'>'>'>$+GC$;$;$;GC$///m7 7 7: : v "4!34F!G!G    s s s s s9 s s sl
H 
H 
H 
H 
H-l; 
H 
H 
H 
H 
Hr   