§
   ðÖ\„dYÉ·ã                   ó   — d Z ddlmZ ddlZddlZddlmZ ddlmZ	 dZ
d\  ZZdZd	Zd
\  ZZZZZZZZdddœZddej        ej        dddddddœ
Zd„ Zd„ Zd„ Zd&d„Zd'd„Zd(d„Zd(d„Z d„ Z!d)d „Z"d!„ Z#d"„ Z$d#„ Z%d$„ Z&d%„ Z'dS )*aÍ  Per-widget hero buttons of the cinematic Home sections (docs/plan/skin-milionar/220-hero-buttons.md).

The same principle as the context menu manager (wcs/skin/context.py): every widget has an ordered configuration
`{'main': [...], 'more': [...], 'hidden': [...]}` of the action ids of its context menu. `main` are the buttons of the
hero, `more` opens from the button "More options", `hidden` is offered nowhere. The hero shows at most LIMIT buttons,
"More options" included.

The buttons are written to the item (`milionar.hero.b<n>` builtin, `b<n>l` label, `b1i` = play icon) at the output
boundary (`context.attach`), in the widget fast path: no network and no store lookup there. The item builders register
the builtins they already have (`hero.direct`: play, detail, a Vinyl shuffle ...); every other action runs through
`skin_hero`, which resolves it with the context menu's own code when it is pressed.

A row without titles of its own (film / series genres) lends the hero a title of the first row that has one. While
such a row is the current one its own configuration applies: the lender's items carry that layout too, under
`milionar.hero.s<slot>.*` (`lent`), and the skin reads it instead of the item's own buttons.
é    )Ú	urlencodeN)Úcontext)ÚBUTTON_SLOTSzplugin://plugin.video.milionar/)ÚmoreÚeditzmilionar.hero.)
ÚplayÚnextÚliveÚplay_allÚrestartÚ	play_fromÚfirstÚrandomÚlive_shuffleÚshuffle)i³  i´  iµ  i¶  i·  i¸  i¹  i©  r	   r   )r   r	   )r	   Údetail)r   r	   r   )r
   Úopen)r   Úfavorite)r   r   r   )r   r   )r   )
