Ë
    5]j÷–  ã                  óª  — U d Z ddlmZ ddlZddlZddlmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZ erddl m!Z! e"e#e"df   z  e$e"   z  Z%de&d<   g d¢Z'd"d„Z( ejR                  dejT                  «      Z+d#d„Z,d$d„Z- G d„ d«      Z. G d„ de/«      Z0dZ1d%d„Z2d&d'd„Z3 G d „ d!«      Z4y)(z±
babel.messages.catalog
~~~~~~~~~~~~~~~~~~~~~~

Data structures for message catalogs.

:copyright: (c) 2013-2026 by the Babel Team.
:license: BSD, see LICENSE for more details.
é    )ÚannotationsN)ÚIterableÚIterator)Úcopy)ÚSequenceMatcher)Úmessage_from_string)Únlargest)Ú	Formatter)ÚTYPE_CHECKING)Ú__version__)ÚLocaleÚUnknownLocaleError)Úformat_datetime)Ú
get_plural)ÚLOCALTZÚ_cmp)Ú	TypeAlias.r   Ú
_MessageID)ÚDEFAULT_HEADERÚPYTHON_FORMATÚCatalogÚMessageÚTranslationErrorc                óÔ  — |dkD  st        d|›�«      ‚d|cxk  rdk  sn t        d|›�«      ‚g }t        d¬«      }|j                  | «       |D ]p  }|j                  |«       |j	                  «       |k\  sŒ(|j                  «       |k\  sŒ<|j                  «       |k\  sŒP|j                  |j                  «       |f«       Œr t        ||«      }|D ��cg c]  \  }}|‘Œ	 c}}S c c}}w )z¿A modified version of ``difflib.get_close_matches``.

    It just passes ``autojunk=False`` to the ``SequenceMatcher``, to work
    around https://github.com/python/cpython/issues/90825.
    r   zn must be > 0: g        g      ð?zcutoff must be in [0.0, 1.0]: F)Úautojunk)	Ú
ValueErrorr   Úset_seq2Úset_seq1Úreal_quick_ratioÚquick_ratioÚratioÚappendr	   )ÚwordÚpossibilitiesÚnÚcutoffÚresultÚsÚxÚscores           úM/var/www/zogu/zoguvenv/lib/python3.12/site-packages/babel/messages/catalog.pyÚget_close_matchesr,   +   sÛ   € ð ˆqŠ5Ü˜?¨1¨%Ð0Ó1Ð1Ø�&Ô˜CÔÜÐ9¸&¸ÐDÓEÐEØ€FÜ Ô'€AØ‡J�JˆtÔØò *ˆØ	�
‰
�1Œà×ÑÓ  FÓ*Ø—‘“ 6Ó)Ø—‘“	˜VÓ#à�M‰M˜1Ÿ7™7›9 a˜.Õ)ð*ô �a˜Ó €Fà$×%‘(�%˜ŠAÓ%Ð%ùÓ%s   ÃC$z¨
    \%
        (?:\(([\w]*)\))?
        (
            [-#0\ +]?(?:\*|[\d]+)?
            (?:\.(?:\*|[\d]+))?
            [hlL]?
        )
        ([diouxXeEfFgGcrs%])
c                ó†   — d| vryt        «       }	 d}|j                  | «      D ]
  }|d   €Œ	d}Œ 	 |S # t        $ r Y yw xY w)Nú{Fé   T)r
   Úparser   )ÚstringÚfmtÚfield_name_seenÚts       r+   Ú_has_python_brace_formatr5   V   sc   € Ø
