
    ,h                        d dl mZ ddlmZmZ d dlmZ d dlZd dlZ G d dej                        Z
	 	 	 	 ddZ	 	 	 	 dd	Z	 d	 	 	 	 	 	 	 dd
Z	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 ddZy)    )annotations   )event_classT_JSON_DICT)	dataclassNc                  6    e Zd ZdZdZdZdZdZd Ze	d        Z
y)	StorageAreaz
    Storage areas.
    sessionlocalsyncmanagedc                    | j                   S N)value)selfs    t/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v134/extensions.pyto_jsonzStorageArea.to_json   s    zz    c                     | |      S r    )clsjsons     r   	from_jsonzStorageArea.from_json   s    4yr   N)__name__
__module____qualname____doc__SESSIONLOCALSYNCMANAGEDr   classmethodr   r   r   r   r	   r	      s6     GEDG  r   r	   c              #  V   K   t               }| |d<   d|d}|}t        |d         S w)av  
    Installs an unpacked extension from the filesystem similar to
    --load-extension CLI flags. Returns extension ID once the extension
    has been installed. Available if the client is connected using the
    --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
    flag is set.

    :param path: Absolute file path.
    :returns: Extension id.
    pathzExtensions.loadUnpackedmethodparamsid)dictstr)r$   r'   cmd_dictr   s       r   load_unpackedr,      s<      &FF6N+H >DtDz?s   ')c              #  <   K   t               }| |d<   d|d}|}yw)z
    Uninstalls an unpacked extension (others not supported) from the profile.
    Available if the client is connected using the --remote-debugging-pipe flag
    and the --enable-unsafe-extension-debugging.

    :param id_: Extension id.
    r(   zExtensions.uninstallr%   N)r)   )id_r'   r+   r   s       r   	uninstallr/   5   s.      &FF4L(H >Ds   c              #     K   t               }| |d<   |j                         |d<   ||D cg c]  }| c}|d<   d|d}|}t        |d         S c c}w w)a(  
    Gets data from extension storage in the given ``storageArea``. If ``keys`` is
    specified, these are used to filter the result.

    :param id_: ID of extension.
    :param storage_area: StorageArea to retrieve data from.
    :param keys: *(Optional)* Keys to retrieve.
    :returns: 
    r(   storageAreakeyszExtensions.getStorageItemsr%   datar)   r   r.   storage_arear2   r'   ir+   r   s          r   get_storage_itemsr8   H   so      &FF4L(002F=%)*!*v.H >DV +s   )A	A"Ac              #     K   t               }| |d<   |j                         |d<   |D cg c]  }| c}|d<   d|d}|}yc c}w w)z
    Removes ``keys`` from extension storage in the given ``storageArea``.

    :param id_: ID of extension.
    :param storage_area: StorageArea to remove data from.
    :param keys: Keys to remove.
    r(   r1   r2   zExtensions.removeStorageItemsr%   Nr4   r5   s          r   remove_storage_itemsr:   c   sZ      &FF4L(002F=!%&Aa&F6N1H >D 's   'A	AAc              #  b   K   t               }| |d<   |j                         |d<   d|d}|}yw)z
    Clears extension storage in the given ``storageArea``.

    :param id_: ID of extension.
    :param storage_area: StorageArea to remove data from.
    r(   r1   zExtensions.clearStorageItemsr%   Nr4   )r.   r6   r'   r+   r   s        r   clear_storage_itemsr<   z   sA      &FF4L(002F=0H >Ds   -/c              #  l   K   t               }| |d<   |j                         |d<   ||d<   d|d}|}yw)a  
    Sets ``values`` in extension storage in the given ``storageArea``. The provided ``values``
    will be merged with existing values in the storage area.

    :param id_: ID of extension.
    :param storage_area: StorageArea to set data in.
    :param values: Values to set.
    r(   r1   valueszExtensions.setStorageItemsr%   Nr4   )r.   r6   r>   r'   r+   r   s         r   set_storage_itemsr?      sK      &FF4L(002F=F8.H >Ds   24)r$   r*   returnz/typing.Generator[T_JSON_DICT, T_JSON_DICT, str])r.   r*   r@   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]r   )r.   r*   r6   r	   r2   z!typing.Optional[typing.List[str]]r@   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, dict])r.   r*   r6   r	   r2   ztyping.List[str]r@   rA   )r.   r*   r6   r	   r@   rA   )r.   r*   r6   r	   r>   r)   r@   rA   )
__future__r   utilr   r   dataclassesr   enumtypingEnumr	   r,   r/   r8   r:   r<   r?   r   r   r   <module>rH      s    # * !  $)) "	6.	7, 37! 0 
8	6!  
8	.! 
8(!  
8	r   