r2Wc@`sddlmZmZmZddlmZddlZddlmZddlm Z ddlm Z ddl m Z dd lm Z dd lmZdd lmZmZdd lmZdd lmZddlmZmZddlmZmZmZddlmZmZddlmZddlmZdeedZddeedZ dZ!de"fdYZ#dZ$dee%dZ&de'fdYZ(dS(i(tabsolute_importtdivisiontunicode_literals(twith_metaclassNi(t inputstream(t tokenizer(t treebuilders(tMarker(tutils(t constants(tspaceCharacterstasciiUpper2Lower(tspecialElements(theadingElements(t cdataElementstrcdataElements(t tokenTypestReparseExceptiont namespaces(thtmlIntegrationPointElementst"mathmlTextIntegrationPointElements(tadjustForeignAttributes(tEuetreecC`s4tj|}t|d|}|j|d|S(u.Parse a string or file-like object into a treetnamespaceHTMLElementstencoding(RtgetTreeBuildert HTMLParsertparse(tdoct treebuilderRRttbtp((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRsudivcC`s:tj|}t|d|}|j|d|d|S(NRt containerR(RRRt parseFragment(RR RRRRR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR! sc`s dtffdY}|S(Nt Decoratedc`seZfdZRS(c`s^xE|jD]7\}}t|tjr:|}n|||dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6}xXt|d}jD]@}||kr||}|d}||d}|<|d}|=qqWdS(~Nu attributeNameu attributenameu attributeTypeu attributetypeu baseFrequencyu basefrequencyu baseProfileu baseprofileucalcModeucalcmodeu clipPathUnitsu clippathunitsucontentScriptTypeucontentscripttypeucontentStyleTypeucontentstyletypeudiffuseConstantudiffuseconstantuedgeModeuedgemodeuexternalResourcesRequireduexternalresourcesrequiredu filterResu filterresu filterUnitsu filterunitsuglyphRefuglyphrefugradientTransformugradienttransformu gradientUnitsu gradientunitsu kernelMatrixu kernelmatrixukernelUnitLengthukernelunitlengthu keyPointsu keypointsu keySplinesu keysplinesukeyTimesukeytimesu lengthAdjustu lengthadjustulimitingConeAngleulimitingconeangleu markerHeightu markerheightu markerUnitsu markerunitsu markerWidthu markerwidthumaskContentUnitsumaskcontentunitsu maskUnitsu maskunitsu numOctavesu numoctavesu pathLengthu pathlengthupatternContentUnitsupatterncontentunitsupatternTransformupatterntransformu patternUnitsu patternunitsu pointsAtXu pointsatxu pointsAtYu pointsatyu pointsAtZu pointsatzu preserveAlphau preservealphaupreserveAspectRatioupreserveaspectratiouprimitiveUnitsuprimitiveunitsurefXurefxurefYurefyu repeatCountu repeatcountu repeatDuru repeatdururequiredExtensionsurequiredextensionsurequiredFeaturesurequiredfeaturesuspecularConstantuspecularconstantuspecularExponentuspecularexponentu spreadMethodu spreadmethodu startOffsetu startoffsetu stdDeviationu stddeviationu stitchTilesu stitchtilesu surfaceScaleu surfacescaleusystemLanguageusystemlanguageu tableValuesu tablevaluesutargetXutargetxutargetYutargetyu textLengthu textlengthuviewBoxuviewboxu viewTargetu viewtargetuxChannelSelectoruxchannelselectoruyChannelSelectoruychannelselectoru zoomAndPanu zoomandpanudata(tlisttkeys(R;RyRt originalNametsvgName((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytadjustSVGAttributess   cC`s_t}xR|djD]@}||kr||}|d||d|<|d|=qqWdS(Nudata(tadjustForeignAttributesMapR(R;RyRRt foreignName((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR\s   cC`s|jjdS(N(RBRT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytreparseTokenNormalescC`s?t}idd6dd6dd6dd6dd 6dd 6dd 6d d 6dd6dd6dd6dd6dd6dd6}x|jjdddD]}|j}d}||jjdkrt}|j}n|dkrn| r|j|jjkrqn||kr|j ||}Pq|r|j d}PqqW||_ dS(NuinSelectuselectuinCellutduthuinRowutru inTableBodyutbodyutheadutfootu inCaptionucaptionu inColumnGroupucolgroupuinTableutableuinBodyuheadubodyu inFramesetuframesetu beforeHeaduhtmlii(uselectucolgroupuheaduhtml( RKR5RdR=R4RERHR]RhR:RT(R;tlasttnewModestnodetnodeNamet new_phase((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRVhsB       cC`sc|jj||dkr1|jj|j_n|jj|j_|j|_|jd|_dS(uYGeneric RCDATA/RAWTEXT Parsing algorithm contentType - RCDATA or RAWTEXT uRAWTEXTutextN( R5t insertElementRRRRQRPRTt originalPhaseR:(R;Ryt contentType((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytparseRCDataRawtexts   N(R0R1t__doc__R4Rt HTMLTokenizerRKRER?RJRDtpropertyR\RaRbRFRcRR!ReRRRRRRVR(((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR3s,  "  @    G  ,c`s1d}d}dt|||fdYdfdY}dfdY}d ffd Y}d ffd Y}d ffdY}dffdY}dffdY} dffdY} dffdY} dffdY} dffdY} dffdY}dffdY}dffd Y}d!ffd"Y}d#ffd$Y}d%ffd&Y}d'ffd(Y}d)ffd*Y}d+ffd,Y}d-ffd.Y}d/ffd0Y}i|d16|d26|d36|d46|d56|d66| d76| d86| d96| d:6| d;6|d<6|d=6|d>6|d?6|d@6|dA6|dB6|dC6|dD6|dE6|dF6S(GNc`s5tdtjjDfd}|S(u4Logger that records which phase processes each tokencs`s!|]\}}||fVqdS(N((t.0tkeytvalue((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pys sc`sjjdrt|dkr|d}yi|dd6}Wn nX|dtjkrx|d|dscS`s6t|j_|jj||jjd|j_dS(NuinBody(RKRBRYR5RR:RT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRAs cS`s*|jj||jjd|j_dS(Nu inFrameset(R5RRBR:RT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRFscS`s|jjdi|dd6|jjj|jj|jjdj|xG|jjdddD],}|jdkrh|jjj |PqhqhWdS(Nu#unexpected-start-tag-out-of-my-headunameuinHeadiuhead( RBReR5RdRpRR:RlR=tremove(R;RyR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRJs  cS`s"|jjdi|dd6dS(Nuunexpected-start-taguname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRTscS`s|j|S(N(R(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRWs cS`s|j|S(N(R(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR[s cS`s"|jjdi|dd6dS(Nuunexpected-end-taguname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR_scS`s?|jjtdd|jjd|j_t|j_dS(NubodyuStartTaguinBody(R5RRRBR:RTRERY(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRbs(R0R1R?RqRjRRRRRRRRR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR$s         t InBodyPhasec`seZfdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3RS(2c+`s]j||||j|_tjd|jfdd|jfd |jfd |jfde|j ft |j fdf|j fd&|j fdg|jfd*|jfd+|jfdh|jfd8|jfd9|jfdi|jfd=|jfd>|jfdj|jfdk|jfdH|jfdI|jfdJ|jfdK|jfdL|jfdM|jfdl|jfdQ|j fdm|j!fdn|j"fdV|j#fdW|j$fdo|j%fg |_&|j'|j&_(tjd |j)fd|j*fdp|j+fd&|j,fd |j-fdq|j.ft |j/fdr|j0fds|j1fd@|j2fg |_3|j4|j3_(dS(tNuhtmlubaseubasefontubgsounducommandulinkumetauscriptustyleutitleubodyuframesetuaddressuarticleuasideu blockquoteucenterudetailsudirudivudlufieldsetu figcaptionufigureufooteruheaderuhgroupumainumenuunavuolupusectionusummaryuulupreulistinguformuliuddudtu plaintextuaububigucodeuemufontuiususmallustrikeustronguttuuunobrubuttonuappletumarqueeuobjectuxmputableuareaubruembeduimgukeygenuwbruparamusourceutrackuinputuhruimageuisindexutextareauiframeunoembedunoframesunoscriptuselecturpurtuoptionuoptgroupumathusvgucaptionucolucolgroupuframeuheadutbodyutdutfootuthutheadutrudialog( ubaseubasefontubgsounducommandulinkumetauscriptustyleutitle(uaddressuarticleuasideu blockquoteucenterudetailsudetailsudirudivudlufieldsetu figcaptionufigureufooteruheaderuhgroupumainumenuunavuolupusectionusummaryuul(upreulisting(uliuddudt( ububigucodeuemufontuiususmallustrikeustronguttuu(uappletumarqueeuobject(uareaubruembeduimgukeygenuwbr(uparamusourceutrack(unoembedunoframesunoscript(urpurt(uoptionuoptgroup( ucaptionucolucolgroupuframeuheadutbodyutdutfootuthutheadutr(uaddressuarticleuasideu blockquoteubuttonucenterudetailsudialogudirudivudlufieldsetu figcaptionufigureufooteruheaderuhgroupulistingumainumenuunavuolupreusectionusummaryuul(uddudtuli(uaububigucodeuemufontuiunobrususmallustrikeustronguttuu(uappletumarqueeuobject(5R?RktprocessSpaceCharactersNonPreRRRtstartTagProcessInHeadRRtstartTagClosePR tstartTagHeadingtstartTagPreListingt startTagFormtstartTagListItemtstartTagPlaintextt startTagAtstartTagFormattingt startTagNobrtstartTagButtontstartTagAppletMarqueeObjectt startTagXmpt startTagTabletstartTagVoidFormattingtstartTagParamSourcet startTagInputt startTagHrt startTagImagetstartTagIsIndextstartTagTextareatstartTagIFrametstartTagRawtexttstartTagSelectt startTagRpRtt startTagOptt startTagMatht startTagSvgtstartTagMisplacedRRRt endTagBodyt endTagHtmlt endTagBlockt endTagFormtendTagPtendTagListItemt endTagHeadingtendTagFormattingtendTagAppletMarqueeObjecttendTagBrRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?js|                                         cS`s|j|jks$|j|jkr(tSt|jt|jkrJtSt|jj}t|jj}x-t||D]\}}||krtSqWtS(N( R=R]RKRgR^tsortedR#tzipRE(R;tnode1tnode2t attributes1t attributes2tattr1tattr2((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytisMatchingFormattingElements$ cS`s|jj||jjd}g}xS|jjdddD]8}|tkrVPq@|j||r@|j|q@q@Wt|dkr|jjj|dn|jjj|dS(Nii( R5RRdtactiveFormattingElementsRR RpRgR(R;RyR`tmatchingElementsR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytaddFormattingElements  c S`sWtd}xD|jjddd D])}|j|kr&|jjdPq&q&WdS(Nuddudtuliuputbodyutdutfootuthutheadutrubodyuhtmliu expected-closing-tag-but-got-eof( uddudtuliuputbodyutdutfootuthutheadutrubodyuhtml(RiR5RdR=RBRe(R;tallowed_elementsR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRqs  cS`s|d}|j|_|jdrb|jjdjdkrb|jjdj rb|d}n|r|jj|jj|ndS( Nudatau iupreulistingutextareai(upreulistingutextarea( RRkRR5RdR=t hasContentt#reconstructActiveFormattingElementsR(R;RyR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyt!processSpaceCharactersDropNewlines    cS`s}|ddkrdS|jj|jj|d|jjrytg|dD]}|tk^qOryt|j_ndS(Nudatau(R5RRRBRYtanyR RK(R;Rytchar((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjs  #cS`s%|jj|jj|ddS(Nudata(R5RR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRks cS`s|jjdj|S(NuinHead(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRscS`s|jjdidd6t|jjdks|jjdjdkrNn`t|j_xQ|djD]?\}}||jjdj krk||jjdj |scS`s4|j|jj||jjd|j_dS(Nu inTableBody(RDR5RRBR:RT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?s cS`s|jtdd|S(NutbodyuStartTag(R?R(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR@scS`sN|jjdidd6dd6|jjjtd|jjsJ|SdS(Nu$unexpected-start-tag-implies-end-tagutableu startNameuendName(RBReRTRmRRH(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs   cS`s|jjdj|S(NuinHead(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRAscS`sqd|dkr`|ddjtdkr`|jjd|jj||jjjn |j|dS(Nutypeudatauhiddenu unexpected-hidden-input-in-table( R_R RBReR5RRdRR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs cS`s_|jjd|jjdkr[|jj||jjd|j_|jjjndS(Nuunexpected-form-in-tablei(RBReR5RR4RRdR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs cS`sQ|jjdi|dd6t|j_|jjdj|t|j_dS(Nu)unexpected-start-tag-implies-table-voodoounameuinBody(RBReRER5RER:RlRK(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs cS`s|jjdddr|jj|jjdjdkro|jjdidd6|jjdjd6nx-|jjdjdkr|jjjqrW|jjj|jjn |jjdS(NutableRiuend-tag-too-early-namedugotNameu expectedName( R5RR$RdR=RBReRRV(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRBs   cS`s"|jjdi|dd6dS(Nuunexpected-end-taguname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRCscS`sQ|jjdi|dd6t|j_|jjdj|t|j_dS(Nu'unexpected-end-tag-implies-table-voodoounameuinBody(RBReRER5RER:RmRK(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs (R0R1R?RDRqRkRjRR<R=R>R?R@RRARRRRBRCR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR;\s&               tInTableTextPhasec`sVeZfdZdZdZdZdZdZdZdZ RS(c`s)j|||d|_g|_dS(N(R?R4RtcharacterTokens(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?s cS`sdjg|jD]}|d^q}tg|D]}|tk^q3ritdd6|d6}|jjdj|n|r|jj|ng|_dS(Nuudatau CharactersutypeuinTable( tjoinRGRR RRBR:RR5(R;R'RRy((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytflushCharacterss)%cS`s|j|j|j_|S(N(RIRRBRT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRns cS`s|j|j|j_tS(N(RIRRBRTRE(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRqs cS`s(|ddkrdS|jj|dS(Nudatau(RGRp(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjscS`s|jj|dS(N(RGRp(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRk scS`s|j|j|j_|S(N(RIRRBRT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRls cS`s|j|j|j_|S(N(RIRRBRT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRms ( R0R1R?RIRnRqRjRkRlRm((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRFs     tInCaptionPhasec`sheZfdZdZdZdZdZdZdZdZ dZ d Z RS( c `sj|||tjd|jfd |jfg|_|j|j_tjd|jfd |j fd|j fg|_ |j |j _dS(Nuhtmlucaptionucolucolgrouputbodyutdutfootuthutheadutrutableubody( ucaptionucolucolgrouputbodyutdutfootuthutheadutr( ubodyucolucolgroupuhtmlutbodyutdutfootuthutheadutr( R?RRRtstartTagTableElementRRRt endTagCaptionRBRCRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?s   cS`s|jjddd S(NucaptionRutable(R5R(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytignoreEndTagCaption.scS`s|jjdjdS(NuinBody(RBR:Rq(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRq1scS`s|jjdj|S(NuinBody(RBR:Rj(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRj4scS`s@|jj|j}|jjjtd|s<|SdS(Nucaption(RBReRMRTRmR(R;Ryt ignoreEndTag((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRK7s   cS`s|jjdj|S(NuinBody(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?scS`s|js|jj|jjdjdkrc|jjdidd6|jjdjd6nx-|jjdjdkr|jjjqfW|jjj|jj|jj d|j_ n |jjdS(Niucaptionu$expected-one-end-tag-but-got-anotherugotNameu expectedNameuinTable( RMR5R$RdR=RBReRR8R:RT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRLBs     cS`s@|jj|j}|jjjtd|s<|SdS(Nucaption(RBReRMRTRmR(R;RyRN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRBTs   cS`s"|jjdi|dd6dS(Nuunexpected-end-taguname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRC[scS`s|jjdj|S(NuinBody(RBR:Rm(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR^s( R0R1R?RMRqRjRKRRLRBRCR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRJs        tInColumnGroupPhasec`s_eZfdZdZdZdZdZdZdZdZ dZ RS( c`sj|||tjd|jfd|jfg|_|j|j_tjd|jfd|j fg|_ |j |j _dS(Nuhtmlucolucolgroup( R?RRRR>RRRtendTagColgroupt endTagColRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?ds  cS`s|jjdjdkS(Niuhtml(R5RdR=(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytignoreEndTagColgroupsscS`sJ|jjdjdkrdS|j}|jtd|sFtSdS(Niuhtmlucolgroup(R5RdR=RRRPRRE(R;RN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRqvs  cS`s-|j}|jtd|s)|SdS(Nucolgroup(RRRPR(R;RyRN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjs cS`s$|jj||jjjdS(N(R5RRdR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR>scS`s-|j}|jtd|s)|SdS(Nucolgroup(RRRPR(R;RyRN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs cS`sF|jr|jjn&|jjj|jjd|j_dS(NuinTable(RRRBReR5RdRR:RT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRPs cS`s|jjdidd6dS(Nu no-end-tagucoluname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRQscS`s-|j}|jtd|s)|SdS(Nucolgroup(RRRPR(R;RyRN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs ( R0R1R?RRRqRjR>RRPRQR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyROas     tInTableBodyPhasec`seZfdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d ZRS( c `sj|||tjd|jfd|jfd |jfd|jfg|_|j|j_ tjd|j fd |j fd|j fg|_ |j|j _ dS(Nuhtmlutrutduthucaptionucolucolgrouputbodyutfootutheadutableubody(utduth(ucaptionucolucolgrouputbodyutfootuthead(utbodyutfootuthead(ubodyucaptionucolucolgroupuhtmlutduthutr(R?RRRt startTagTrtstartTagTableCelltstartTagTableOtherRRRtendTagTableRowGroupRBRCRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?s     cS`sPx-|jjdjdkr/|jjjqW|jjdjdkrLndS(Niutbodyutfootutheaduhtml(utbodyutfootutheaduhtml(R5RdR=R(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytclearStackToTableBodyContexts  cS`s|jjdjdS(NuinTable(RBR:Rq(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRqscS`s|jjdj|S(NuinTable(RBR:Rk(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRkscS`s|jjdj|S(NuinTable(RBR:Rj(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjscS`s4|j|jj||jjd|j_dS(NuinRow(RXR5RRBR:RT(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRTs cS`s8|jjdi|dd6|jtdd|S(Nuunexpected-cell-in-table-bodyunameutruStartTag(RBReRTR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRUs cS`s|jjdddsH|jjdddsH|jjdddrv|j|jt|jjdj|S|jjdS(NutbodyRutableutheadutfooti( R5RRXRWRRdR=RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRVs cS`s|jjdj|S(NuinTable(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRscS`sq|jj|dddrO|j|jjj|jjd|j_n|jjdi|dd6dS(NunameRutableuinTableu unexpected-end-tag-in-table-body( R5RRXRdRRBR:RTRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRWs   cS`s|jjdddsH|jjdddsH|jjdddrv|j|jt|jjdj|S|jjdS(NutbodyRutableutheadutfooti( R5RRXRWRRdR=RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRBs cS`s"|jjdi|dd6dS(Nu unexpected-end-tag-in-table-bodyuname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRCs cS`s|jjdj|S(NuinTable(RBR:Rm(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs(R0R1R?RXRqRkRjRTRURVRRWRBRCR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRSs        t InRowPhasec`seZfdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZRS(c `sj|||tjd|jfd |jfd|jfg|_|j|j_tjd |j fd |j fd|j fd|j fg|_ |j|j _dS(Nuhtmlutduthucaptionucolucolgrouputbodyutfootutheadutrutableubody(utduth(ucaptionucolucolgrouputbodyutfootutheadutr(utbodyutfootuthead(ubodyucaptionucolucolgroupuhtmlutduth(R?RRRRURVRRRtendTagTrRBRWRCRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?s     cS`s[xT|jjdjdkrV|jjdi|jjdjd6|jjjqWdS(Niutruhtmlu'unexpected-implied-end-tag-in-table-rowuname(utruhtml(R5RdR=RBReR(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytclearStackToTableRowContexts cS`s|jjddd S(NutrRutable(R5R(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pytignoreEndTagTr scS`s|jjdjdS(NuinTable(RBR:Rq(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRq$scS`s|jjdj|S(NuinTable(RBR:Rk(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRk'scS`s|jjdj|S(NuinTable(RBR:Rj(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRj*scS`sG|j|jj||jjd|j_|jjjtdS(NuinCell( R[R5RRBR:RTR RpR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRU-s cS`s-|j}|jtd|s)|SdS(Nutr(R\RZR(R;RyRN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRV3s cS`s|jjdj|S(NuinTable(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR:scS`sP|js?|j|jjj|jjd|j_n |jjdS(Nu inTableBody( R\R[R5RdRRBR:RTRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRZ=s   cS`s-|j}|jtd|s)|SdS(Nutr(R\RZR(R;RyRN((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRBGs cS`sD|jj|dddr3|jtd|S|jjdS(NunameRutableutr(R5RRZRRBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRWOscS`s"|jjdi|dd6dS(Nuunexpected-end-tag-in-table-rowuname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRCVs cS`s|jjdj|S(NuinTable(RBR:Rm(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRZs(R0R1R?R[R\RqRkRjRURVRRZRBRWRCR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRYs           t InCellPhasec`sheZfdZdZdZdZdZdZdZdZ dZ d Z RS( c `sj|||tjd|jfd |jfg|_|j|j_tjd|jfd|j fd|j fg|_ |j |j _dS(Nuhtmlucaptionucolucolgrouputbodyutdutfootuthutheadutrubodyutable( ucaptionucolucolgrouputbodyutdutfootuthutheadutr(utduth(ubodyucaptionucolucolgroupuhtml(utableutbodyutfootutheadutr( R?RRRRVRRRtendTagTableCellRCt endTagImplyRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?_s   cS`s`|jjdddr.|jtdn.|jjdddr\|jtdndS(NutdRutableuth(R5RR^R(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyt closeCellpscS`s|jjdjdS(NuinBody(RBR:Rq(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRqwscS`s|jjdj|S(NuinBody(RBR:Rj(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjzscS`sO|jjddds0|jjdddr>|j|S|jjdS(NutdRutableuth(R5RR`RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRV}s  cS`s|jjdj|S(NuinBody(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRscS`s|jj|dddr|jj|d|jjdj|dkr|jjdi|dd6xFtr|jjj}|j|dkrnPqnqnWn|jjj|jj |jj d|j_ n|jjdi|dd6dS(NunameRutableiuunexpected-cell-end-taguinRowuunexpected-end-tag( R5RR$RdR=RBReRERR8R:RT(R;RyR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR^s    cS`s"|jjdi|dd6dS(Nuunexpected-end-taguname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRCscS`s;|jj|dddr*|j|S|jjdS(NunameRutable(R5RR`RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR_s cS`s|jjdj|S(NuinBody(RBR:Rm(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs( R0R1R?R`RqRjRVRR^RCR_R((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR]]s       t InSelectPhasec`seZfdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d ZRS( c`sj|||tjd|jfd|jfd|jfd|jfd |jfd|jfg|_ |j |j _ tjd|j fd|j fd|jfg|_|j|j_ dS( Nuhtmluoptionuoptgroupuselectuinputukeygenutextareauscript(uinputukeygenutextarea(R?RRRtstartTagOptiontstartTagOptgroupRRRRRRt endTagOptiontendTagOptgroupt endTagSelectRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?s       cS`s0|jjdjdkr,|jjdndS(Niuhtmlu eof-in-select(R5RdR=RBRe(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRqscS`s,|ddkrdS|jj|ddS(Nudatau(R5R(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjscS`s@|jjdjdkr,|jjjn|jj|dS(Niuoption(R5RdR=RR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRbscS`sl|jjdjdkr,|jjjn|jjdjdkrX|jjjn|jj|dS(Niuoptionuoptgroup(R5RdR=RR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRcs cS`s'|jjd|jtddS(Nuunexpected-select-in-selectuselect(RBReRfR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRscS`sC|jjd|jjdddr?|jtd|SdS(Nuunexpected-input-in-selectuselectR(RBReR5RRfR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs cS`s|jjdj|S(NuinHead(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRscS`s"|jjdi|dd6dS(Nuunexpected-start-tag-in-selectuname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRs cS`sJ|jjdjdkr,|jjjn|jjdidd6dS(Niuoptionuunexpected-end-tag-in-selectuname(R5RdR=RRBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRds cS`s|jjdjdkrE|jjdjdkrE|jjjn|jjdjdkrq|jjjn|jjdidd6dS(Niuoptioniuoptgroupuunexpected-end-tag-in-selectuname(R5RdR=RRBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRes cS`ss|jjdddrb|jjj}x%|jdkrQ|jjj}q-W|jjn |jjdS(NuselectR(R5RRdRR=RBRVRe(R;RyR((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRfs cS`s"|jjdi|dd6dS(Nuunexpected-end-tag-in-selectuname(RBRe(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR s (R0R1R?RqRjRbRcRRRRRdReRfR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRas          tInSelectInTablePhasec`sMeZfdZdZdZdZdZdZdZRS(c `sqj|||tjd |jfg|_|j|j_tjd |jfg|_|j |j_dS( Nucaptionutableutbodyutfootutheadutrutduth(ucaptionutableutbodyutfootutheadutrutduth(ucaptionutableutbodyutfootutheadutrutduth( R?RRRRRRRBRR(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR? scS`s|jjdjdS(NuinSelect(RBR:Rq(R;((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRq scS`s|jjdj|S(NuinSelect(RBR:Rj(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRj scS`s5|jjdi|dd6|jtd|S(Nu5unexpected-table-element-start-tag-in-select-in-tableunameuselect(RBReRR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR# scS`s|jjdj|S(NuinSelect(RBR:Rl(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR( scS`sU|jjdi|dd6|jj|dddrQ|jtd|SdS(Nu3unexpected-table-element-end-tag-in-select-in-tableunameRutableuselect(RBReR5RRR(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRB+ scS`s|jjdj|S(NuinSelect(RBR:Rm(R;Ry((sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR1 s( R0R1R?RqRjRRRBR((R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRg s     tInForeignContentPhasec-`seZedddddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+g,Zfd,Zd-Zfd.Zd/Zd0ZRS(1ububigu blockquoteubodyubrucenterucodeuddudivudludtuemuembeduh1uh2uh3uh4uh5uh6uheaduhruiuimguliulistingumenuumetaunobruolupupreurubyususmalluspanustrongustrikeusubusuputableuttuuuuluvarc`sj|||dS(N(R?(R;RBR5(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyR?> scS`s+i$dd6dd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6}|dI|kr'||dI|dIn s(RBRYRRKRj(R;Ry(R(sD/usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyRjj s   cS`s|jjd}|d|jks\|ddkrt|djtdddg@r|jjdi|dd6xm|jjdj|jjkr|jj |jjd r|jj |jjd r|jjj q}W|S|jt d kr|jj |n3|jt d krG|j||jj|n|jj||j|d <|jj||d r|jjj t|d sF     t