�&ÑØÜ
‹+€Cðð  ˆØ—‘˜6Ó"ò 	'ˆAØ�‰tÑØ"&‘ñ	'ð Ðøô ò Ùðús   ‘4 ­4 ´	A ¿A c                óÆ  — t        j                  d| «      }t        j                  j                  |j	                  d«      d«      }|j	                  d«      }|�ˆ|d   |dd  }}|d d |dd  }}t        |› d�«      }t        |«      }	t        |«      }
|	d	z  }||
z  }||z  }t        j                  t        j                  |¬
«      d|d›�¬«      }|j                  |¬«      }|S )Nz+^(?P<datetime>.*?)(?P<tzoffset>[+-]\d{4})?$Údatetimez%Y-%m-%d %H:%MÚtzoffsetr   r/   é   Ú1é<   )ÚminuteszEtc/GMTz+d)ÚoffsetÚname©Útzinfo)	ÚreÚmatchr7   ÚstrptimeÚgroupÚintÚtimezoneÚ	timedeltaÚreplace)ÚvaluerB   Údtr8   Úplus_minus_sÚrestÚhours_offset_sÚmins_offset_sÚ
plus_minusÚhours_offsetÚmins_offsetÚnet_mins_offsets               r+   Ú_parse_datetime_headerrS   i   sþ   € Ü�H‰HÐCÀUÓK€Eä	×	Ñ	×	#Ñ	# E§K¡K°
Ó$;Ð=MÓ	N€Bð �{‰{˜:Ó&€HØÐØ% a™[¨(°1°2¨,�dˆØ(,¨R¨a¨°$°q°r°(˜ˆô ˜L˜>¨Ð+Ó,ˆ
Ü˜>Ó*ˆÜ˜-Ó(ˆð '¨Ñ+ˆØ˜;Ñ&ˆØ˜:Ñ%ˆô ×$Ñ$Ü×%Ñ%¨oÔ>Ø˜?¨2Ð.Ð/ô
ˆð �Z‰Z˜xˆZÓ(ˆà€Ió    c                  óò   — e Zd ZdZ	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	dd	„Z
dd
„Zdd„Zdd„Zdd„Zddd„Zedd„«       Zedd„«       Zedd„«       Zedd„«       Zy)r   z0Representation of a single message in a catalog.Nc
                óà  — || _         |s| j                  rd}|| _        |rt        t        j                  |«      «      ng | _        t        |«      | _        |r(| j                  r| j                  j                  d«       n| j                  j                  d«       |r(| j                  r| j                  j                  d«       n| j                  j                  d«       |rt        t        j                  |«      «      ng | _        |rt        t        j                  |«      «      ng | _        |r*t        |t         «      r	|g| _        nt        |«      | _        ng | _        || _        |	| _        y)a_  Create the message object.

        :param id: the message ID, or a ``(singular, plural)`` tuple for
                   pluralizable messages
        :param string: the translated message string, or a
                       ``(singular, plural)`` tuple for pluralizable messages
        :param locations: a sequence of ``(filename, lineno)`` tuples
        :param flags: a set or sequence of flags
        :param auto_comments: a sequence of automatic comments for the message
        :param user_comments: a sequence of user comments for the message
        :param previous_id: the previous message ID, or a ``(singular, plural)``
                            tuple for pluralizable messages
        :param lineno: the line number on which the msgid line was found in the
                       PO file, if any
        :param context: the message context
        )Ú rW   zpython-formatzpython-brace-formatN)ÚidÚpluralizabler1   ÚlistÚdictÚfromkeysÚ	locationsÚsetÚflagsÚpython_formatÚaddÚdiscardÚpython_brace_formatÚauto_commentsÚuser_commentsÚ
isinstanceÚstrÚprevious_idÚlinenoÚcontext)
ÚselfrX   r1   r]   r_   rd   re   rh   ri   rj   s
             r+   Ú__init__zMessage.__init__�   s  € ð8 ˆŒÙ˜$×+Ò+ØˆFØˆŒÙ;DœœdŸm™m¨IÓ6Ô7È"ˆŒÜ˜“ZˆŒ
Ù�$×$Ò$Ø�J‰J�N‰N˜?Õ+à�J‰J×Ñ˜Ô/Ù�$×*Ò*Ø�J‰J�N‰NÐ0Õ1à�J‰J×ÑÐ4Ô5ÙCPœT¤$§-¡-°Ó">Ô?ÐVXˆÔÙCPœT¤$§-¡-°Ó">Ô?ÐVXˆÔÙÜ˜+¤sÔ+Ø$/ =�Õ ä#'¨Ó#4�Õ à!ˆDÔØˆŒØˆ�rT   c                óz   — dt        | «      j                  › d| j                  ›dt        | j                  «      ›d�S )Nú<ú z	 (flags: z)>)ÚtypeÚ__name__rX   rZ   r_   ©rk   s    r+   Ú__repr__zMessage.__repr__Ã   s7   € Ø”4˜“:×&Ñ&Ð' q¨¯©¨°9¼TÀ$Ç*Á*Ó=MÐ<PÐPRÐSÐSrT   c                ó8   — d„ }t         || «       ||«      «      S )z0Compare Messages, taking into account plural idsc                ó°   — t        | t        «      r+| j                  r| j                  d   | j                  xs dfS | j                  | j                  xs dfS )Nr   rW   )rf   r   rY   rX   rj   )Úobjs    r+   Úvalues_to_comparez*Message.__cmp__.<locals>.values_to_compareÉ   sH   € Ü˜#œwÔ'¨C×,<Ò,<Ø—v‘v˜a‘y #§+¡+Ò"3°Ð3Ð3Ø—6‘6˜3Ÿ;™;Ò,¨"Ð,Ð,rT   )r   )rk   Úotherrw   s      r+   Ú__cmp__zMessage.__cmp__Æ   s"   € ò	-ô
 Ñ% dÓ+Ñ->¸uÓ-EÓFÐFrT   c                ó*   — | j                  |«      dkD  S ©Nr   ©ry   ©rk   rx   s     r+   Ú__gt__zMessage.__gt__Ð   ó   € Ø�|‰|˜EÓ" QÑ&Ð&rT   c                ó*   — | j                  |«      dk  S r{   r|   r}   s     r+   Ú__lt__zMessage.__lt__Ó   r   rT   c                ó*   — | j                  |«      dk\  S r{   r|   r}   s     r+   Ú__ge__zMessage.__ge__Ö   ó   € Ø�|‰|˜EÓ" aÑ'Ð'rT   c                ó*   — | j                  |«      dk  S r{   r|   r}   s     r+   Ú__le__zMessage.__le__Ù   r„   rT   c                ó*   — | j                  |«      dk(  S r{   r|   r}   s     r+   Ú__eq__zMessage.__eq__Ü   r„   rT   c                ó*   — | j                  |«      dk7  S r{   r|   r}   s     r+   Ú__ne__zMessage.__ne__ß   r„   rT   c                óX   — t        |t        «      sJ ‚| j                  |j                  k(  S )z[Checks whether messages are identical, taking into account all
        properties.
        )rf   r   Ú__dict__r}   s     r+   Úis_identicalzMessage.is_identicalâ   s'   € ô ˜%¤Ô)Ð)Ð)Ø�}‰} §¡Ñ.Ð.rT   c                ó\  — t        t        | j                  «      t        | j                  «      t        | j                  «      t        | j
                  «      t        | j                  «      t        | j                  «      t        | j                  «      | j                  | j                  ¬«	      S )N)	rX   r1   r]   r_   rd   re   rh   ri   rj   )r   r   rX   r1   r]   r_   rd   re   rh   ri   rj   rr   s    r+   ÚclonezMessage.cloneé   sv   € ÜÜ�D—G‘G‹}Ü˜Ÿ™Ó$Ü˜4Ÿ>™>Ó*Ü�t—z‘zÓ"Ü˜t×1Ñ1Ó2Ü˜t×1Ñ1Ó2Ü˜T×-Ñ-Ó.Ø—;‘;Ø—L‘Lô

ð 
	
rT   c                ó†   — ddl m} g }|D ]  }	  ||| «       Œ |S # t        $ r}|j                  |«       Y d}~Œ0d}~ww xY w)a•  Run various validation checks on the message.  Some validations
        are only performed if the catalog is provided.  This method returns
        a sequence of `TranslationError` objects.

        :rtype: ``iterator``
        :param catalog: A catalog instance that is passed to the checkers
        :see: `Catalog.check` for a way to perform checks for all messages
              in a catalog.
        r   )ÚcheckersN)Úbabel.messages.checkersr‘   r   r"   )rk   Úcatalogr‘   ÚerrorsÚcheckerÚes         r+   ÚcheckzMessage.checkö   sR   € õ 	5à)+ˆØò 	!ˆGð!Ù˜ Õ&ð	!ð
 ˆøô $ò !Ø—‘˜a× Ñ ûð!ús   �	œ	A ¥;»A c                ó   — d| j                   v S )a   Whether the translation is fuzzy.

        >>> Message('foo').fuzzy
        False
        >>> msg = Message('foo', 'foo', flags=['fuzzy'])
        >>> msg.fuzzy
        True
        >>> msg
        <Message 'foo' (flags: ['fuzzy'])>

        :type:  `bool`Úfuzzy©r_   rr   s    r+   r™   zMessage.fuzzy
  s   € ð ˜$Ÿ*™*Ð$Ð$rT   c                óB   — t        | j                  t        t        f«      S )z¯Whether the message is plurizable.

        >>> Message('foo').pluralizable
        False
        >>> Message(('foo', 'bar')).pluralizable
        True

        :type:  `bool`)rf   rX   rZ   Útuplerr   s    r+   rY   zMessage.pluralizable  s   € ô ˜$Ÿ'™'¤D¬% =Ó1Ð1rT   c                óÀ   — | j                   }t        |t        t        f«      r|D ]  }t        j                  |«      sŒ y yt        t        j                  |«      «      S )zâWhether the message contains Python-style parameters.

        >>> Message('foo %(name)s bar').python_format
        True
        >>> Message(('foo %(name)s', 'foo %(name)s')).python_format
        True

        :type:  `bool`TF)rX   rf   rZ   rœ   r   ÚsearchÚbool©rk   ÚidsrX   s      r+   r`   zMessage.python_format%  sV   € ð �g‰gˆÜ�cœD¤%˜=Ô)Øò  �Ü ×'Ñ'¨Õ+Ùð ð Ü”M×(Ñ(¨Ó-Ó.Ð.rT   c                ó†   — | j                   }t        |t        t        f«      r|D ]  }t	        |«      sŒ y yt	        |«      S )zîWhether the message contains Python f-string parameters.

        >>> Message('Hello, {name}!').python_brace_format
        True
        >>> Message(('One apple', '{count} apples')).python_brace_format
        True

        :type:  `bool`TF)rX   rf   rZ   rœ   r5   r    s      r+   rc   zMessage.python_brace_format7  sE   € ð �g‰gˆÜ�cœD¤%˜=Ô)Øò  �Ü+¨BÕ/Ùð ð Ü'¨Ó,Ð,rT   )rW   © r£   r£   r£   r£   NN)rX   r   r1   ú_MessageID | Noner]   úIterable[tuple[str, int]]r_   úIterable[str]rd   r¦   re   r¦   rh   r   ri   ú
int | Nonerj   ú
str | NoneÚreturnÚNone©r©   rg   )rx   Úobjectr©   rE   )rx   r¬   r©   rŸ   )rx   r   r©   rŸ   )r©   r   ©N)r“   zCatalog | Noner©   zlist[TranslationError])r©   rŸ   )rq   Ú
__module__Ú__qualname__Ú__doc__rl   rs   ry   r~   r�   rƒ   r†   rˆ   rŠ   r�   r�   r—   Úpropertyr™   rY   r`   rc   r£   rT   r+   r   r   Š   s  „ Ù:ð
 %'Ø/1Ø!Ø')Ø')Ø"$Ø!Ø"ð4àð4ð "ð4ð -ð	4ð
 ð4ð %ð4ð %ð4ð  ð4ð ð4ð ð4ð 
