Ë
    `§1hl  ã                   ó¤   — d dl Z d dlmZmZ d dlmZ d dlmZmZm	Z	m
Z
  G d„ dee«      Z G d„ dee«      Z G d	„ d
«      Z G d„ d«      Zd„ Zd„ Zy)é    N)Úurlsafe_b64decodeÚurlsafe_b64encode)ÚEnum)ÚAnyÚDictÚOptionalÚUnionc                   ó.   — e Zd ZU dZdZeed<   dZeed<   y)ÚProtocolz/Protocol to communicate with the authenticator.Úctap2ÚCTAP2z	ctap1/u2fÚU2FN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚ__annotations__r   © ó    úm/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/selenium/webdriver/common/virtual_authenticator.pyr   r      s   … Ù9à€Eˆ3ÓØ€CˆÔr   r   c                   óJ   — e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	eed	<   y
)Ú	Transportz7Transport method to communicate with the authenticator.ÚbleÚBLEÚusbÚUSBÚnfcÚNFCÚinternalÚINTERNALN)
r   r   r   r   r   r   r   r   r   r!   r   r   r   r   r      s-   … ÙAà€CˆÓØ€CˆÓØ€CˆÓØ€HˆcÔr   r   c                   óŽ   — e Zd ZeZeZej
                  ej                  ddddfdedededededed	d
fd„Z	d	e
eeeef   f   fd„Zy
)ÚVirtualAuthenticatorOptionsFTÚprotocolÚ	transportÚhas_resident_keyÚhas_user_verificationÚis_user_consentingÚis_user_verifiedÚreturnNc                 óX   — || _         || _        || _        || _        || _        || _        y)zMConstructor.

        Initialize VirtualAuthenticatorOptions object.
        N©r$   r%   r&   r'   r(   r)   )Úselfr$   r%   r&   r'   r(   r)   s          r   Ú__init__z$VirtualAuthenticatorOptions.__init__.   s2   € ð &ˆŒØ'ˆŒØ&6ˆÔØ+@ˆÔ"Ø(:ˆÔØ&6ˆÕr   c                 óŒ   — | j                   | j                  | j                  | j                  | j                  | j
                  dœS )N)r$   r%   ÚhasResidentKeyÚhasUserVerificationÚisUserConsentingÚisUserVerifiedr,   ©r-   s    r   Úto_dictz#VirtualAuthenticatorOptions.to_dictC   s>   € àŸ™ØŸ™Ø"×3Ñ3Ø#'×#=Ñ#=Ø $× 7Ñ 7Ø"×3Ñ3ñ
ð 	
r   )r   r   r   r   r   r   r   r   Úboolr.   r   r	   r5   r   r   r   r#   r#   (   s’   „ ð €HØ€Ið !Ÿ™Ø"Ÿ™Ø!&Ø&+Ø#'Ø!&ñ7àð7ð ð7ð ð	7ð
  $ð7ð !ð7ð ð7ð 
ó7ð*
˜˜c 5¨¨d¨Ñ#3Ð3Ñ4ô 
r   r#   c                   óX  — e Zd Zdedededee   dedefd„Ze	defd	„«       Z
e	defd
„«       Ze	defd„«       Ze	dee   fd„«       Ze	defd„«       Ze	defd„«       Zedededededd f
d„«       Zedededee   dededd fd„«       Zdeeef   fd„Zedeeef   dd fd„«       Zdefd„Zy)Ú
CredentialÚcredential_idÚis_resident_credentialÚrp_idÚuser_handleÚprivate_keyÚ
sign_countc                 óX   — || _         || _        || _        || _        || _        || _        y)ar  Constructor. A credential stored in a virtual authenticator.
        https://w3c.github.io/webauthn/#credential-parameters.

        :Args:
            - credential_id (bytes): Unique base64 encoded string.
            - is_resident_credential (bool): Whether the credential is client-side discoverable.
            - rp_id (str): Relying party identifier.
            - user_handle (bytes): userHandle associated to the credential. Must be Base64 encoded string. Can be None.
            - private_key (bytes): Base64 encoded PKCS#8 private key.
            - sign_count (int): intital value for a signature counter.
        N)Ú_idÚ_is_resident_credentialÚ_rp_idÚ_user_handleÚ_private_keyÚ_sign_count)r-   r9   r:   r;   r<   r=   r>   s          r   r.   zCredential.__init__O   s2   € ð( !ˆŒØ'=ˆÔ$ØˆŒØ'ˆÔØ'ˆÔØ%ˆÕr   r*   c                 óH   — t        | j                  «      j                  «       S ©N)r   r@   Údecoder4   s    r   ÚidzCredential.idj   s   € ä  §¡Ó*×1Ñ1Ó3Ð3r   c                 ó   — | j                   S rG   )rA   r4   s    r   r:   z!Credential.is_resident_credentialn   s   € à×+Ñ+Ð+r   c                 ó   — | j                   S rG   )rB   r4   s    r   r;   zCredential.rp_idr   s   € à�{‰{Ðr   c                 ób   — | j                   r#t        | j                   «      j                  «       S y rG   )rC   r   rH   r4   s    r   r<   zCredential.user_handlev   s(   € à×ÒÜ$ T×%6Ñ%6Ó7×>Ñ>Ó@Ð@Ør   c                 óH   — t        | j                  «      j                  «       S rG   )r   rD   rH   r4   s    r   r=   zCredential.private_key|   s   € ä  ×!2Ñ!2Ó3×:Ñ:Ó<Ð<r   c                 ó   — | j                   S rG   )rE   r4   s    r   r>   zCredential.sign_count€   s   € à×ÑÐr   rI   c                 ó   —  | |d|d||«      S )au  Creates a non-resident (i.e. stateless) credential.

        :Args:
          - id (bytes): Unique base64 encoded string.
          - rp_id (str): Relying party identifier.
          - private_key (bytes): Base64 encoded PKCS
          - sign_count (int): intital value for a signature counter.

        :Returns:
          - Credential: A non-resident credential.
        FNr   )ÚclsrI   r;   r=   r>   s        r   Úcreate_non_resident_credentialz)Credential.create_non_resident_credential„   s   € ñ �2�u˜e T¨;¸
ÓCÐCr   c                 ó   —  | |d||||«      S )aÕ  Creates a resident (i.e. stateful) credential.

        :Args:
          - id (bytes): Unique base64 encoded string.
          - rp_id (str): Relying party identifier.
          - user_handle (bytes): userHandle associated to the credential. Must be Base64 encoded string.
          - private_key (bytes): Base64 encoded PKCS
          - sign_count (int): intital value for a signature counter.

        :returns:
          - Credential: A resident credential.
        Tr   )rP   rI   r;   r<   r=   r>   s         r   Úcreate_resident_credentialz%Credential.create_resident_credential“   s   € ñ  �2�t˜U K°¸jÓIÐIr   c                 ó°   — | j                   | j                  | j                  | j                  | j                  dœ}| j
                  r| j
                  |d<   |S )N)ÚcredentialIdÚisResidentCredentialÚrpIdÚ
privateKeyÚ	signCountÚ
userHandle)rI   rA   r;   r=   r>   r<   )r-   Úcredential_datas     r   r5   zCredential.to_dict¥   sQ   € à ŸG™GØ$(×$@Ñ$@Ø—J‘JØ×*Ñ*ØŸ™ñ
ˆð ×ÒØ,0×,<Ñ,<ˆO˜LÑ)àÐr   Údatac                 ó  — t        |d   › d�«      }t        |d   «      }|j                  dd «      }t        |d   › d�«      }t        |d   «      }|j                  dd «      rt        |d   › d�«      nd } | ||||||«      S )NrU   z==rV   rW   rX   rY   rZ   )r   r6   ÚgetÚint)rP   r\   r@   r:   r;   r=   r>   r<   s           r   Ú	from_dictzCredential.from_dict³   s    € ä 4¨Ñ#7Ð"8¸Ð ;Ó<ˆÜ!% dÐ+AÑ&BÓ!CÐØ—‘˜ Ó&ˆÜ'¨4°Ñ+=Ð*>¸bÐ(AÓBˆÜ˜˜kÑ*Ó+ˆ
ØFJÇhÁhÈ|Ð]aÔFbÔ'¨4°Ñ+=Ð*>¸bÐ(AÔBÐhlˆá�3Ð.°°{ÀKÐQ[Ó\Ð\r   c                 ó¤   — d| j                   › d| j                  › d| j                  › d| j                  › d| j                  › d| j
                  › d�S )NzCredential(id=z, is_resident_credential=z, rp_id=z,            user_handle=z, private_key=z, sign_count=ú))rI   r:   r;   r<   r=   r>   r4   s    r   Ú__str__zCredential.__str__¾   sf   € Ø §¡˜yÐ(AÀ$×B]ÑB]ÐA^Ð^fÐgk×gqÑgqÐfrð sØ×)Ñ)Ð*¨.¸×9IÑ9IÐ8JÈ-ÐX\×XgÑXgÐWhÐhiðkð 	kr   N)r   r   r   Úbytesr6   r   r   r_   r.   ÚpropertyrI   r:   r;   r<   r=   r>   ÚclassmethodrQ   rS   r   r   r5   r`   rc   r   r   r   r8   r8   N   sÌ  „ ð&àð&ð !%ð&ð ð	&ð
 ˜e‘_ð&ð ð&ð ó&ð6 ð4�Cò 4ó ð4ð ð,¨ò ,ó ð,ð ð�sò ó ðð ð˜X c™]ò ó ðð
 ð=˜Sò =ó ð=ð ð ˜Cò  ó ð ð ðD°ð D¸cð DÐPUð DÐcfð DÐkwò Dó ðDð ðJØðJØ"ðJØ19¸%±ðJØOTðJØbeðJà	òJó ðJð"˜˜c 3˜h™ó ð ð]˜T # s (™^ð ]°ò ]ó ð]ðk˜ô kr   r8   c                 óB   ‡ — t        j                  ‰ «      ˆ fd„«       }|S )zKA decorator to ensure that the client used is a chromium based
    browser.c                 óh   •— | j                   d   j                  «       dvsJ d«       ‚ ‰| g|¢­i |¤ŽS )NÚbrowserName)ÚfirefoxÚsafariz4This only currently works in Chromium based browsers)ÚcapsÚlower©r-   ÚargsÚkwargsÚfuncs      €r   Úwrapperz0required_chromium_based_browser.<locals>.wrapperÇ   sP   ø€ à�y‰y˜Ñ'×-Ñ-Ó/ð 8