ÚseriesÚmixedÚgameÚdemoÚ
tv_channelÚcinema_channelÚ
vinyl_songÚvinyl_collectionÚvinyl_genreÚvinyl_radioc                 óX   — t          d„ t          j        | ¦  «        D ¦   «         ¦  «        S )Nc              3   ó6   K  — | ]}|t           j        v¯|V — Œd S ©N)r   ÚCONTEXT_ONLY)Ú.0Úactions     úc/Users/chudy/Library/Application Support/Kodi/addons/plugin.video.milionar/wcs/skin/hero_buttons.pyú	<genexpr>zcatalog.<locals>.<genexpr>,   s/   è è € ÐaÐa˜F¸fÍGÔL`Ð>`Ð>`�Ð>`Ð>`Ð>`Ð>`ÐaÐaó    )Útupler   Úcatalog)Úrows    r%   r)   r)   +   s)   € ÝÐaÐa¥g¤o°cÑ&:Ô&:ÐaÑaÔaÑaÔaÐar'   c                 óª  ‡‡— ddl m} t          | ¦  «        Š|                      d¦  «        rt	          ‰¦  «        g g dœS ˆfd„t
                               |                     | ¦  «        d¦  «        D ¦   «         Š|                      d¦  «        r‰                     d¦  «         ˆfd	„‰D ¦   «         }|                      d
¦  «        }‰|r|ng |rg n|dœS )ziThe buttons the hero had before the manager; Vinyl keeps the rest under More options, the others hide it.r   ©ÚclicksÚhome_©Úmainr   Úhiddenc                 ó   •— g | ]}|‰v ¯|‘Œ	S © r3   )r#   ÚaÚalloweds     €r%   ú
<listcomp>zdefaults.<locals>.<listcomp>5   s   ø€ ÐYÐYÐY�!ÈAÐQXÈLÈLˆAÈLÈLÈLr'   )r   r   Úfy_Úfy_modec                 ó   •— g | ]}|‰v¯|‘Œ	S r3   r3   )r#   r4   r0   s     €r%   r6   zdefaults.<locals>.<listcomp>8   s   ø€ Ð0Ð0Ð0�! !¨4 - -ˆA - - -r'   Úvinyl_)	Úwcs.library2r-   r)   Ú
startswithÚlistÚMAINÚgetÚkind_ofÚappend)r*   r-   ÚrestÚvinylr5   r0   s       @@r%   ÚdefaultsrD   /   só   øø€ à#Ð#Ð#Ð#Ð#Ð#Ý�c‰lŒl€GØ
‡~‚~�gÑÔð AÝ˜W™œ¨r¸RÐ@Ð@Ð@ØYÐYÐYÐY•t—x’x §¢¨sÑ 3Ô 3Ð5GÑHÔHÐYÑYÔY€DØ
‡~‚~�eÑÔð Ø�Š�IÑÔÐØ0Ð0Ð0Ð0�wÐ0Ñ0Ô0€DØ�NŠN˜8Ñ$Ô$€EØ¨%Ð"7 $ $°RÈÐCXÀ2À2ÐTXÐYÐYÐYr'   c                 óö   — | d         s%t          | d         ¦  «        t          k    rt          n	t          dz
  }| d         |d…         }|r"| d         d|…         || d         z   c| d<   | d<   t          |¦  «        S )z\At most LIMIT buttons, More options included: what does not fit goes to the front of `more`.r   r0   é   N)ÚlenÚLIMITÚbool)ÚconfigÚroomÚoverflows      r%   ÚlimitrM   =   s�   € à˜vœÐV­3¨v°f¬~Ñ+>Ô+>Å%Ò+GÐ+G�5ˆ5ÍUÐUVÉY€DØ�fŒ~˜d˜e˜eÔ$€HØð ZØ)/°¬¸¸¸Ô)>ÀÈ6ÐRXÌ>Ñ@YÐ&ˆˆv‰˜˜v™Ý�‰>Œ>Ðr'   c                 ó|  ‡— |                       d¦  «        rt          j        | |¦  «        S t          | ¦  «        }t	          |t
          ¦  «        s|S t          | ¦  «        t          ¦   «         i c}Š}dD ]†}|                     |g ¦  «        }g ||<   t	          |t          ¦  «        r|ng D ]O}t	          |t          ¦  «        r8||v r4|‰vr0||                              |¦  «         ‰                     |¦  «         ŒPŒ‡dD ]/}||                              ˆfd„||         D ¦   «         ¦  «         Œ0t          |¦  «         |S )zRKeep a stored order; actions the row gained since go where the defaults have them.r.   r/   c              3   ó$   •K  — | ]
}|‰v¯|V — Œd S r!   r3   )r#   r4   Úseens     €r%   r&   znormalize.<locals>.<genexpr>V   s'   øè è € ÐEÐE 1°qÀ°}°}˜Q°}°}°}°}ÐEÐEr'   )r<   r   Ú	normalizerD   Ú
isinstanceÚdictr)   Úsetr?   r=   ÚstrrA   ÚaddÚextendrM   )	r*   rJ   Úbaser5   ÚresultÚgroupÚvaluesr$   rP   s	           @r%   rQ   rQ   F   s`  ø€ à
‡~‚~�gÑÔð .ÝÔ   fÑ-Ô-Ð-Ý�C‰=Œ=€DÝ�f�dÑ#Ô#ð ØˆÝ# C™LœL­#©%¬%°Ð€GˆT�6Ø+ð !ð !ˆØ—’˜E 2Ñ&Ô&ˆØˆˆu‰Ý *¨6µ4Ñ 8Ô 8Ð@�f�f¸bð 	!ð 	!ˆFÝ˜&¥#Ñ&Ô&ð !¨6°WÐ+<Ð+<ÀÈtÐASÐASØ�u”×$Ò$ VÑ,Ô,Ð,Ø—’˜Ñ Ô Ð øð	!ð ,ð Fð FˆØˆuŒ×ÒÐEÐEÐEÐE¨¨U¬ÐEÑEÔEÑEÔEÐEÐEÝ	ˆ&�M„M€MØ€Mr'   Fc                 ó<  — |                      d¦  «        }|dk    rddlm}  || |¦  «        S |dk    r!| dv p|                      d¦  «        dk    o| d	v S |                      d
¦  «        r|dvrdS |dv r9h d£}|                     |dk    rdnd¦  «         |r|                     d¦  «         nh d£}d|                      dd¦  «        v s|                      d¦  «        dk    r|h d£z  }|                      d¦  «        r|h d£z  }|                     d¦  «         | |v S )zkWhether the item can have the action, from what the item carries (the context menu decides for good later).ÚtyperC   r   ©ÚcanÚchannel)r
   r   r   Úedit_channelÚrename_channelÚmove_channelÚdelete_channelÚkindÚtv)r   r   Útmdb)Úmovierf   ÚseasonÚepisodeF)rh   rj   >	   r   r=   r   r   Úsourcer`   r   ÚsimilarÚwatchedrh   )Ú
collection)Úfolderri   Úhide_continue>	   r   r=   r	   r   ro   r`   rl   rm   Únext_sourceÚ	mupcomingÚpathÚ Úsz-1>   r	   r   rk   r   rm   rq   Ú
channel_id>   rk   r   rm   rq   rp   Úchannel_open)r?   Úwcs.vinyl.contextr_   ÚupdaterV   )r$   ÚdataÚ	resumablere   Ú	vinyl_canr5   s         r%   r_   r_   [   s  € à�8Š8�FÑÔ€DØˆw‚€Ø6Ð6Ð6Ð6Ð6Ð6Øˆy˜ Ñ&Ô&Ð&ØˆyÒÐØÐwÐwð RØ—’˜Ñ Ô  DÒ(ÐP¨VÐ7PÐ-Pð	Rà�8Š8�FÑÔð ˜tÐ+OÐOÐOØˆuØÐ#Ð#Ð#ØjÐjÐjˆØ�Š¨$°'ª/¨/��Ð?SÑTÔTÐTØð 	)Ø�KŠK˜Ñ(Ô(Ð(øànÐnÐnˆØ�d—h’h˜v rÑ*Ô*Ð*Ð*¨d¯hªh°s©m¬m¸tÒ.CÐ.CØÐRÐRÐRÑRˆØ‡x‚x�ÑÔð $ØÐSÐSÐSÑSˆØ�Š�NÑ#Ô#Ð#Ø�WÐÐr'   rt   c                 óJ   — d                      t          | ||rd|z   nd¦  «        S )zÑBuiltin of a button without a ready one: `encoded` is the item's `milionar.ctxdata`; `owner`: the widget whose
    configuration laid the button out when it is not the item's own (a genre row's borrowed hero).z.RunPlugin({}?action=skin_hero&do={}&data={}{})z&owner=rt   )ÚformatÚBASE)r$   ÚencodedÚowners      r%   Úlazyr‚   u   s2   € ð <×BÒBÅ4ÈÐQXÐotÐZ|ÐZcÐfkÑZkÐZkÐz|Ñ}Ô}Ð}r'   c                 ób  — d„ |D ¦   «         dt           …         }t          dt           dz   ¦  «        D ]�}|t          |¦  «        k    r||dz
           dd…         nd\  }}|                      d                     t
          ||¦  «        |¦  «         |                      d                     t
          ||¦  «        |¦  «         ŒŽ|                      t
          |z   dz   |r|d	         d         t          v rd