ó4ólTóGó'ó'ó(ó(ó(ó(ó/ó
ôð( ò%ó ð%ð ò	2ó ð	2ð ò/ó ð/ð" ò-ó ñ-rT   r   c                  ó   — e Zd ZdZy)r   z_Exception thrown by translation checkers when invalid message
    translations are encountered.N)rq   r®   r¯   r°   r£   rT   r+   r   r   J  s   „ ò%rT   r   z¸# Translations template for PROJECT.
# Copyright (C) YEAR ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#c                óX   — ddl m}  |«       }| |d<   t        |j                  «       «      S )Nr   )r   úcontent-type)Úemail.messager   r[   Ú
get_params)rI   r   Úms      r+   Úparse_separated_headerr¸   W  s'   € å%á‹	€AØ€A€nÑÜ�—‘“ÓÐrT   c                ó€   — t        | t        «      r| S t        | t        «      r| j                  ||«      S t        | «      S r­   )rf   rg   ÚbytesÚdecode)r(   Úencodingr”   s      r+   Ú_force_textr½   `  s5   € Ü�!”SÔØˆÜ�!”UÔØ�x‰x˜ &Ó)Ð)Üˆq‹6€MrT   c                  ó  — e Zd ZdZddeddddddddddf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d„Zd"d„Zd#d„Zd$d„Z e	ee«      Z
 e	e«      Zd%d„Zd&d	„Z e	eed
¬«      Zd'd„Zd(d„Z e	eed¬«      Ze	d)d„«       Ze	d%d„«       Ze	d%d„«       Zd*d„Zd)d„Zd+d„Zd%d„Zd,d„Zd-d„Zd.d„Z	 	 	 	 	 	 	 	 d/	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d0d„Zd1d„Zd2d3d„Zd2d4d„Z	 	 	 	 d5	 	 	 	 	 	 	 	 	 	 	 d6d„Z d7d„Z!	 d2	 	 	 	 	 d8d„Z"d9d „Z#y):r   z$Representation of a message catalog.NTc                ót  — || _         || _        || _        i | _        |xs d| _        |xs d| _        |xs d| _        |xs d| _        |
xs d| _        	 |xs d| _	        	 |xs d| _
        |€$t        j                  j                  t        «      }n<t        |t        j                  «      r"|j                  s|j!                  t        ¬	«      }|| _        |	€d
}	n<t        |	t        j                  «      r"|	j                  s|	j!                  t        ¬	«      }	|	| _        || _        i | _        d| _        d| _        y)aD  Initialize the catalog object.

        :param locale: the locale identifier or `Locale` object, or `None`
                       if the catalog is not bound to a locale (which basically
                       means it's a template)
        :param domain: the message domain
        :param header_comment: the header comment as string, or `None` for the
                               default header
        :param project: the project's name
        :param version: the project's version
        :param copyright_holder: the copyright holder of the catalog
        :param msgid_bugs_address: the email address or URL to submit bug
                                   reports to
        :param creation_date: the date the catalog was created
        :param revision_date: the date the catalog was revised
        :param last_translator: the name and email of the last translator
        :param language_team: the name and email of the language team
        :param charset: the encoding to use in the output (defaults to utf-8)
        :param fuzzy: the fuzzy bit on the catalog header
        ÚPROJECTÚVERSIONÚORGANIZATIONzEMAIL@ADDRESSzFULL NAME <EMAIL@ADDRESS>zLANGUAGE <LL@li.org>úutf-8Nr?   zYEAR-MO-DA HO:MI+ZONE)ÚdomainÚlocaleÚ_header_commentÚ	_messagesÚprojectÚversionÚcopyright_holderÚmsgid_bugs_addressÚlast_translatorÚlanguage_teamÚcharsetr7   Únowr   rf   r@   rH   Úcreation_dateÚrevision_dater™   ÚobsoleteÚ_num_pluralsÚ_plural_expr)rk   rÅ   rÄ   Úheader_commentrÈ   rÉ   rÊ   rË   rÐ   rÑ   rÌ   rÍ   rÎ   r™   s                 r+   rl   zCatalog.__init__k  s0  € ðH ˆŒØˆŒØ-ˆÔØ?AˆŒàÒ+ )ˆŒØÒ+ )ˆŒØ 0Ò B°NˆÔØ"4Ò"G¸ˆÔà.ÒMÐ2MˆÔØ<Ø*ÒDÐ.DˆÔØ:àÒ) 'ˆŒàÐ Ü$×-Ñ-×1Ñ1´'Ó:‰MÜ˜¤x×'8Ñ'8Ô9À-×BVÒBVØ)×1Ñ1¼Ð1ÓAˆMØ*ˆÔØÐ Ø3‰MÜ˜¤x×'8Ñ'8Ô9À-×BVÒBVØ)×1Ñ1¼Ð1ÓAˆMØ*ˆÔØˆŒ
