
    ^jv                     ^    d dl Z d dlmZmZ d dlmZ dedeeef   fdZ	defdZ
dedefd	Zy)
    N)AnyDict)versionclsreturnc           
          t        |       j                         D ci c]/  \  }}t        t        | |            r|j	                         s-||1 c}}S c c}}w )zReturn dict with constants attributes and values in the class(e.g. {'VAL1': 1, 'VAL2': 2})

    Args:
        cls: Class to be extracted constants

    Returns:
        dict with constants attributes and values in the class
    )varsitemscallablegetattrisupper)r   attrvalues      H/home/ubuntu/.local/lib/python3.12/site-packages/appium/common/helper.pyextract_const_attributesr      sG     ,09??+<tKD%HWUXZ^M_D`eieqeqesD%Kttts   AAAc                  "    t         j                  S )z'Return a version of this python library)appium_versionr        r   library_versionr   !   s     !!!r   	file_pathc                     t        | d      5 }t        j                  |j                               j	                  d      cddd       S # 1 sw Y   yxY w)z+Return base64 encoded string for given filerbzutf-8N)openbase64	b64encodereaddecode)r   files     r   encode_file_to_base64r    '   sB    	i	 =$		,33G<= = =s   2A		A)r   typingr   r   appiumr   r   typestrr   r   r    r   r   r   <module>r%      sM      ,	u$ 	u4S> 	u" "=S =S =r   