nd¦  «         |r3|                      t
          |                     d¦  «        z   d¦  «         dS dS )zg`buttons`: (label, builtin, action id) in the order of the hero; `prefix`: 's<slot>.' of a lent layout.c                 ó2   — g | ]}|d          ¯
|d         ¯|‘ŒS )r   rF   r3   )r#   Úbuttons     r%   r6   zwrite.<locals>.<listcomp>}   s*   € ÐGÐGÐG˜&¨v°a¬yÐG¸VÀA¼YÐGˆvÐGÐGÐGr'   NrF   é   ©rt   rt   z{}{}b{}z{}{}b{}lÚb1ir   r   rt   ú.Ú1)rH   ÚrangerG   ÚsetPropertyr~   ÚPROPERTYÚ	PLAY_ICONÚrstrip)ÚitemÚbuttonsÚprefixÚnÚlabelÚbuiltins         r%   Úwriter–   {   s<  € àGÐG GÐGÑGÔGÈÍÈÔO€GÝ�1•e˜a‘iÑ Ô ð Hð HˆØ/0µC¸±L´LÒ/@Ð/@˜  Q¡œ¨¨¨Ô+Ð+Àh‰ˆˆwØ×Ò˜×)Ò)­(°F¸AÑ>Ô>ÀÑHÔHÐHØ×Ò˜×*Ò*­8°V¸QÑ?Ô?ÀÑGÔGÐGÐGØ×Ò•X Ñ&¨Ñ.¸'Ð0hÀgÈaÄjÐQRÄmÕW`ÐF`ÐF`°°ÐfhÑiÔiÐiØð =Ø×Ò� F§M¢M°#Ñ$6Ô$6Ñ6¸Ñ<Ô<Ð<Ð<Ð<ð=ð =r'   c                 ó”   ‡ — d„ ‰                       t          dz   ¦  «                             d¦  «        D ¦   «         }ˆ fd„|D ¦   «         S )zeThe actions the item's builder gave a builtin: action id -> (label, builtin), in the builder's order.c                 ó   — g | ]}|¯|‘ŒS r3   r3   )r#   r4   s     r%   r6   zdirects.<locals>.<listcomp>‰   s   € Ð
MÐ
MÐ
M�È1Ð
Mˆ1Ð
MÐ
MÐ
Mr'   Údirectsú,c                 ó’   •— i | ]C}|‰                      t          d z   |z   ¦  «        ‰                      t          dz   |z   ¦  «        f“ŒDS )zdl.zdo.)ÚgetPropertyr�   )r#   r4   r�   s     €r%   ú
<dictcomp>zdirects.<locals>.<dictcomp>Š   sS   ø€ ÐmÐmÐmÐdeˆA�× Ò ¥¨EÑ!1°AÑ!5Ñ6Ô6¸×8HÒ8HÍÐTYÑIYÐ\]ÑI]Ñ8^Ô8^Ð_ÐmÐmÐmr'   )rœ   r�   Úsplit)r�   Úidss   ` r%   r™   r™   ‡   sR   ø€ à
MÐ
M�d×&Ò&¥x°)Ñ';Ñ<Ô<×BÒBÀ3ÑGÔGÐ
MÑ
MÔ
M€CØmÐmÐmÐmÐilÐmÑmÔmÐmr'   c           	      óx  ‡‡‡— |                       t          dz   ¦  «        sdS t          | ¦  «        Š|                     d¦  «        rddlm} |                     |¦  «        Š|                       t          dz   ¦  «        dk    Št          ||¦  «        }g }|d         D ]Ÿ}	t           	                    |	¦  «        }
|	‰vr|
‰v r|
|d         vr|
}	|	‰v r | 
                    ‰|	         |	fz   ¦  «         ŒTt          |	‰‰¦  «        r:| 
                    t          j        ||	¦  «        t          |	||¦  «        |	f¦  «         Œ t          ˆˆˆfd	„|d
         D ¦   «         ¦  «        rI|dt           dz
  …         t          j        t$          ¦  «        t          t&          ||¦  «        t&          fgz   }t)          | ||¦  «         dS )zWWrite the item's hero buttons from a widget's configuration (None: the row's defaults).ÚtitleNr.   r   ©Ú
navigationr{   rŠ   r0   c              3   óB   •K  — | ]}|‰v pt          |‰‰¦  «        V — Œd S r!   r^   )r#   r$   rz   Úreadyr{   s     €€€r%   r&   zcompose.<locals>.<genexpr>    s8   øè è € Ð
XÐ
X¸vˆ6�Uˆ?Ð:�c &¨$°	Ñ:Ô:Ð
XÐ
XÐ
XÐ
XÐ
XÐ
Xr'   r   rF   )rœ   r�   r™   r<   Úwcs.skinr£   ÚactionsrQ   Ú
PLAY_ALIASr?   rA   r_   r   r”   r‚   ÚanyrH   ÚtextÚS_MOREÚMOREr–   )r�   rz   r*   rJ   r€   r’   r�   r£   r‘   r$   Úaliasr¥   r{   s    `         @@r%   Úcomposer®   �   sÙ  øøø€ à×Ò�H wÑ.Ñ/Ô/ð ØˆÝ�D‰MŒM€EØ
‡~‚~�gÑÔð (Ø'Ð'Ð'Ð'Ð'Ð'Ø×"Ò" 3Ñ'Ô'ˆØ× Ò ¥¨KÑ!7Ñ8Ô8¸CÒ?€IÝ�s˜FÑ#Ô#€FØ€GØ˜”.ð _ð _ˆÝ—’˜vÑ&Ô&ˆØ˜ÐÐ 5¨E > >°eÀ6È&Ä>Ð6QÐ6QØˆFØ�Uˆ?ˆ?Ø�NŠN˜5 œ=¨F¨9Ñ4Ñ5Ô5Ð5Ð5Ý�˜˜yÑ)Ô)ð 	_Ø�NŠN�GœM¨#¨vÑ6Ô6½¸VÀWÈeÑ8TÔ8TÐV\Ð]Ñ^Ô^Ð^øÝ
Ð
XÐ
XÐ
XÐ
XÐ
XÐ
XÈÐPVÌÐ
XÑ
XÔ
XÑXÔXð cØ˜*�5 1™9˜*Ô%­'¬,µvÑ*>Ô*>ÅÅTÈ7ÐTYÑ@ZÔ@ZÕ\`Ð)aÐ(bÑbˆÝ	ˆ$�˜Ñ Ô Ð Ð Ð r'   c                 óR   — ddl m} t          |                     | ¦  «        ¦  «        S )z`A row of titles feeds the hero itself; a folder-only row (film / series genres) borrows a title.r   r,   )r;   r-   rI   r@   )r*   r-   s     r%   Ú	owns_heror°   ¥   s.   € à#Ð#Ð#Ð#Ð#Ð#Ý�—’˜sÑ#Ô#Ñ$Ô$Ð$r'   c                 óv   — t          j        t          j        d                     | |¦  «        ¦  «        ¦  «        S )z:The saved configuration of a Home slot (None: none saved).zSkin.String(mil.{}.{}.hero))r   ÚdecodeÚxbmcÚgetInfoLabelr~   )ÚsecÚslots     r%   Ústoredr·   «   s0   € åŒ>�$Ô+Ð,I×,PÒ,PÐQTÐVZÑ,[Ô,[Ñ\Ô\Ñ]Ô]Ð]r'   c                 óÔ  — ddl m} i }t          d|j        dz   ¦  «        D ]Æ}t	          |¦  «        t	          |¦  «        k    rŒ#d                     | |¦  «        }t          j        |dz   ¦  «        }|r|dk    st          |¦  «        rŒht          j
        t          j        |dz   ¦  «        ¦  «        }|�3||t          j        |d	z   ¦  «        pd
                     | |¦  «        f||<   ŒÇ|S )z¶What the other slots of the section lay out on this slot's items: {slot: (row, configuration, widget id)} of
    the rows without titles of their own that have a saved configuration.r   ©ÚslotsrF   zSkin.String(mil.{}.{}.ztype)Úoffzhero)Nzuid)z{}:{})r¦   rº   r‹   ÚSLOTSrU   r~   r³   r´   r°   r   r²   )rµ   r¶   rº   rY   Úotherr’   r*   rJ   s           r%   Úlentr¾   °   sÿ   € ð ÐÐÐÐÐØ€FÝ�q˜%œ+¨™/Ñ*Ô*ð 	lð 	lˆÝˆu‰:Œ:�˜T™œÒ"Ð"ØØ)×0Ò0°°eÑ<Ô<ˆÝÔ ¨Ñ 0Ñ1Ô1ˆØð 	�c˜U’l�l¥i°¡n¤n�lØÝ”¥Ô 1°&¸7Ñ2BÑ CÔ CÑDÔDˆØÐØ  &­$Ô*;¸FÀV¹OÑ*LÔ*LÐ*jÐPW×P^ÒP^Ð_bÐdiÑPjÔPjÐkˆF�5‰MøØ€Mr'   c           	      óJ  ‡— |                       dd¦  «        }t          j        |                       dd¦  «        ¦  «        }|t          k    rFddlm} |                     |                       d¦  «        p|                      dd¦  «        ¦  «         dS t          j        |¦  «        \  }}}}Š|                       dd¦  «        }|rTt          j        |¦  «        \  }}}|r|d	         n|}| 	                    d