ð ?AˆŒØ ˆÔØ ˆÕrT   c                ó4  — |€d | _         d | _        y t        |t        «      rt	        |«      | _         || _        y t        |t        «      r,t	        |«      | _         	 t        j
                  |«      | _        y t        d|›�«      ‚# t        $ r
 d | _        Y y w xY w)NzD`locale` must be a Locale, a locale identifier string, or None; got )Ú_locale_identifierÚ_localerf   r   rg   r0   r   Ú	TypeError©rk   rÅ   s     r+   Ú_set_localezCatalog._set_locale±  s�   € Øˆ>Ø&*ˆDÔ#ØˆDŒLØä�fœfÔ%Ü&)¨&£kˆDÔ#Ø!ˆDŒLØä�fœcÔ"Ü&)¨&£kˆDÔ#ð$Ü%Ÿ|™|¨FÓ3�”ð äØRÐSYÐR\Ð]ó
ð 	
øô	 &ò $Ø#�•Øð$ús   ÁB ÂBÂBc                ó   — | j                   S r­   )rØ   rr   s    r+   Ú_get_localezCatalog._get_localeÈ  s   € Ø�|‰|ÐrT   c                ó   — | j                   S r­   )r×   rr   s    r+   Ú_get_locale_identifierzCatalog._get_locale_identifierË  s   € Ø×&Ñ&Ð&rT   c                ó.  — | j                   }t        j                  j                  t        «      j	                  d«      }t        | j                  d«      r| j                  j	                  d«      }|j                  d| j                  «      j                  d| j                  «      j                  d|«      j                  d| j                  «      }| j                  r| j                  j                  n| j                  }|r|j                  d|› d�«      }|S )	Nz%YÚstrftimerÀ   rÁ   ÚYEARrÂ   zTranslations templatez translations)rÆ   r7   rÏ   r   rá   ÚhasattrrÑ   rH   rÈ   rÉ   rÊ   rÅ   Úenglish_nameÚlocale_identifier)rk   ÚcommentÚyearÚlocale_names       r+   Ú_get_header_commentzCatalog._get_header_commentÑ  sØ   € Ø×&Ñ&ˆÜ× Ñ ×$Ñ$¤WÓ-×6Ñ6°tÓ<ˆÜ�4×%Ñ% zÔ2Ø×%Ñ%×.Ñ.¨tÓ4ˆDà�O‰O˜I t§|¡|Ó4ß‰W�Y §¡Ó-ß‰W�V˜TÓ"ß‰W�^ T×%:Ñ%:Ó;ð	 	ð 37·+²+�d—k‘k×.Ò.À4×CYÑCYˆÙØ—o‘oÐ&=À+ÀÈmÐ?\Ó]ˆGØˆrT   c                ó   — || _         y r­   )rÆ   )rk   r1   s     r+   Ú_set_header_commentzCatalog._set_header_commentá  s
   € Ø%ˆÕrT   a…      The header comment for the catalog.

    >>> catalog = Catalog(project='Foobar', version='1.0',
    ...                   copyright_holder='Foo Company')
    >>> print(catalog.header_comment) #doctest: +ELLIPSIS
    # Translations template for Foobar.
    # Copyright (C) ... Foo Company
    # This file is distributed under the same license as the Foobar project.
    # FIRST AUTHOR <EMAIL@ADDRESS>, ....
    #

    The header can also be set from a string. Any known upper-case variables
    will be replaced when the header is retrieved again:

    >>> catalog = Catalog(project='Foobar', version='1.0',
    ...                   copyright_holder='Foo Company')
    >>> catalog.header_comment = '''\
    ... # The POT for my really cool PROJECT project.
    ... # Copyright (C) 1990-2003 ORGANIZATION
    ... # This file is distributed under the same license as the PROJECT
    ... # project.
    ... #'''
    >>> print(catalog.header_comment)
    # The POT for my really cool Foobar project.
    # Copyright (C) 1990-2003 Foo Company
    # This file is distributed under the same license as the Foobar
    # project.
    #

    :type: `unicode`
    )Údocc                ó  — t        | j                  t        j                  t        j                  t        t
        f«      rt        | j                  dd¬«      }n| j                  }| j                  }| j                  r)d|v r%|j                  dt        | j                  «      «      }d| j                  › d| j                  › �fd| j                  fdt        | j                  dd¬«      fd	|fd