ñ 
ð 	Bð Bó	Bð 
ñ �DÐ*˜4Ò* 6Ñ*Ð*r   )Ú	functoolsÚwraps©rq   rr   s   ` r   Úrequired_chromium_based_browserrv   Ã   s'   ø€ ô ‡_�_�TÓó+ó ð+ð €Nr   c                 óT   ‡ — t        j                  ‰ «      t        ˆ fd„«       «       }|S )zSA decorator to ensure that the function is called with a virtual
    authenticator.c                 óJ   •— | j                   st        d«      ‚ ‰| g|¢­i |¤ŽS )Nz9This function requires a virtual authenticator to be set.)Úvirtual_authenticator_idÚ
ValueErrorrn   s      €r   rr   z/required_virtual_authenticator.<locals>.wrapperÖ   s/   ø€ ð ×,Ò,ÜÐXÓYÐYÙ�DÐ*˜4Ò* 6Ñ*Ð*r   )rs   rt   rv   ru   s   ` r   Úrequired_virtual_authenticatorr{   Ò   s/   ø€ ô ‡_�_�TÓÜ$ó+ó %ó ð+ð
 €Nr   )rs   Úbase64r   r   Úenumr   Útypingr   r   r   r	   r   r   r   r#   r8   rv   r{   r   r   r   ú<module>r      sV   ðó$ ß 7Ý ß -Ó -ôˆs�Dô ô��Tô ÷#
ñ #
÷Lrkñ rkòjór   