¦  «        rddlm
}	 |	                     |¦  «        Š|t          k    �rot          ||r|                      d¦  «        nd¦  «        }
ˆfd„|
d         D ¦   «         }|rQ|                     t          j        t           ¦  «        t          j        dt          |p|d         dœ¦  «        f¦  «         |sdS ddlm} t)          j        d¦  «        }|                     dd¦  «         	  |¦   «         5  t)          j        ¦   «                              d„ |D ¦   «         ¦  «        }ddd¦  «         n# 1 swxY w Y   |                     d¦  «         n# |                     d¦  «         w xY w|dk    r"t5          j        ||         d         ¦  «         dS dS |‰v st8                                |¦  «        ‰v r3t5          j        ‰|‰v r|nt8          |                  d         ¦  «         dS t)          j        ¦   «                              dt          j        t<          ¦  «        ¦  «         dS )zZ`skin_hero`: a hero button without a ready builtin, the More options popup, or the editor.Údort   rz   r   r¹   ÚctxNr�   r]   r.   r¢   Úheroc                 ó(   •— g | ]}|‰v ¯‰|         ‘ŒS r3   r3   )r#   r4   Ú	availables     €r%   r6   zrun.<locals>.<listcomp>Ô   s"   ø€ ÐJÐJÐJ A¸1À	¸>¸>�9˜Q”<¸>¸>¸>r'   r   Ú	skin_hero)r$   rÀ   rÁ   )Úanchoredi'  zmilionar.ctx.activerŠ   c                 ó   — g | ]\  }}|‘ŒS r3   r3   )r#   r”   Ú_commands      r%   r6   zrun.<locals>.<listcomp>Þ   s   € Ð5[Ð5[Ð5[ÁÀÀx°eÐ5[Ð5[Ð5[r'   rF   u
   MilionÃ¡Å™)r?   r   ÚunpackÚEDITr¦   rº   Úedit_saved_heroÚresolveÚfind_widgetr<   r£   r§   r¬   rQ   rA   rª   ÚS_EDITr•   Úwcs.skin.menu_anchorrÆ   ÚxbmcguiÚWindowrŒ   ÚDialogÚcontextmenuÚclearPropertyr³   Úexecutebuiltinr¨   ÚnotificationÚS_UNAVAILABLE)ÚparamsrÀ   rz   rº   Ú_secÚ_slotÚwidgetr*   r�   r£   rJ   ÚentriesrÆ   ÚhomeÚindexrÄ   s                  @r%   Úrunrß   Â   s¥  ø€ à	�Š�D˜"Ñ	Ô	€BÝŒ>˜&Ÿ*š* V¨RÑ0Ô0Ñ1Ô1€DØ	�T‚z€zØ"Ð"Ð"Ð"Ð"Ð"Ø×Ò˜fŸjšj¨Ñ/Ô/ÐF°4·8²8¸EÀ2Ñ3FÔ3FÑGÔGÐGØˆÝ*1¬/¸$Ñ*?Ô*?Ñ'€Dˆ%�˜˜iØ�JŠJ�w Ñ#Ô#€EØð 0Ý%Ô1°%Ñ8Ô8Ñˆˆe�VØ &Ð/ˆf�VŒnˆn¨CˆØ�>Š>˜'Ñ"Ô"ð 	0Ø+Ð+Ð+Ð+Ð+Ð+Ø"×*Ò*¨3Ñ/Ô/ˆIØ	�T‚z�zÝ˜3°fÐ F §