| j                  fg}| j                  r&|j!                  dt        | j                  «      f«       |j!                  d|f«       | j"                  �|j!                  d| j$                  f«       |ddd| j&                  › �fdddt(        › d�fgz  }|S )Nzyyyy-MM-dd HH:mmZÚen)rÅ   ÚLANGUAGEzProject-Id-Versionro   zReport-Msgid-Bugs-TozPOT-Creation-DatezPO-Revision-DatezLast-TranslatorÚLanguagezLanguage-TeamzPlural-Forms)zMIME-Versionz1.0zContent-Typeztext/plain; charset=)zContent-Transfer-EncodingÚ8bitzGenerated-ByzBabel ú
)rf   rÑ   r7   ÚtimerE   Úfloatr   rÍ   rå   rH   rg   rÈ   rÉ   rË   rÐ   rÌ   r"   rÅ   Úplural_formsrÎ   rÁ   )rk   rÑ   rÍ   Úheaderss       r+   Ú_get_mime_headerszCatalog._get_mime_headers	  s  € Ü�d×(Ñ(¬8×+<Ñ+<¼h¿m¹mÌSÔRWÐ*XÔYÜ+Ø×"Ñ"Ø#Øô‰Mð !×.Ñ.ˆMà×*Ñ*ˆØ×!Ò! j°MÑ&AØ)×1Ñ1°*¼cÀ$×BXÑBXÓ>YÓZˆMð " d§l¡l ^°1°T·\±\°NÐ#CÐDØ# T×%<Ñ%<Ð=Ø ¤/°$×2DÑ2DÐFYÐbfÔ"gÐhØ Ð/Ø × 4Ñ 4Ð5ð*
ˆð ×!Ò!Ø�N‰N˜J¬¨D×,BÑ,BÓ(CÐDÔEØ�‰˜¨Ð7Ô8Ø�;‰;Ð"Ø�N‰N˜N¨D×,=Ñ,=Ð>Ô?ØØ#ØÐ3°D·L±L°>ÐBÐCØ1Ø˜v¤g Y¨bÐ1Ð2ð	
ñ 	
ˆð ˆrT   c                ó  — |D �]~  \  }}t        |j                  «       | j                  ¬«      }t        || j                  ¬«      }|dk(  r5|j                  d«      }dj	                  |d d «      | _        |d   | _        Œ}|dk(  r|| _        ŒŠ|dk(  r|| _        Œ—|dk(  r(|j                  dd	«      }| j                  |xs d «       ŒÄ|d
k(  r|| _        ŒÑ|dk(  r)t        |«      }d|v sŒæ|d   j                  «       | _        Œÿ|dk(  rGt        d|› �«      }t        |j                  dd«      «      | _        |j                  dd«      | _        �ŒK|dk(  rt#        |«      | _        �Œb|dk(  s�Œid|vs�Œot#        |«      | _        �Œ� y )N)r¼   zproject-id-versionro   éÿÿÿÿzreport-msgid-bugs-tozlast-translatorÚlanguageú-Ú_zlanguage-teamr´   rÎ   zplural-formsz ;Únpluralsr9   Úpluralú(n != 1)zpot-creation-datezpo-revision-daterâ   )r½   ÚlowerrÎ   ÚsplitÚjoinrÈ   rÉ   rË   rÌ   rH   rÛ   rÍ   r¸   rE   ÚgetrÓ   rÔ   rS   rÐ   rÑ   )rk   rö   r>   rI   ÚpartsÚparamss         r+   Ú_set_mime_headerszCatalog._set_mime_headers+  sz  € Ø"ó !	G‰KˆD�%Ü˜tŸz™z›|°d·l±lÔCˆDÜ °·±Ô=ˆEØÐ+Ò+ØŸ™ CÓ(�Ø"Ÿx™x¨¨c¨r¨
Ó3�”Ø$ R™y�•ØÐ/Ò/Ø*/�Õ'ØÐ*Ò*Ø',�Õ$Ø˜Ò#ØŸ™ c¨3Ó/�ð
 × Ñ  ¢¨$Õ/Ø˜Ò(Ø%*�Õ"Ø˜Ò'Ü/°Ó6�Ø Ò&Ø#)¨)Ñ#4×#:Ñ#:Ó#<�D•LØ˜Ò'Ü/°"°U°G°Ó=�Ü$'¨¯
©
°:¸qÓ(AÓ$B�Ô!Ø$*§J¡J¨x¸Ó$D�Ö!ØÐ,Ò,Ü%;¸EÓ%B�Ö"ØÐ+Ô+à Ó&Ü)?ÀÓ)F�DÖ&ñC!	GrT   aê      The MIME headers of the catalog, used for the special ``msgid ""`` entry.

    The behavior of this property changes slightly depending on whether a locale
    is set or not, the latter indicating that the catalog is actually a template
    for actual translations.

    Here's an example of the output for such a catalog template:

    >>> from babel.dates import UTC
    >>> from datetime import datetime
    >>> created = datetime(1990, 4, 1, 15, 30, tzinfo=UTC)
    >>> catalog = Catalog(project='Foobar', version='1.0',
    ...                   creation_date=created)
    >>> for name, value in catalog.mime_headers:
    ...     print('%s: %s' % (name, value))
    Project-Id-Version: Foobar 1.0
    Report-Msgid-Bugs-To: EMAIL@ADDRESS
    POT-Creation-Date: 1990-04-01 15:30+0000
    PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE
    Last-Translator: FULL NAME <EMAIL@ADDRESS>
    Language-Team: LANGUAGE <LL@li.org>
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit
    Generated-By: Babel ...

    And here's an example of the output when the locale is set:

    >>> revised = datetime(1990, 8, 3, 12, 0, tzinfo=UTC)
    >>> catalog = Catalog(locale='de_DE', project='Foobar', version='1.0',
    ...                   creation_date=created, revision_date=revised,
    ...                   last_translator='John Doe <jd@example.com>',
    ...                   language_team='de_DE <de@example.com>')
    >>> for name, value in catalog.mime_headers:
    ...     print('%s: %s' % (name, value))
    Project-Id-Version: Foobar 1.0
    Report-Msgid-Bugs-To: EMAIL@ADDRESS
    POT-Creation-Date: 1990-04-01 15:30+0000
    PO-Revision-Date: 1990-08-03 12:00+0000
    Last-Translator: John Doe <jd@example.com>
    Language: de_DE
    Language-Team: de_DE <de@example.com>
    Plural-Forms: nplurals=2; plural=(n != 1);
    MIME-Version: 1.0
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit
    Generated-By: Babel ...

    :type: `list`
    c                óŒ   — | j                   €-d}| j                  rt        | j                  «      d   }|| _         | j                   S )z¹The number of plurals used by the catalog or locale.

        >>> Catalog(locale='en').num_plurals
        2
        >>> Catalog(locale='ga').num_plurals
        5

        :type: `int`r9   r   )rÓ   rÅ   r   )rk   Únums     r+   Únum_pluralszCatalog.num_plurals‡  sC   € ð ×ÑÐ$ØˆCØ�{Š{Ü  §¡Ó-¨aÑ0�Ø #ˆDÔØ× Ñ Ð rT   c                óŒ   — | j                   €-d}| j                  rt        | j                  «      d   }|| _         | j                   S )aW  The plural expression used by the catalog or locale.

        >>> Catalog(locale='en').plural_expr
        '(n != 1)'
        >>> Catalog(locale='ga').plural_expr
        '(n==1 ? 0 : n==2 ? 1 : n>=3 && n<=6 ? 2 : n>=7 && n<=10 ? 3 : 4)'
        >>> Catalog(locale='ding').plural_expr  # unknown locale
        '(n != 1)'

        :type: `str`rÿ   r/   )rÔ   rÅ   r   )rk   Úexprs     r+   Úplural_exprzCatalog.plural_expr˜  sC   € ð ×ÑÐ$ØˆDØ�{Š{Ü! $§+¡+Ó.¨qÑ1�Ø $ˆDÔØ× Ñ Ð rT   c                ó<   — d| j                   › d| j                  › d�S )zöReturn the plural forms declaration for the locale.

        >>> Catalog(locale='en').plural_forms
        'nplurals=2; plural=(n != 1);'
        >>> Catalog(locale='pt_BR').plural_forms
        'nplurals=2; plural=(n > 1);'

        :type: `str`z	nplurals=z	; plural=ú;)r	  r  rr   s    r+   rõ   zCatalog.plural_forms«  s'   € ð ˜4×+Ñ+Ð,¨I°d×6FÑ6FÐ5GÀqÐIÐIrT   c                ó<   — | j                  |«      | j                  v S )z?Return whether the catalog has a message with the specified ID.©Ú_key_forrÇ   ©rk   rX   s     r+   Ú__contains__zCatalog.__contains__·  s   € à�}‰}˜RÓ  D§N¡NÐ2Ð2rT   c                ó,   — t        | j                  «      S )zeThe number of messages in the catalog.

        This does not include the special ``msgid ""`` entry.)ÚlenrÇ   rr   s    r+   Ú__len__zCatalog.__len__»  s   € ô �4—>‘>Ó"Ð"rT   c              #  ó  K  — g }| j                   D ]  \  }}|j                  |› d|› �«       Œ t        «       }| j                  r|dhz  }t	        ddj                  |«      |¬«      –— | j                  D ]  }| j                  |   –— Œ y­w)z¡Iterates through all the entries in the catalog, in the order they
        were added, yielding a `Message` object for every entry.

        :rtype: ``iterator``z: r™   rW   rò   rš   N)Úmime_headersr"   r^   r™   r   r  rÇ   )rk   Úbufr>   rI   r_   Úkeys         r+   Ú__iter__zCatalog.__iter__Á  s�   è ø€ ð
 ˆØ×,Ñ,ò 	+‰KˆD�%Ø�J‰J˜$˜˜r % Ð)Õ*ð	+ä“ˆØ�:Š:Ø�g�YÑˆEÜ�b˜$Ÿ)™) C›.°Ô6Ò6Ø—>‘>ò 	&ˆCØ—.‘. Ñ%Ó%ñ	&ùs   ‚BBc                óŒ   — d}| j                   rd| j                   › �}dt        | «      j                  › d| j                  ›|› d�S )NrW   ro   rn   ú>)rÅ   rp   rq   rÄ   rÚ   s     r+   rs   zCatalog.__repr__Ð  sF   € ØˆØ�;Š;Ø˜Ÿ™˜Ð&ˆFØ”4˜“:×&Ñ&Ð' q¨¯©¨¸°x¸qÐAÐArT   c                ó&   — | j                  |«       y)z)Delete the message with the specified ID.N)Údeleter  s     r+   Ú__delitem__zCatalog.__delitem__Ö  s   € à�‰�B�rT   c                ó$   — | j                  |«      S )zUReturn the message with the specified ID.

        :param id: the message ID
        )r  r  s     r+   Ú__getitem__zCatalog.__getitem__Ú  s   € ð
 �x‰x˜‹|ÐrT   c                óL  — t        |t        «      sJ d«       ‚| j                  ||j                  «      }| j                  j                  |«      }|�r|j                  r.|j                  s"|j                  |_        |j                  |_        t        t        j                  g |j                  ¢|j                  ¢«      «      |_        t        t        j                  g |j                  ¢|j                  ¢«      «      |_        t        t        j                  g |j                  ¢|j                  ¢«      «      |_        |xj                  |j                  z  c_        y|dk(  rat!        |j                  «      j#                  «       | _        dj'                  d„ |j                  D «       «      | _        |j*                  | _        yt        |t        t,        f«      r=t        |j                  t        t,        f«      sJ dt/        |j                  «      › �«       ‚|| j                  |<   y)aß  Add or update the message with the specified ID.

        >>> catalog = Catalog()
        >>> catalog['foo'] = Message('foo')
        >>> catalog['foo']
        <Message 'foo' (flags: [])>

        If a message with that ID is already in the catalog, it is updated
        to include the locations and flags of the new message.

        >>> catalog = Catalog()
        >>> catalog['foo'] = Message('foo', locations=[('main.py', 1)])
        >>> catalog['foo'].locations
        [('main.py', 1)]
        >>> catalog['foo'] = Message('foo', locations=[('utils.py', 5)])
        >>> catalog['foo'].locations
        [('main.py', 1), ('utils.py', 5)]

        :param id: the message ID
        :param message: the `Message` object
        zexpected a Message objectrW   rò   c              3  óB   K  — | ]  }d |› �j                  «       –— Œ y­w)z# N)Úrstrip)Ú.0Úcs     r+   ú	<genexpr>z&Catalog.__setitem__.<locals>.<genexpr>  s   è ø€ Ò+]À!¨b°°¨H¯O©O×,=Ñ+]ùs   ‚zExpected sequence but got N)rf   r   r  rj   rÇ   r  rY   rX   r1   rZ   r[   r\   r]   rd   re   r_   r   Úitemsr  r  rÕ   r™   rœ   rp   )rk   rX   Úmessager  Úcurrents        r+   Ú__setitem__zCatalog.__setitem__á  s¡  € ô, ˜'¤7Ô+ÐHÐ-HÓHÐ+Ø�m‰m˜B §¡Ó0ˆØ—.‘.×$Ñ$ SÓ)ˆÚØ×#Ò#¨G×,@Ò,@à$ŸZ™Z�”
