§
   ¦ìö•ùO©sã                   ó˜   — d 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	m
Z
mZ ddlmZ ddlmZ dZd	„ Z G d
„ de¦  «        Zd„ Zd„ ZdS )zÖThe plugin action `milionar_remote`: the modern game card showing the game ChatGPT opened (G2: a playing video
stops first). One card at a time: Window(Home) property `milionar.game.remote` is set while it is open.é    N)Úclient)Údesigns)ÚACTION_NAV_BACKÚACTION_PREVIOUS_MENUÚMilionarGameModal)Úapi)ÚRemoteAdapterzmilionar.game.remotec                  ót   — t          t          j        d¦  «                             t          ¦  «        ¦  «        S )Né'  )ÚboolÚxbmcguiÚWindowÚgetPropertyÚOPEN© ó    úe/Users/chudy/Library/Application Support/Kodi/addons/plugin.video.milionar/wcs/games/remote/window.pyÚis_openr      s(   € Ý•”˜uÑ%Ô%×1Ò1µ$Ñ7Ô7Ñ8Ô8Ð8r   c                   óL   ‡ — e Zd ZdZˆ fd„Zˆ fd„Zˆ fd„Zd„ Zd„ Zˆ fd„Z	ˆ xZ
S )ÚRemoteGameModalu`   The card of the local game, but every key goes to the server's game (no settings, no PÅ™Ã­bÄ›h).c                 ól   •— t          t          | ¦  «                             | t          j        ¬¦  «        S )N)Údesign)Úsuperr   Ú__new__r   ÚMODERN)ÚclsÚviewÚ	__class__s     €r   r   zRemoteGameModal.__new__   s(   ø€ Ý•_ cÑ*Ô*×2Ò2°3½w¼~Ð2ÑNÔNÐNr   c           	      óp  •— |                      d¦  «        pi }t          t          | ¦  «                             |                      dd¦  «        |                      dd¦  «        |                      dd¦  «        |                      dd¦  «        t          j        d¬	¦  «         d
| _        d| _        || _        d S )NÚtitleÚnameÚ ÚgenreÚmediaÚmovieÚyearÚmillionaire)r    r#   Ú
media_typer&   r   ÚmodeF)	Úgetr   r   Ú__init__r   r   Ústory_availabler)   Ú_view)Úselfr   r    r   s      €r   r+   zRemoteGameModal.__init__   s±   ø€ Ø—’˜Ñ!Ô!Ð' RˆÝ�o˜tÑ$Ô$×-Ò-°E·I²I¸fÀbÑ4IÔ4IÐQV×QZÒQZÐ[bÐdfÑQgÔQgØ9>¿ºÀ7ÈGÑ9TÔ9TÐ[`×[dÒ[dÐekÐmoÑ[pÔ[pÝ5<´^È-ð 	.ñ 	Yô 	Yð 	Yð  %ˆÔØ!ˆŒ	ØˆŒ
ˆ
ˆ
r   c                 ó‚   •— |                       dd¦  «         t          t          | ¦  «                             ¦   «          d S )NzWCS.Game.RemoteÚtrue)ÚsetPropertyr   r   ÚonInit)r.   r   s    €r   r2   zRemoteGameModal.onInit%   s<   ø€ Ø×ÒÐ*¨FÑ3Ô3Ð3Ý�o˜tÑ$Ô$×+Ò+Ñ-Ô-Ð-Ð-Ð-r   c                 ó,   — t          | | j        ¦  «        S ©N)r	   r-   )r.   s    r   Ú_new_adapterzRemoteGameModal._new_adapter)   s   € Ý˜T 4¤:Ñ.Ô.Ð.r   c                 ó’   — | j         j                             |¦  «        }|r#| j        r| j                             |¦  «         d S d S d S r4   )Ú_designÚclicksr*   Ú_adapterÚact)r.   Ú	controlIdÚintents      r   ÚonClickzRemoteGameModal.onClick,   s[   € Ø”Ô$×(Ò(¨Ñ3Ô3ˆØð 	&�d”mð 	&ØŒM×Ò˜fÑ%Ô%Ð%Ð%Ð%ð	&ð 	&ð 	&ð 	&r   c                 óà   •— |                      ¦   «         t          t          fv r"| j        r| j                             ¦   «          d S t          t          | ¦  «                             |¦  «         d S r4   )ÚgetIdr   r   r9   Úbackr   r   ÚonAction)r.   Úactionr   s     €r   rA   zRemoteGameModal.onAction1   sc   ø€ Ø�<Š<‰>Œ>Õ2µOÐDÐDÐDØŒ}ð %Ø”×"Ò"Ñ$Ô$Ð$ØˆFÝ�o˜tÑ$Ô$×-Ò-¨fÑ5Ô5Ð5Ð5Ð5r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r+   r2   r5   r=   rA   Ú__classcell__)r   s   @r   r   r      s¬   ø€ € € € € ØjÐjðOð Oð Oð Oð Oðð ð ð ð ð.ð .ð .ð .ð .ð/ð /ð /ð&ð &ð &ð
6ð 6ð 6ð 6ð 6ð 6ð 6ð 6ð 6r   r   c                  ó"  — t          j        ¦   «         } |                      ¦   «         sd S |                      ¦   «          t          j        ¦   «         }t          d¦  «        D ].}|                      ¦   «         r|                     d¦  «        r d S Œ/d S )Né   gš™™™™™¹?)ÚxbmcÚPlayerÚ	isPlayingÚstopÚMonitorÚrangeÚwaitForAbort)ÚplayerÚmonitorÚ_s      r   Ú_stop_playbackrT   9   s’   € ÝŒ[‰]Œ]€FØ×ÒÑÔð ØˆØ
‡K‚K�M„M€MÝŒl‰nŒn€GÝ�2‰YŒYð ð ˆØ×ÒÑ!Ô!ð 	 W×%9Ò%9¸#Ñ%>Ô%>ð 	ØˆFˆFð	ðð r   c                  óâ  — t          j        d¦  «        } |                      t          ¦  «        rd S |                      t          t          t          j        ¦   «         ¦  «        ¦  «         	 t          j        ¦   «         }| 	                    d¦  «        s	 |  
                    t          ¦  «         d S t          ¦   «          t          |¦  «        }|                     ¦   «          ~nS# t          j        $ rA}t!          j        d                     |j        ¦  «        t           j        ¦  «         Y d }~nd }~ww xY w|  
                    t          ¦  «         d S # |  
                    t          ¦  «         w xY w)Nr   Úopenu   [MilionÃ¡Å™] remote game: {})r   r   r   r   r1   ÚreprÚtimer   Úcurrentr*   ÚclearPropertyrT   r   ÚdoModalr   ÚAccountErrorrJ   ÚlogÚformatÚcodeÚLOGINFO)Úhomer   ÚmodalÚexcs       r   Úrunrd   D   sP  € ÝŒ>˜%Ñ Ô €DØ×Ò�ÑÔð ØˆØ×Ò•T�4¥¤	¡¤Ñ,Ô,Ñ-Ô-Ð-ð!ÝŒ{‰}Œ}ˆØ�xŠx˜ÑÔð 	Øð 	×Ò�4Ñ Ô Ð Ð Ð õ 	ÑÔÐÝ Ñ%Ô%ˆØ�Š‰ŒˆØˆEøÝÔð Pð Pð PÝŒÐ/×6Ò6°s´xÑ@Ô@Å$Ä,ÑOÔOÐOÐOÐOÐOÐOÐOøøøøðPøøøð 	×Ò�4Ñ Ô Ð Ð Ð øˆ×Ò�4Ñ Ô Ð Ð øøøs6   Á+(C# Â02C# Ã"E Ã#D3Ã27D.Ä)E Ä.D3Ä3E ÅE.)rF   rX   rJ   r   Úwcs.accountr   Ú	wcs.gamesr   Úwcs.games.DialogMilionarGamer   r   r   Úwcs.games.remoter   Úwcs.games.remote.adapterr	   r   r   r   rT   rd   r   r   r   ú<module>rj      sú   ððkð kà €€€à €€€Ø €€€à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aÐ aØ  Ð  Ð  Ð  Ð  Ð  Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2à€ð9ð 9ð 9ð 6ð  6ð  6ð  6ð  6Ð'ñ  6ô  6ð  6ðFð ð ð!ð !ð !ð !ð !r   