¢
¨6Ñ 2Ô 2Ð 2À$ÑGÔGˆØJÐJÐJÐJ¨°¬ÐJÑJÔJˆØð 	FØ�NŠN�GœL­Ñ0Ô0µ'´/È[Õ`dÐmrð  nBÐvzð  |Aô  wBð  CCð  CCñ  3Dô  3Dð  Eñ  Fô  Fð  FØð 	ØˆFØ1Ð1Ð1Ð1Ð1Ð1ÝŒ~˜eÑ$Ô$ˆØ×ÒÐ.°Ñ4Ô4Ð4ð	6Ø�‘”ð ]ð ]ÝœÑ(Ô(×4Ò4Ð5[Ð5[ÐSZÐ5[Ñ5[Ô5[Ñ\Ô\�ð]ð ]ð ]ñ ]ô ]ð ]ð ]ð ]ð ]ð ]ð ]øøøð ]ð ]ð ]ð ]ð ×ÒÐ4Ñ5Ô5Ð5Ð5øˆD×ÒÐ4Ñ5Ô5Ð5Ð5øøøØ�AŠ:ˆ:ÝÔ ¨¤¨qÔ 1Ñ2Ô2Ð2Ð2Ð2ð ˆ:à	ˆyˆˆ�JŸNšN¨2Ñ.Ô.°)Ð;Ð;ÝÔ˜I¨B°)¨O¨O b bÅÈBÄÔPÐQRÔSÑTÔTÐTÐTÐTåŒÑÔ×%Ò% lµG´LÅÑ4OÔ4OÑPÔPÐPÐPÐPs0   Ç&
I Ç01H-È!I È-H1È1I È4H1È5I ÉI%c           	      ó  ‡
— ddl m}m}m} ddlm} |                      ¦   «         sdS |                     ¦   «         D �]D\  }Š
t          | ¦  «        ‰
z
  ||fz   v �r%d}t          j
        d                     |¦  «        ¦  «        }|rMt          j        t          j
        |                     |¦  «        ¦  «        ¦  «                             dd¦  «        nd}|r|c S ˆ
