Ë
    íÍ:j
#  ã                   óÊ  — d Z ddlZddlZddlZddlZddlmZ ddlZddl	Z
ddl	mZmZmZmZ  ej                  e«      Zg d¢Zej&                  j)                   e
j*                  «       d«      Zej&                  j)                   e
j.                  «       d«      gZdZh d£Z ej6                  d	j)                   ed
j:                   eeej@                  ¬«      «      «      «      d„ «       Z!ejD                  dd„«       Z#d„ Z$ ejJ                  d«      d„ «       Z&d„ Z' ejJ                  d«      d„ «       Z(d„ Z) ejJ                  d«      d„ «       Z* e'e«      Z+i Z,g Z-d„ Z. e.«        y)aÁ  
Core functions and attributes for the matplotlib style library:

``use``
    Select style sheet to override the current matplotlib settings.
``context``
    Context manager to use a style sheet temporarily.
``available``
    List available style sheets. Underscore-prefixed names are considered private and
    not listed, though may still be accessed directly from ``library``.
``library``
    A dictionary of style names and matplotlib settings.
é    N)ÚPath)Ú_apiÚ
_docstringÚrc_params_from_fileÚrcParamsDefault)ÚuseÚcontextÚ	availableÚlibraryÚreload_libraryÚstylelibÚmplstyle>   ú
date.epochúwebagg.portúwebagg.addressútk.window_focusúsavefig.directoryúdocstring.hardcopyúfigure.raise_windowúwebagg.port_retriesúwebagg.open_in_browserúfigure.max_open_warningÚbackendÚtoolbarÚtimezoneÚinteractiveÚbackend_fallbackú
z- {})Úkeyc                 ó˜  — t        | t        t        f«      st        | d«      r| g}n| }dddœ}|D �]E  } t        | t        «      r¼|j	                  | | «      } | dk(  rAt        j                  «       5  t        D �ci c]  }|t        vr
|t        |   “Œ } }ddd«       nd| t        v r
t        |    } nRd| v rN| j                  d«      \  }}}	 t        j                  j                  |«      |› dt        › �z  }t        |d¬«      } t        | t        t        f«      r	 t        | d¬«      } i }
| D ],  }|t        v rt        j&                  d
|›d�«       Œ%| |   |
|<   Œ. t(        j*                  j-                  |
«       �ŒH yc c}w # 1 sw Y   ŒˆxY w# t         t"        t$        f$ r
}Y d}~Œ¤d}~ww xY w# t"        $ r}	t#        | ›d	�«      |	‚d}	~	ww xY w)aß  
    Use Matplotlib style settings from a style specification.

    The style name of 'default' is reserved for reverting back to
    the default style settings.

    .. note::

       This updates the `.rcParams` with the settings from the style.
       `.rcParams` not defined in the style are kept.

    Parameters
    ----------
    style : str, dict, Path or list

        A style specification. Valid options are:

        str
            - One of the style names in `.style.available` (a builtin style or
              a style installed in the user library path).

            - A dotted name of the form "package.style_name"; in that case,
              "package" should be an importable Python package name, e.g. at
              ``/path/to/package/__init__.py``; the loaded style file is
              ``/path/to/package/style_name.mplstyle``.  (Style files in
              subpackages are likewise supported.)

            - The path or URL to a style file, which gets loaded by
              `.rc_params_from_file`.

        dict
            A mapping of key/value pairs for `matplotlib.rcParams`.

        Path
            The path to a style file, which gets loaded by
            `.rc_params_from_file`.

        list
            A list of style specifiers (str, Path or dict), which are applied
            from first to last in the list.

    Notes
    -----
    The following `.rcParams` are not related to style and will be ignored if
    found in a style specification:

    %s
    ÚkeysÚdefaultÚclassic)Úmpl20Úmpl15Nú.F©Úuse_default_templatezŒ is not a valid package style, path of style file, URL of style file, or library style name (library styles are listed in `style.available`)zStyle includes a parameter, z9, that is not related to style.  Ignoring this parameter.)Ú