Ø!(§¡�”Ü $¤T§]¡]Ð3[°W×5FÑ5FÐ3[È×IZÑIZÐ3[Ó%\Ó ]ˆGÔÜ$(¬¯©Ð7g¸×9NÑ9NÐ7gÐQX×QfÑQfÐ7gÓ)hÓ$iˆGÔ!Ü$(¬¯©Ð7g¸×9NÑ9NÐ7gÐQX×QfÑQfÐ7gÓ)hÓ$iˆGÔ!Ø�MŠM˜WŸ]™]Ñ*ŽMØ�2ŠXä 3°G·N±NÓ C× IÑ IÓ KˆDÔØ"&§)¡)Ñ+]Àw×G\ÑG\Ô+]Ó"]ˆDÔØ Ÿ™ˆD�Jä˜"œt¤U˜mÔ,Ü! '§.¡.´4¼°-Ô@ð Ø0´°g·n±nÓ1EÐ0FÐGóÐ@ð #*ˆD�N‰N˜3ÒrT   c
                óJ   — t        ||t        |«      ||||||	¬«	      }
|
| |<   |
S )aq  Add or update the message with the specified ID.

        >>> catalog = Catalog()
        >>> catalog.add('foo')
        <Message ...>
        >>> catalog['foo']
        <Message 'foo' (flags: [])>

        This method simply constructs a `Message` object with the given
        arguments and invokes `__setitem__` with that object.

        :param id: the message ID, or a ``(singular, plural)`` tuple for
                   pluralizable messages
        :param string: the translated message string, or a
                       ``(singular, plural)`` tuple for pluralizable messages
        :param locations: a sequence of ``(filename, lineno)`` tuples
        :param flags: a set or sequence of flags
        :param auto_comments: a sequence of automatic comments
        :param user_comments: a sequence of user comments
        :param previous_id: the previous message ID, or a ``(singular, plural)``
                            tuple for pluralizable messages
        :param lineno: the line number on which the msgid line was found in the
                       PO file, if any
        :param context: the message context
        )ri   rj   )r   rZ   )rk   rX   r1   r]   r_   rd   re   rh   ri   rj   r*  s              r+   ra   zCatalog.add  s>   € ôJ ØØÜ�‹OØØØØØØô

