Ë
    :vžjÁ  ã                  ó6  — d Z ddlmZ ddlZddlZddlmZ ddlmZm	Z	m
Z
mZmZ  G d„ dej                  «      Z G d	„ d
e«      Z G d„ de	«      Z e«       Z e«       Zej&                  Zej(                  Zej*                  Zej,                  Zej.                  Zy)z(Read and write notebooks in JSON format.é    )ÚannotationsNé   )Ú	from_dict)ÚNotebookReaderÚNotebookWriterÚrejoin_linesÚsplit_linesÚstrip_transientc                  ó   — e Zd ZdZd„ Zy)ÚBytesEncoderz@A JSON encoder that accepts b64 (and other *ascii*) bytestrings.c                ó„   — t        |t        «      r|j                  d«      S t        j                  j                  | |«      S )z#Get the default value of an object.Úascii)Ú
isinstanceÚbytesÚdecodeÚjsonÚJSONEncoderÚdefault)ÚselfÚobjs     úc/workspace/moltex-experiments/.pixi/envs/default/lib/python3.12/site-packages/nbformat/v3/nbjson.pyr   zBytesEncoder.default   s4   € ä�cœ5Ô!Ø—:‘:˜gÓ&Ð&Ü×Ñ×'Ñ'¨¨cÓ2Ð2ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   © r   r   r   r      s
   „ ÙJó3r   r   c                  ó   — e Zd ZdZd„ Zd„ Zy)Ú
JSONReaderzA JSON notebook reader.c                ón   — t        j                  |fi |¤Ž} | j                  |fi |¤Ž}t        |«      }|S )zConvert a string to a notebook.)r   ÚloadsÚto_notebookr
   )r   ÚsÚkwargsÚnbs       r   ÚreadszJSONReader.reads   s;   € ä�Z‰Z˜Ñ$˜VÑ$ˆØˆT×Ñ˜bÑ+ FÑ+ˆÜ˜RÓ ˆØˆ	r   c                ó*   — t        t        |«      «      S )zConvert a dict to a notebook.)r   r   )r   Údr$   s      r   r"   zJSONReader.to_notebook"   s   € äœI a›LÓ)Ð)r   N)r   r   r   r   r&   r"   r   r   r   r   r      s   „ Ù!òó*r   r   c                  ó   — e Zd ZdZd„ Zy)Ú
JSONWriterzA JSON notebook writer.c                óØ   — t         |d<   d|d<   d|d<   d|d<   t        j                  |«      }t        |«      }|j	                  dd«      rt        |«      }t        j                  |fi |¤ŽS )	zConvert a notebook to a string.Úclsr   ÚindentTÚ	sort_keys)Ú,z: Ú
separatorsr	   )r   ÚcopyÚdeepcopyr
   Úpopr	   r   Údumps)r   r%   r$   s      r   ÚwriteszJSONWriter.writes*   sl   € ä$ˆˆu‰ØˆˆxÑØ"ˆˆ{ÑØ*ˆˆ|ÑÜ�]‰]˜2ÓˆÜ˜RÓ ˆØ�:‰:�m TÔ*Ü˜R“ˆBÜ�z‰z˜"Ñ' Ñ'Ð'r   N)r   r   r   r   r5   r   r   r   r*   r*   '   s
   „ Ù!ó
(r   r*   )r   Ú
__future__r   r1   r   Únbbaser   Úrwbaser   r   r   r	   r
   r   r   r   r*   Ú_readerÚ_writerr&   Úreadr"   Úwriter5   r   r   r   Ú<module>r=      s…   ðÙ .õ #ã Û å ß ^Õ ^ô3�4×#Ñ#ô 3ô*�ô *ô(�ô (ñ  ‹,€Ù
‹,€à�‰€Ø‡|�|€Ø×!Ñ!€Ø�‰€Ø	�‰�r   