isinstanceÚstrr   ÚhasattrÚgetr   Ú'suppress_matplotlib_deprecation_warningr   Ú_STYLE_BLACKLISTr   Ú
rpartitionÚ	importlibÚ	resourcesÚfilesÚ_STYLE_EXTENSIONr   ÚModuleNotFoundErrorÚOSErrorÚ	TypeErrorÚwarn_externalÚmplÚrcParamsÚupdate)ÚstyleÚstylesÚstyle_aliasÚkÚpkgÚ_ÚnameÚpathÚexcÚerrÚfiltereds              ún/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/matplotlib/style/__init__.pyr   r   +   s  € ôh �%œ#œt˜Ô%¬°¸Ô)?à�‰àˆà%°	Ñ:€Kàó )&ˆÜ�eœSÔ!Ø—O‘O E¨5Ó1ˆEØ˜	Ò!ô ×AÑAÓCñ ;ä<Kö ;°qØ !Ô)9Ñ 9ð ¤°Ñ 2Ñ2ð ;�Eð ;÷;ð ;ð œ'Ñ!Ü ™‘Ø˜‘Ø$×/Ñ/°Ó4‘��Q˜ð
Ü$×.Ñ.×4Ñ4°SÓ9¸t¸fÀAÔFVÐEWÐ<XÑX�DÜ/°È5ÔQ�Eô �eœc¤4˜[Ô)ðIÜ+¨EÈÔN�ð ˆØò 	'ˆAØÔ$Ñ$Ü×"Ñ"Ø2°1°%ð 8Bð CõDð $ A™h�˜’ð	'ô 	�‰×Ñ˜HÖ%ñS)&ùò;÷;ð ;ûô ,¬W´iÐ@ò ô ûðûô ò IÜØ�ið  >ð ?ó@ð FIðIûðIúsH   Á/	E?Á8E:ÂE?Ã8FÄF,Å:E?Å?F	ÆF)Æ$F)Æ,	G	Æ5GÇG	c              #   ó¨   K  — t        j                  «       5  |rt        j                  «        t        | «       d–— ddd«       y# 1 sw Y   yxY w­w)aû  
    Context manager for using style settings temporarily.

    Parameters
    ----------
    style : str, dict, Path or list
        A style specification. Valid options are:

        str
            - One of the style names in `.style.available` (a builtin style or
              a style installed in the user library path).

            - A dotted name of the form "package.style_name"; in that case,
              "package" should be an importable Python package name, e.g. at
              ``/path/to/package/__init__.py``; the loaded style file is
              ``/path/to/package/style_name.mplstyle``.  (Style files in
              subpackages are likewise supported.)

            - The path or URL to a style file, which gets loaded by
              `.rc_params_from_file`.
        dict
            A mapping of key/value pairs for `matplotlib.rcParams`.

        Path
            The path to a style file, which gets loaded by
            `.rc_params_from_file`.

        list
            A list of style specifiers (str, Path or dict), which are applied
            from first to last in the list.

    after_reset : bool
        If True, apply style after resetting settings to their defaults;
        otherwise, apply style on top of the current settings.
    N)r8   Ú