ˆð ˆˆR‰ØˆrT   c              #  ó€   K  — | j                   j                  «       D ]  }|j                  | ¬«      }|sŒ||f–— Œ y­w)a\  Run various validation checks on the translations in the catalog.

        For every message which fails validation, this method yield a
        ``(message, errors)`` tuple, where ``message`` is the `Message` object
        and ``errors`` is a sequence of `TranslationError` objects.

        :rtype: ``generator`` of ``(message, errors)``
        )r“   N)rÇ   Úvaluesr—   )rk   r*  r”   s      r+   r—   zCatalog.checkB  sA   è ø€ ð —~‘~×,Ñ,Ó.ò 	&ˆGØ—]‘]¨4�]Ó0ˆFÚØ˜v�oÓ%ñ	&ùs   ‚2>µ	>c                óX   — | j                   j                  | j                  ||«      «      S )z©Return the message with the specified ID and context.

        :param id: the message ID
        :param context: the message context, or ``None`` for no context
        )rÇ   r  r  )rk   rX   rj   s      r+   r  zCatalog.getP  s$   € ð �~‰~×!Ñ! $§-¡-°°GÓ"<Ó=Ð=rT   c                ó`   — | j                  ||«      }|| j                  v r| j                  |= yy)z©Delete the message with the specified ID and context.

        :param id: the message ID
        :param context: the message context, or ``None`` for no context
        Nr  ©rk   rX   rj   r  s       r+   r  zCatalog.deleteX  s1   € ð �m‰m˜B Ó(ˆØ�$—.‘.Ñ Ø—‘˜sÑ#ð !rT   c                ó
  ‡ ‡‡‡‡— ‰ j                   Š‰j                  «       Ši ‰ _         i }|sP‰D ]K  }|sŒ‰|   j                  sŒ‰ j                  |«      }‰|   j                  }	||	f|‰ j                  |«      <   ŒM t        «       Š	 	 	 	 	 	 	 	 dˆˆˆˆˆ fd„}
|D ]Ÿ  }|j                  sŒ‰ j                  |j                  |j                  «      }|‰v r |
|||«       ŒE|sJt        ‰ j                  |«      |j                  «       d«      }|r|d   }||   \  }}|�||f} |
|||«       Œ‘|‰ |j                  <   Œ¡ ‰D ]  }|s|‰vsŒ
‰|   ‰ j                  |<   Œ |r|j                  ‰ _        |r|j                  ‰ _        yy)a«  Update the catalog based on the given template catalog.

        >>> from babel.messages import Catalog
        >>> template = Catalog()
        >>> template.add('green', locations=[('main.py', 99)])
        <Message ...>
        >>> template.add('blue', locations=[('main.py', 100)])
        <Message ...>
        >>> template.add(('salad', 'salads'), locations=[('util.py', 42)])
        <Message ...>
        >>> catalog = Catalog(locale='de_DE')
        >>> catalog.add('blue', 'blau', locations=[('main.py', 98)])
        <Message ...>
        >>> catalog.add('head', 'Kopf', locations=[('util.py', 33)])
        <Message ...>
        >>> catalog.add(('salad', 'salads'), ('Salat', 'Salate'),
        ...             locations=[('util.py', 38)])
        <Message ...>

        >>> catalog.update(template)
        >>> len(catalog)
        3

        >>> msg1 = catalog['green']
        >>> msg1.string
        >>> msg1.locations
        [('main.py', 99)]

        >>> msg2 = catalog['blue']
        >>> msg2.string
        'blau'
        >>> msg2.locations
        [('main.py', 100)]

        >>> msg3 = catalog['salad']
        >>> msg3.string
        ('Salat', 'Salate')
        >>> msg3.locations
        [('util.py', 42)]

        Messages that are in the catalog but not in the template are removed
        from the main collection, but can still be accessed via the `obsolete`
        member:

        >>> 'head' in catalog
        False
        >>> list(catalog.obsolete.values())
        [<Message 'head' (flags: [])>]

        :param template: the reference catalog, usually read from a POT file
        :param no_fuzzy_matching: whether to use fuzzy matching of message IDs
        :param update_header_comment: whether to copy the header comment from the template
        :param keep_user_comments: whether to keep user comments from the old catalog
        :param update_creation_date: whether to copy the creation date from the template
        c                óp  •— | j                  «       } d}||k7  rpd}‰j                  |«       ‰j                  |«      }|€J ‚t        |j                  t
        «      r|j                  g| _        n1t        |j                  «      | _        n‰j                  |d «      }|€J ‚|j                  | _	        ‰r9|j                  r-t        t        j                  |j                  «      «      | _
        t        | j                  t        t        f«      r°t        | j                  t        t        f«      s;d}t        | j                  gdgt        | j                  «      dz
  z  z   «      | _	        n‹t        | j                  «      ‰	j                  k7  rid}t        | j                  d t        |j                  «       «      | _	        n6t        | j                  t        t        f«      rd}| j                  d   | _	        | xj                   |j                   z  c_        |r| xj                   dhz  c_        | ‰	| j                  <   y )NFTrW   r/   r   r™   )r�   ra   r  rf   rX   rg   rh   rZ   Úpopr1   re   r[   r\   rœ   r  r	  r_   )
r*  ÚoldkeyÚnewkeyr™   ÚoldmsgÚfuzzy_matchesÚkeep_user_commentsÚmessagesÚ	remainingrk   s
        €€€€€r+   Ú_mergezCatalog.update.<locals>._merge¯  sµ  ø€ ð
 —m‘m“oˆGØˆEØ˜ÒØ�Ø×!Ñ! &Ô)Ø!Ÿ™ fÓ-�ØÐ)Ð)Ð)Ü˜fŸi™i¬Ô-Ø+1¯9©9¨+�GÕ'ä*.¨v¯y©y«/�GÕ'à"Ÿ™ v¨tÓ4�ØÐ)Ð)Ð)Ø#Ÿ]™]ˆGŒNá! f×&:Ò&:Ü(,¬T¯]©]¸6×;OÑ;OÓ-PÓ(Q�Ô%ä˜'Ÿ*™*¤t¬U mÔ4Ü! '§.¡.´4¼°-Ô@Ø �EÜ%*Ø Ÿ™Ð(¨R¨D´C¸¿
