§
    �Ÿj;
  ã                  ó@   — d Z ddlmZ ddlmZ ddlmZ ddlmZ d„ Z	dS )	z.API for converting notebooks between versions.é    )Úannotationsé   )Úversions)Úget_version)ÚValidationErrorc                óÊ  — t          | ¦  «        \  }}||k    r| S |t          v r¯||k    r|dz   }t          |         j        }n|dz
  }t          |         j        }	  || ¦  «        }|                     dd¦  «        |k    rd||fz  }t          |¦  «        ‚n-# t          $ r }d|› d|› d|› �}t          |¦  «        d‚d}~ww xY wt          ||¦  «        S t          d|z  ¦  «        ‚)	a  Convert a notebook node object to a specific version.  Assumes that
    all the versions starting from 1 to the latest major X are implemented.
    In other words, there should never be a case where v1 v2 v3 v5 exist without
    a v4.  Also assumes that all conversions can be made in one step increments
    between major versions and ignores minor revisions.

    Parameters
    ----------
    nb : NotebookNode
    to_version : int
        Major revision to convert the notebook to.  Can either be an upgrade or
        a downgrade.

    Raises
    ------
    ValueError
        Notebook failed to convert.
    ValueError
        The version specified is invalid or doesn't exist.
    ValidationError
        Conversion failed due to missing expected attributes.
    r   Únbformatz+Failed to convert notebook from v%d to v%d.z-Notebook could not be converted from version z to version z because it's missing a key: NzACannot convert notebook to v%d because that version doesn't exist)	r   r   ÚupgradeÚ	downgradeÚgetÚ
ValueErrorÚAttributeErrorr   Úconvert)	ÚnbÚ
to_versionÚversionÚversion_minorÚstep_versionÚconvert_functionÚ	convertedÚmsgÚes	            ú_/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/nbformat/converter.pyr   r      sU  € õ2  +¨2™œÑ€Wˆmð �*ÒÐØˆ	ð •XÐÐð ˜ÒÐØ" Q™;ˆLÝ'¨Ô5Ô=ÐÐà" Q™;ˆLÝ'¨Ô0Ô:Ðð	1à(Ð(¨Ñ,Ô,ˆIØ�}Š}˜Z¨Ñ+Ô+¨wÒ6Ð6ØCÀwÐP\ÐF]Ñ]�Ý  ‘o”oÐ%ð 7øõ ð 	1ð 	1ð 	1ð FÀ'ð  Fð  FÐWcð  Fð  Fð  CDð  Fð  FˆCÝ! #Ñ&Ô&¨DÐ0øøøøð	1øøøõ
 �y *Ñ-Ô-Ð-Ý
ØKÈzÑZñô ð s   Á;B Â
C Â B;Â;C N)
Ú__doc__Ú
__future__r   Ú r   Úreaderr   Ú	validatorr   r   © ó    r   ú<module>r!      sn   ðØ 4Ð 4ð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø &Ð &Ð &Ð &Ð &Ð &ð9ð 9ð 9ð 9ð 9r    