rc_contextÚ
rcdefaultsr   )r;   Úafter_resets     rF   r	   r	   “   s>   è ø€ ôJ 
�‰Ó	ñ ÙÜ�N‰NÔÜˆEŒ
Û÷	÷ ñ üs   ‚A—&A½	AÁAÁAc                 óŽ   — t        t        j                  j                  t        «      D ]  }t        |«      }t        | |«       Œ | S )z0Update style library with user-defined rc files.)ÚmapÚosrB   Ú
expanduserÚUSER_LIBRARY_PATHSÚ_read_style_directoryÚ_update_nested_dict)r   Ústylelib_pathr<   s      rF   Ú_update_user_libraryrS   ¿   s>   € äœRŸW™W×/Ñ/Ô1CÓDò -ˆÜ& }Ó5ˆÜ˜G VÕ,ð-ð €Nó    z3.11c                 ó   — t        | «      S ©N)rS   )r   s    rF   Úupdate_user_libraryrW   Ç   s   € ä Ó(Ð(rT   c                 ó@  — t        «       }t        | «      j                  dt        › �«      D ]c  }t	        j
                  d¬«      5 }t        |d¬«      ||j                  <   ddd«       D ]#  }t        j                  d||j                  «       Œ% Œe |S # 1 sw Y   Œ5xY w)z3Return dictionary of styles defined in *style_dir*.z*.T)ÚrecordFr'   Nz	In %s: %s)Údictr   Úglobr3   ÚwarningsÚcatch_warningsr   ÚstemÚ_logÚwarningÚmessage)Ú	style_dirr<   rB   ÚwarnsÚws        rF   rP   rP   Ì   s˜   € ä‹V€FÜ�Y“×$Ñ$ rÔ*:Ð);Ð%<Ó=ò 7ˆÜ×$Ñ$¨DÔ1ð 	V°UÜ 3°DÈuÔ UˆF�4—9‘9Ñ÷	Vàò 	7ˆAÜ�L‰L˜ d¨A¯I©IÕ6ñ	7ð7ð
 €M÷		Vð 	Vús   ÁBÂB	c                 ó   — t        | «      S rV   )rP   )rb   s    rF   Úread_style_directoryrf   ×   s   € ä  Ó+Ð+rT   c                 óx   — |j                  «       D ]&  \  }}| j                  |i «      j                  |«       Œ( | S )a  
    Update nested dict (only level of nesting) with new values.

    Unlike `dict.update`, this assumes that the values of the parent dict are
    dicts (or dict-like), so you shouldn't replace the nested dict if it
    already exists. Instead you should update the sub-dict.
    )ÚitemsÚ
setdefaultr:   )Ú	main_dictÚnew_dictrA   Úrc_dicts       rF   rQ   rQ   Ü   s?   € ð "Ÿ™Ó)ò 7‰ˆˆgØ×Ñ˜T 2Ó&×-Ñ-¨gÕ6ð7àÐrT   c                 ó   — t        | |«      S rV   )rQ   )rj   rk   s     rF   Úupdate_nested_dictrn   ê   s   € ä˜y¨(Ó3Ð3rT   c                  óÆ   — t         j                  «        t         j                  t        t        j                  «       «      «       t        d„ t         D «       «      t        dd y)zReload the style library.c              3   óD   K  — | ]  }|j                  d «      rŒ|–— Œ y­w)r@   N)Ú
startswith)Ú.0rA   s     rF   ú	<genexpr>z!reload_library.<locals>.<genexpr>ú   s   è ø€ ÒO 4¸$¿/¹/È#Õ:Nœ$ÑOùs   ‚ ™ N)r   Úclearr:   rS   Ú_base_libraryÚcopyÚsortedr
   © rT   rF   r   r   ö   s:   € ä‡M�M„OÜ‡N�NÔ'¬×(:Ñ(:Ó(<Ó=Ô>ÜÑO¬7ÔOÓO„I‰a�LrT   )F)/Ú__doc__Ú
contextlibÚimportlib.resourcesr0   ÚloggingrM   Úpathlibr   r\   Ú
matplotlibr8   r   r   r   r   Ú	getLoggerÚ__name__r_   Ú__all__rB   ÚjoinÚget_data_pathÚ_BASE_LIBRARY_PATHÚget_configdirrO   r3   r.   ÚSubstitutionrL   Úformatrw   r*   Úlowerr   Úcontextmanagerr	   rS   Ú
deprecatedrW   rP   rf   rQ   rn   ru   r   r
   r   rx   rT   rF   ú<module>r‹      s†  ðñó Û Û Û 	Ý Û ã ß MÓ Mà€w×Ñ˜Ó"€â
F€ð —W‘W—\‘\Ð"3 #×"3Ñ"3Ó"5°zÓBÐ à—g‘g—l‘lÐ#4 3×#4Ñ#4Ó#6¸
ÓCÐDÐ ØÐ ò(Ð ð €×ÑØ‡I�I‰c�&—-‘-¡Ð(8¸c¿i¹iÔ!HÓIÓJóñb&óðb&ðJ ×Ñò(ó ð(òVð €‡��Óñ)ó ð)òð €‡��Óñ,ó ð,òð €‡��Óñ4ó ð4ñ &Ð&8Ó9€Ø
€Ø€	òPñ Õ rT   