fd„t          d	|j        d	z   ¦  «        D ¦   «         D ]€}	t          j
        d
                     |	t"          ¦  «        ¦  «        rQt          j        t          j
        |                     |	¦  «        ¦  «        ¦  «                             dd¦  «        c c S Œ��ŒFdS )z¼The widget whose buttons the hero of a focused hero button shows: the current row's (also a genre row, whose
    hero borrows a title), else the first row with titles. Its identity, or ''.r   )ÚBASESÚBUTTON_OFFSETSÚBUTTON_PLAINr¹   rt   z1Container({}).ListItem.Property(milionar.ctxdata)z&Window(Home).Property(milionar.row.{})rÁ   c              3   óB   •K  — | ]}t          ‰|d z  z   ¦  «        V — ŒdS )éd   N)rU   )r#   r“   rX   s     €r%   r&   z!focused_widget.<locals>.<genexpr>÷   s3   øè è € ÐOÐO°�˜D 1 s¡7™NÑ+Ô+ÐOÐOÐOÐOÐOÐOr'   rF   z(Container({}).ListItem.Property({}title))Úwcs.skin.hero_contractrá   râ   rã   r¦   rº   ÚisdigitÚitemsÚintr³   r´   r~   r   rÉ   r?   r‹   r¼   r�   )Úcontrolrá   râ   rã   rº   rµ   rz   ÚcurrentÚidentityÚlidrX   s             @r%   Úfocused_widgetrî   é   s­  ø€ ð KÐJÐJÐJÐJÐJÐJÐJÐJÐJØÐÐÐÐÐØ�?Š?ÑÔð ØˆrØ—[’[‘]”]ð 	^ñ 	^‰	ˆˆTÝˆw‰<Œ<˜$Ñ .°L°?Ñ"BÐBÑBØFˆDÝÔ'Ð(P×(WÒ(WÐX[Ñ(\Ô(\Ñ]Ô]ˆGØahÐp•w”~¥dÔ&7¸¿ºÀGÑ8LÔ8LÑ&MÔ&MÑNÔN×RÒRÐSXÐZ\Ñ]Ô]Ð]ÐnpˆHØð  Ø���ØOÐOÐOÐOµU¸1¸e¼kÈA¹oÑ5NÔ5NÐOÑOÔOð ^ð ^�ÝÔ$Ð%O×%VÒ%VÐWZÕ\dÑ%eÔ%eÑfÔfð ^Ý"œ>­$Ô*;¸D¿KºKÈÑ<LÔ<LÑ*MÔ*MÑNÔN×RÒRÐSXÐZ\Ñ]Ô]Ð]Ð]Ð]Ð]Ð]ð^ùàˆ2r'   r!   )F)rt   r‡   )(Ú__doc__Úurllib.parser   r³   rÐ   r¦   r   ræ   r   rH   r   r¬   rÊ   r�   rŽ   ÚS_TITLErÎ   Ú	S_TO_MAINÚ	S_TO_MOREÚS_LIMITr×   ÚS_COLUMNr«   r¨   Ú	GAME_HEROr>   r)   rD   rM   rQ   r_   r‚   r–   r™   r®   r°   r·   r¾   rß   rî   r3   r'   r%   ú<module>r÷      sÒ  ððð ð  #Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€à Ð Ð Ð Ð Ð Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8à(€Ø�
€€dØ€Øv€	à:ñ P€ˆ�˜I w°¸xÈð
  fÐ-Ð-€
Ø$Ð/IØÔ!¨7Ô+<Ø&Ð:JØ*Ð@cØ.¸}ð	Nð N€ðbð bð bðZð Zð Zðð ð ðð ð ð ð*ð ð ð ð4~ð ~ð ~ð ~ð	=ð 	=ð 	=ð 	=ðnð nð nð!ð !ð !ð !ð0%ð %ð %ð^ð ^ð ^ð
ð ð ð$$Qð $Qð $QðNð ð ð ð r'   