o
    $[i                     @   sb   d dl Z d dlZd dlmZ d dlmZmZ d dlmZ ej	dkZ
e
r%dndZG dd	 d	eZdS )
    N)Path)DictUnion)ChannelOwnernti   i   c                
       sL   e Zd Zdededededdf
 fddZd	eeef ddfd
dZ	  Z
S )WritableStreamparenttypeguidinitializerreturnNc                    s   t  |||| d S )N)super__init__)selfr   r	   r
   r   	__class__ a/var/www/html/flask_server/venv/lib/python3.10/site-packages/playwright/_impl/_writable_stream.pyr      s   zWritableStream.__init__pathc                    sx   t |d#}	 |t}|sn| jddt| iI d H  qW d    n1 s,w   Y  | jdI d H  d S )NrbTwritebinaryclose)openreadCOPY_BUFSIZE_channelsendbase64	b64encodedecode)r   r   fdatar   r   r   copy!   s   

zWritableStream.copy)__name__
__module____qualname__r   strr   r   r   r   r#   __classcell__r   r   r   r   r      s    "r   )r   ospathlibr   typingr   r   playwright._impl._connectionr   name_WINDOWSr   r   r   r   r   r   <module>   s   
