ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
abc           @` sh  d  d l  m Z m Z m Z d  d l m Z d d l m Z m Z m	 Z	 d Z i e e  e f d 6e e e e	 d d f g  B e f d 6e e e e	 d d f e	 d d f g  B e f d	 6e e	 d d f e	 d d
 f g  e f d
 6e e	 d d f e	 d d f g  e f d 6Z d e f d     YZ d e f d     YZ d e f d     YZ d S(   i    (   t   absolute_importt   divisiont   unicode_literals(   t	   text_typei   (   t   scopingElementst   tableInsertModeElementst
   namespacesu   htmlu   buttonu   olu   ulu   listu   tableu   optgroupu   optionu   selectt   Nodec           B` se   e  Z d    Z d   Z d   Z d   Z d
 d  Z d   Z d   Z	 d   Z
 d   Z d	   Z RS(   c         C` s:   | |  _  d |  _ d |  _ i  |  _ g  |  _ g  |  _ d S(   u6  Node representing an item in the tree.
        name - The tag name associated with the node
        parent - The parent of the current node (or None for the document node)
        value - The value of the current node (applies to text nodes and
        comments
        attributes - a dict holding name, value pairs for attributes of the node
        childNodes - a list of child nodes of the current node. This must
        include all elements but not necessarily other node types
        _flags - A list of miscellaneous flags that can be set on the node
        N(   t   namet   Nonet   parentt   valuet
   attributest
   childNodest   _flags(   t   selfR   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   __init__   s    					c         C` sa   d j  g  |  j j   D] \ } } d | | f ^ q  } | rR d |  j | f Sd |  j Sd  S(   Nu    u   %s="%s"u   <%s %s>u   <%s>(   t   joinR   t   itemsR   (   R   R   R   t   attributesStr(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   __str__*   s
    	2c         C` s   d |  j  S(   Nu   <%s>(   R   (   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   __repr__3   s    c         C` s
   t   d S(   u3   Insert node as a child of the current node
        N(   t   NotImplementedError(   R   t   node(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   appendChild6   s    c         C` s
   t   d S(   u   Insert data as text in the current node, positioned before the
        start of node insertBefore or to the end of the node's text.
        N(   R   (   R   t   datat   insertBefore(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt
   insertText;   s    c         C` s
   t   d S(   u   Insert node as a child of the current node, before refNode in the
        list of child nodes. Raises ValueError if refNode is not a child of
        the current nodeN(   R   (   R   R   t   refNode(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR   A   s    c         C` s
   t   d S(   u:   Remove node from the children of the current node
        N(   R   (   R   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   removeChildG   s    c         C` s.   x |  j  D] } | j |  q
 Wg  |  _  d S(   u   Move all the children of the current node to newParent.
        This is needed so that trees that don't store text as nodes move the
        text in the correct way
        N(   R   R   (   R   t	   newParentt   child(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   reparentChildrenL   s    c         C` s
   t   d S(   u   Return a shallow copy of the current node i.e. a node with the same
        name and attributes but with no parent or child nodes
        N(   R   (   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt	   cloneNodeV   s    c         C` s
   t   d S(   uF   Return true if the node has children or text, false otherwise
        N(   R   (   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt
   hasContent\   s    N(   t   __name__t
   __module__R   R   R   R   R	   R   R   R   R    R!   R"   (    (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR      s   								
	t   ActiveFormattingElementsc           B` s   e  Z d    Z d   Z RS(   c         C` s   d } | t  k r xj |  d  d  d  D]R } | t  k r< Pn  |  j | |  r[ | d 7} n  | d k r& |  j |  Pq& q& Wn  t j |  |  d  S(   Ni    ii   i   (   t   Markert
   nodesEqualt   removet   listt   append(   R   R   t
   equalCountt   element(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR*   c   s    c         C` s0   | j  | j  k s t S| j | j k s, t St S(   N(   t	   nameTuplet   FalseR   t   True(   R   t   node1t   node2(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR'   p   s
    (   R#   R$   R*   R'   (    (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR%   b   s   	t   TreeBuilderc           B` s   e  Z d  Z d Z d Z d Z d Z d Z d   Z	 d   Z
 d d  Z d   Z d   Z d   Z d   Z d   Z d d	  Z d
   Z d   Z d   Z e e e  Z d   Z d   Z d d  Z d   Z d d  Z d   Z d   Z d   Z RS(   u  Base treebuilder implementation
    documentClass - the class to use for the bottommost node of a document
    elementClass - the class to use for HTML Elements
    commentClass - the class to use for comments
    doctypeClass - the class to use for doctypes
    c         C` s)   | r d |  _  n	 d  |  _  |  j   d  S(   Nu   http://www.w3.org/1999/xhtml(   t   defaultNamespaceR	   t   reset(   R   t   namespaceHTMLElements(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR      s    	c         C` sC   g  |  _  t   |  _ d  |  _ d  |  _ t |  _ |  j   |  _	 d  S(   N(
   t   openElementsR%   t   activeFormattingElementsR	   t   headPointert   formPointerR.   t   insertFromTablet   documentClasst   document(   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR4      s    				c         C` s   t  | d  } | s: t | t  r: t d | f } q: n  t | \ } } x^ t |  j  D]M } | rv | | k rv t S| r | j | k r t S| | j | k ArZ t	 SqZ Wd  S(   Nu	   nameTupleu   html(
   t   hasattrt
   isinstanceR   R   t   listElementsMapt   reversedR6   R/   R-   R.   (   R   t   targett   variantt	   exactNodet   listElementst   invertR   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   elementInScope   s    c         C` s'  |  j  s d  St |  j   d } |  j  | } | t k sH | |  j k rL d  SxL | t k r | |  j k r | d k r d } Pn  | d 8} |  j  | } qO Wx t r"| d 7} |  j  | } | j   } |  j i d d 6| j d 6| j d 6| j	 d 6 } | |  j  | <| |  j  d k r Pq q Wd  S(	   Ni   i    iu   StartTagu   typeu   nameu	   namespaceu   data(
   R7   t   lenR&   R6   R/   R!   t   insertElementR   t	   namespaceR   (   R   t   it   entryt   cloneR,   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt#   reconstructActiveFormattingElements   s.    	
	


c         C` s>   |  j  j   } x( |  j  r9 | t k r9 |  j  j   } q Wd  S(   N(   R7   t   popR&   (   R   RK   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   clearActiveFormattingElements   s    c         C` sH   xA |  j  d d d  D]) } | t k r- Pq | j | k r | Sq Wt S(   u   Check if an element exists between the end of the active
        formatting elements and the last marker. If it does, return it, else
        return falseNi(   R7   R&   R   R.   (   R   R   t   item(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt!   elementInActiveFormattingElements   s    c         C` s3   |  j  |  } |  j j |  |  j j |  d  S(   N(   t   createElementR6   R*   R<   R   (   R   t   tokenR,   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt
   insertRoot   s    c         C` sG   | d } | d } | d } |  j  | | |  } |  j j |  d  S(   Nu   nameu   publicIdu   systemId(   t   doctypeClassR<   R   (   R   RS   R   t   publicIdt   systemIdt   doctype(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   insertDoctype  s
    


c         C` s:   | d  k r |  j d } n  | j |  j | d   d  S(   Niu   data(   R	   R6   R   t   commentClass(   R   RS   R
   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   insertComment	  s    c         C` sB   | d } | j  d |  j  } |  j | |  } | d | _ | S(   u.   Create an element but don't insert it anywhereu   nameu	   namespaceu   data(   t   getR3   t   elementClassR   (   R   RS   R   RI   R,   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyRR     s
    
c         C` s   |  j  S(   N(   t   _insertFromTable(   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   _getInsertFromTable  s    c         C` s.   | |  _  | r |  j |  _ n |  j |  _ d S(   us   Switch the function used to insert an element from the
        normal one to the misnested table one and back againN(   R^   t   insertElementTableRH   t   insertElementNormal(   R   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   _setInsertFromTable  s    	c         C` sf   | d } | j  d |  j  } |  j | |  } | d | _ |  j d j |  |  j j |  | S(   Nu   nameu	   namespaceu   datai(   R\   R3   R]   R   R6   R   R*   (   R   RS   R   RI   R,   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyRa   $  s    
c         C` s   |  j  |  } |  j d j t k r2 |  j |  S|  j   \ } } | d k r` | j |  n | j | |  |  j j	 |  | S(   u-   Create an element and insert it into the treeiN(
   RR   R6   R   R   Ra   t   getTableMisnestedNodePositionR	   R   R   R*   (   R   RS   R,   R
   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR`   .  s    c         C` s{   | d k r |  j d } n  |  j sE |  j rU |  j d j t k rU | j |  n" |  j   \ } } | j | |  d S(   u   Insert text data.iN(   R	   R6   R:   R   R   R   Rc   (   R   R   R
   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR   >  s    	c         C` s   d } d } d } x7 |  j d d d  D] } | j d k r) | } Pq) q) W| r | j rm | j } | } q |  j |  j j |  d } n |  j d } | | f S(   us   Get the foster parent element, and sibling to insert before
        (or None) when inserting a misnested table nodeNiu   tablei   i    (   R	   R6   R   R
   t   index(   R   t	   lastTablet   fosterParentR   t   elm(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyRc   M  s    			c      
   C` sO   |  j  d j } | t d
  k rK | | k rK |  j  j   |  j |  n  d  S(   Niu   ddu   dtu   liu   optionu   optgroupu   pu   rpu   rt(   u   ddu   dtu   liu   optionu   optgroupu   pu   rpu   rt(   R6   R   t	   frozensetRN   t   generateImpliedEndTags(   R   t   excludeR   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyRi   g  s
    c         C` s   |  j  S(   u   Return the final tree(   R<   (   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   getDocumentq  s    c         C` s$   |  j    } |  j d j |  | S(   u   Return the final fragmenti    (   t   fragmentClassR6   R    (   R   t   fragment(    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   getFragmentu  s    c         C` s
   t   d S(   uz   Serialize the subtree of node in the format required by unit tests
        node - the node from which to start serializingN(   R   (   R   R   (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   testSerializer|  s    N(   R#   R$   t   __doc__R	   R;   R]   RZ   RU   Rl   R   R4   RF   RM   RO   RQ   RT   RY   R[   RR   R_   Rb   t   propertyR:   Ra   R`   R   Rc   Ri   Rk   Rn   Ro   (    (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyR2   z   s6   			.									
		
		N(   t
   __future__R    R   R   t   pip._vendor.sixR   t	   constantsR   R   R   R	   R&   Rh   R.   t   setR/   R?   t   objectR   R)   R%   R2   (    (    (    sJ   /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.pyt   <module>   s   *! K