¹
³OÀaÑ4GÑ,HÑIó&�G•Nô ˜Ÿ™Ó(¨D×,<Ñ,<Ò<Ø �EÜ%*¨7¯>©>Ð:N¼CÀÇÁÓ<NÐ+OÓ%P�G•NÜ˜GŸN™N¬T´5¨MÔ:Ø�Ø!(§¡°Ñ!2�”Ø�MŠM˜VŸ\™\Ñ)�MÙØ—’ ' Ñ*•Ø&ˆD�—‘ÒrT   r/   r   N)r*  r   r6  útuple[str, str] | strr7  r>  r©   rª   )rÇ   r   r1   r  rj   Ú_to_fuzzy_match_keyr^   rX   r,   ÚkeysrÒ   rÕ   rÐ   )rk   ÚtemplateÚno_fuzzy_matchingÚupdate_header_commentr:  Úupdate_creation_dateÚfuzzy_candidatesÚmsgidr  Úctxtr=  r*  ÚmatchesÚmodified_keyr7  Únewctxtr9  r;  r<  s   `   `           @@@r+   ÚupdatezCatalog.updateb  sË  ü€ ð~ —>‘>ˆØ—M‘M“Oˆ	ØˆŒð ÐÙ Ø!ò R�Ú˜X e™_×3Ó3ØŸ-™-¨Ó.�CØ# E™?×2Ñ2�DØGJÈDÀkÐ$ T×%=Ñ%=¸cÓ%BÒCð	Rô
 ›ˆð'	'Øð'	'à)ð'	'ð *ð'	'ð ÷	'	'ñ '	'ðR  ò 	/ˆGØ�z‹zØ—m‘m G§J¡J°·±Ó@�Ø˜(‘?Ù˜7 C¨Õ-á,ä"3Ø ×4Ñ4°SÓ9Ø,×1Ñ1Ó3Øó#˜ñ
 #Ø+2°1©:˜LØ.>¸|Ñ.L™O˜F GØ&Ð2Ø)/°¨ Ù" 7¨F°CÔ8Ø$à'.�D˜Ÿ™Ò$ð+	/ð. ò 	8ˆEÙ  E°Ò$>Ø'0°Ñ'7�—‘˜eÒ$ð	8ñ !ð #+×"9Ñ"9ˆDÔñ  Ø!)×!7Ñ!7ˆDÕð  rT   c                ón   — t        |t        «      r|d   }n|}|j                  «       j                  «       S )z?Converts a message key to a string suitable for fuzzy matching.r   )rf   rœ   r   Ústrip)rk   r  Úmatchkeys      r+   r?  zCatalog._to_fuzzy_match_keyý  s0   € ä�cœ5Ô!Ø˜1‘v‰HàˆHØ�~‰~Ó×%Ñ%Ó'Ð'rT   c                óL   — |}t        |t        t        f«      r|d   }|�||f}|S )z©The key for a message is just the singular ID even for pluralizable
        messages, but is a ``(msgid, msgctxt)`` tuple for context-specific
        messages.
        r   )rf   rZ   rœ   r2  s       r+   r  zCatalog._key_for  s4   € ð ˆÜ�cœD¤%˜=Ô)Ø�Q‘%ˆCØÐØ˜�.ˆCØˆ
rT   c                ób  — t        |t        «      sJ ‚| j                  j                  «       |j                  j                  «       z  D ];  }| j	                  |«      }|j	                  |«      }|�|�|j                  |«      rŒ; y t        | j                  «      t        |j                  «      k(  S )z\Checks if catalogs are identical, taking into account messages and
        headers.
        F)rf   r   rÇ   r@  r  r�   r[   r  )rk   rx   r  Ú	message_1Ú	message_2s        r+   r�   zCatalog.is_identical  s›   € ô ˜%¤Ô)Ð)Ð)Ø—>‘>×&Ñ&Ó(¨5¯?©?×+?Ñ+?Ó+AÑAò 	ˆCØŸ™ ›ˆIØŸ	™	 #›ˆIØÐ  IÐ$5¸Y×=SÑ=SÐT]Õ=^Ùð		ô
 �D×%Ñ%Ó&¬$¨u×/AÑ/AÓ*BÑBÐBrT   )rÅ   úLocale | str | NonerÄ   r¨   rÕ   r¨   rÈ   r¨   rÉ   r¨   rÊ   r¨   rË   r¨   rÐ   zdatetime.datetime | str | NonerÑ   z6datetime.datetime | datetime.time | float | str | NonerÌ   r¨   rÍ   r¨   rÎ   r¨   r™   rŸ   r©   rª   )rÅ   rS  r©   rª   )r©   zLocale | None)r©   r¨   r«   )r1   r¨   r©   rª   )r©   zlist[tuple[str, str]])rö   zIterable[tuple[str, str]]r©   rª   )r©   rE   )rX   r   r©   rŸ   )r©   zIterator[Message])rX   r   r©   rª   )rX   r   r©   r   )rX   r   r*  r   r©   rª   )Nr£   r£   r£   r£   r£   NN)rX   r   r1   r¤   r]   r¥   r_   r¦   rd   r¦   re   r¦   rh   r   ri   r§   rj   r¨   r©   r   )r©   z0Iterable[tuple[Message, list[TranslationError]]]r­   )rX   r   rj   r¨   r©   zMessage | None)rX   r   rj   r¨   r©   rª   )FFTT)rA  r   rB  rŸ   rC  rŸ   r:  rŸ   rD  rŸ   r©   rª   )r  r>  r©   rg   )rX   r   rj   r¨   r©   r>  )rx   r   r©   rŸ   )$rq   r®   r¯   r°   r   rl   rÛ   rÝ   rß   r±   rÅ   rå   ré   rë   rÕ   r÷   r  r  r	  r  rõ   r  r  r  rs   r   r"  r,  ra   r—   r  r  rK  r?  r  r�   r£   rT   r+   r   r   h  s¸  „ Ù.ð '+Ø!Ø%3Ø"Ø"Ø'+Ø)-Ø8<ØPTØ&*Ø$(Ø"ØðD!à#ðD!ð ðD!ð #ð	D!ð
 ðD!ð ðD!ð %ðD!ð 'ðD!ð 6ðD!ð NðD!ð $ðD!ð "ðD!ð ðD!ð ðD!ð 
óD!óL
ó.ó'ñ �k ;Ó/€FÙ Ð!7Ó8Ðóó &ñ ØØðô#€NóJ óD"GñH ØØð2ô6€Lðp ò!ó ð!ð  ò!ó ð!ð$ ò	Jó ð	Jó3ó#ó&óBóóó,*ðb %)Ø/1Ø!Ø')Ø')Ø"$Ø!Ø"ð1àð1ð "ð1ð -ð	1ð
 ð1ð %ð1ð %ð1ð  ð1ð ð1ð ð1ð 
ó1óf&ô>ô$ð #(Ø&+Ø#'Ø%)ðY8àðY8ð  ðY8ð  $ð	Y8ð
 !ðY8ð #ðY8ð 
óY8óv(ð #ðàðð ðð 
ó	ô 
CrT   r   )é   g333333ã?)r1   rg   r©   rŸ   )rI   rg   r©   zdatetime.datetime)rI   rg   r©   zdict[str, str])rÃ   Ústrict)r(   zstr | bytesr¼   rg   r”   rg   r©   rg   )5r°   Ú
__future__r   r7   rA   Úcollections.abcr   r   r   Údifflibr   Úemailr   Úheapqr	   r1   r
   Útypingr   Úbabelr   rÁ   Ú
babel.corer   r   Úbabel.datesr   Úbabel.messages.pluralsr   Ú
babel.utilr   r   Útyping_extensionsr   rg   rœ   rZ   r   Ú__annotations__Ú__all__r,   ÚcompileÚVERBOSEr   r5   rS   r   Ú	Exceptionr   r   r¸   r½   r   r£   rT   r+   ú<module>rg     sÎ   ðòõ #ã Û 	ß .Ý Ý #Ý %Ý Ý Ý  å (ß 1Ý 'Ý -ß $áÝ+à %¨¨S¨¡/Ñ1°D¸±IÑ=€J�	Ó=ò€ó&ð8 �—
‘
ð	ð ‡J�Jó€óó&÷B}-ñ }-ô@%�yô %ð
€ó ô÷w
Cò w
CrT   