+
    *:go#                    F   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
Ht ^ RIHtHtHt ^ RIHtHt ]! 4       t]! R4      tR R lt]P.                  ! R	]P0                  4      tR
 R lt]P.                  ! R4      tRR R lltR R lt ! R R]P<                  4      tRR R llt] t! ! R R]PD                  4      t#]PH                  t$]PJ                  t%]PL                  t&]PN                  t']PP                  t(]PR                  t)]PT                  t*R R lt+R# )z
babel.util
~~~~~~~~~~

Various utility classes and functions.

:copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
)annotationsN)	GeneratorIterable)IOAnyTypeVar)dates	localtime_Tc                    V ^8  d   QhRRRR/# )   iterablezIterable[_T]returnzGenerator[_T, None, None] )formats   ",/usr/lib/python3/dist-packages/babel/util.py__annotate__r      s      | (A     c              #     "   \        4       p\        V 4       F   pW!9  g   K  Vx  VP                  V4       K"  	  R# 5i)av  Yield all items in an iterable collection that are distinct.

Unlike when using sets for a similar effect, the original ordering of the
items in the collection is preserved by this function.

>>> print(list(distinct([1, 2, 1, 3, 4, 4])))
[1, 2, 3, 4]
>>> print(list(distinct('foobar')))
['f', 'o', 'b', 'a', 'r']

:param iterable: the iterable collection providing the data
N)setiteradd)r   seenitems   &  r   distinctr      s2      5DXJHHTN s   >>s(   [ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)c                    V ^8  d   QhRRRR/# )r   fp	IO[bytes]r   
str | Noner   )r   s   "r   r   r   5   s     - -y -Z -r   c                l   V P                  4       pV P                  ^ 4        V P                  4       pVP                  \        P
                  4      pV'       d   V\        \        P
                  4      R p\        P                  V4      pV'       gK    ^ RI	pVP                  VP                  R4      4       V P                  4       p\        P                  V4      pV'       dS   V'       d7   VP                  ^4      P                  R4      pVR8w  d   \        RV R24      h V P                  V4       R# V'       d2   VP                  ^4      P                  R4      V P                  V4       #  V P                  V4       R#   \        \        \        3 d     Li ; i  T P                  T4       i ; i)a  Deduce the encoding of a source file from magic comment.

It does this in the same way as the `Python interpreter`__

.. __: https://docs.python.org/3.4/reference/lexical_analysis.html#encoding-declarations

The ``fp`` argument should be a seekable file object.

(From Jeff Dairiki)
Nlatin-1zutf-8zencoding problem: z	 with BOM)tellseekreadline
startswithcodecsBOM_UTF8lenPYTHON_MAGIC_COMMENT_rematchastparsedecodeImportErrorSyntaxErrorUnicodeEncodeErrorgroup)r   posline1has_bommr*   line2magic_comment_encodings   &       r   parse_encodingr7   5   sW    '')CGGAJ ""6??3#foo./0E#))%09		%,,y12 +11%8)*):):9)E&)W4%(:;Q:RR[&\]] 	 771:$$Y/ 	 
+  .@A 
 * 	sM   6F  8F  $F 8,F  %F  -6F  7F  ?F  FF  FF   F3z'from\s+__future__\s+import\s+\(*(.+)\)*c               $    V ^8  d   QhRRRRRR/# )r   r   r   encodingstrr   intr   )r   s   "r   r   r   i   s!      9  C r   c                   ^ RI pV P                  4       pV P                  ^ 4       ^ p V P                  4       P	                  V4      p\
        P                  ! RRV4      p\
        P                  ! RRV4      p\
        P                  ! RRV4      p\        P                  V4       F  pVP                  ^4      P                  R4       Uu. uF!  qwP                  4       P                  R	4      NK#  	  ppV F+  p	\        W)R4      p
V
'       g   K  WJP                  ,          pK-  	  K  	  V P                  V4       V# u upi   T P                  T4       i ; i)
zJParse the compiler flags by :mod:`__future__` from the given Python
code.
Nzimport\s*\([\r\n]+zimport (z,\s*[\r\n]+z, z\\\s*[\r\n]+ ,z())
__future__r!   r"   readr,   resubPYTHON_FUTURE_IMPORT_refinditerr0   splitstripgetattrcompiler_flag)r   r9   r?   r1   flagsbodyr4   xnamesnamefeatures   &&         r   parse_future_flagsrO   i   s    
'')CGGAJEwwy) vv+Z>vvndD1vvosD1(11$7A45GGAJ4D4DS4IJ4IqWWY__T*4IEJ!*D97222E  8 	L K 	s$   B!E  
'D;1E  E  ;E   Ec               $    V ^8  d   QhRRRRRR/# )r   patternr:   filenamer   boolr   )r   s   "r   r   r      s!     > >s >c >d >r   c                H   RRRRRRRRR	R
RR/pV P                  R4      '       d   R.pV R,          p M&V P                  R4      '       d   R.pV R,          p M. p\        \        P                  ! RV 4      4       F\  w  rEV^,          '       d   VP	                  W%,          4       K-  V'       g   K7  VP	                  \        P
                  ! V4      4       K^  	  \        P                  ! RP                  V4       R2VP                  \        P                  R4      4      pVRJ# )a  Extended pathname pattern matching.

This function is similar to what is provided by the ``fnmatch`` module in
the Python standard library, but:

 * can match complete (relative or absolute) path names, and not just file
   names, and
 * also supports a convenience pattern ("**") to match files at any
   directory level.

Examples:

>>> pathmatch('**.py', 'bar.py')
True
>>> pathmatch('**.py', 'foo/bar/baz.py')
True
>>> pathmatch('**.py', 'templates/index.html')
False

>>> pathmatch('./foo/**.py', 'foo/bar/baz.py')
True
>>> pathmatch('./foo/**.py', 'bar/baz.py')
False

>>> pathmatch('^foo/**.py', 'foo/bar/baz.py')
True
>>> pathmatch('^foo/**.py', 'bar/baz.py')
False

>>> pathmatch('**/templates/*.html', 'templates/index.html')
True
>>> pathmatch('**/templates/*.html', 'templates/foo/bar.html')
False

:param pattern: the glob pattern
:param filename: the path name of the file to match against
?z[^/]z?/z[^/]/*z[^/]+z*/z[^/]+/z**/z	(?:.+/)*?z**z(?:.+/)*?[^/]+^:   NNz./:r   NNz	([?*]+/?) $/N)r$   	enumeraterA   rE   appendescaper)   joinreplaceossep)rQ   rR   symbolsbufidxpartr)   s   &&     r   	pathmatchrg      s    N 	VgWh{G #e"+			D	!	!e"+rxxW=>	77JJw}%TJJryy'	 ?
 HH~Q')9)9"&&#)FGEr   c                  p   a  ] tR t^t]P
                  ! R4      t]P
                  ! R4      tV 3R ltRt	V ;t
# )TextWrapperz((\s+|(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))z$(\u2068[^\u2068]+?\u2069(?::-?\d+)?)c                V  < RpW!9  d   \         SV `  V4      # . p\        P                  ! V P                  V4       FK  pVP                  V4      '       d   VP                  V4       K-  VP                  \         SV `  V4      4       KM  	  V Uu. uF  qU'       g   K  VNK  	  up# u upi )zlSplits the text into indivisible chunks while ensuring that file names
containing spaces are not broken up.
u   ⁨)super_splitrA   rE   _enclosed_filename_rer$   r]   extend)selftextenclosed_filename_startchunkschunkc	__class__s   &&    r   rl   TextWrapper._split   s     #+".7>$''XXd88$?E 788e$egnU34	 @
 "'6aQ6'''s   	B&B&r   )__name__
__module____qualname____firstlineno__rA   compile
wordsep_rerm   rl   __static_attributes____classcell__)ru   s   @r   ri   ri      s2    	/J JJ'NO( (r   ri   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   rp   r:   widthr;   initial_indentsubsequent_indentr   z	list[str]r   )r   s   "r   r   r      s1      3 s  VY cl r   c                z    \         P                  ! R\        ^R7       \        WVRR7      pVP	                  V 4      # )a  Simple wrapper around the ``textwrap.wrap`` function in the standard
library. This version does not wrap lines on hyphens in words. It also
does not wrap PO file locations containing spaces.

:param text: the text to wrap
:param width: the maximum line width
:param initial_indent: string that will be prepended to the first line of
                       wrapped output
:param subsequent_indent: string that will be prepended to all lines save
                          the first of wrapped output
z`babel.util.wraptext` is deprecated and will be removed in a future version of Babel. If you need this functionality, use the `babel.util.TextWrapper` class directly.)
stacklevelF)r   r   r   break_long_words)warningswarnDeprecationWarningri   wrap)rp   r   r   r   wrappers   &&&& r   wraptextr      sA     MM	[	 ,=+02G <<r   c                  f    ] tR tRtRtRR R lltR R ltR R	 ltR
 R ltR R lt	R R lt
RtR# )FixedOffsetTimezonei  z&Fixed offset in minutes east from UTC.Nc               $    V ^8  d   QhRRRRRR/# )r   offsetfloatrM   r   r   Noner   )r   s   "r   r    FixedOffsetTimezone.__annotate__  s!      u J $ r   c                	d    \         P                  ! VR 7      V n        Vf
   RV,          pW n        R# ))minutesNz
Etc/GMT%+d)datetime	timedelta_offsetzone)ro   r   rM   s   &&&r   __init__FixedOffsetTimezone.__init__  s(    ))&9<&(D	r   c                   V ^8  d   QhRR/# r   r   r:   r   )r   s   "r   r   r     s       r   c                	    V P                   # Nr   ro   s   &r   __str__FixedOffsetTimezone.__str__      yyr   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r     s     = =# =r   c                	<    R V P                    RV P                   R2# )z<FixedOffset "z" >)r   r   r   s   &r   __repr__FixedOffsetTimezone.__repr__  s    		{"T\\N!<<r   c                    V ^8  d   QhRRRR/# r   dtdatetime.datetimer   zdatetime.timedeltar   )r   s   "r   r   r     s      - 2D r   c                	    V P                   # r   )r   ro   r   s   &&r   	utcoffsetFixedOffsetTimezone.utcoffset  s    ||r   c                    V ^8  d   QhRRRR/# )r   r   r   r   r:   r   )r   s   "r   r   r     s      * s r   c                	    V P                   # r   r   r   s   &&r   tznameFixedOffsetTimezone.tzname  r   r   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r     s      ' ,> r   c                	    \         # r   )ZEROr   s   &&r   dstFixedOffsetTimezone.dst  s    r   )r   r   r   )rw   rx   ry   rz   __doc__r   r   r   r   r   r   r}   r   r   r   r   r     s(    0= r   r   c                    V ^8  d   QhRRRR/# )r   ar   br   )r   s   "r   r   r   '  s      C C r   c                    W8  W8  ,
          # r   r   )r   r   s   &&r   _cmpr   '  s    Eaer   )r    )F   rY   rY   ),r   r?   r   r%   r   ra   rA   textwrapr   collections.abcr   r   typingr   r   r   babelr   r	   objectmissingr
   r   r{   VERBOSEr(   r7   rC   rO   rg   ri   r   dictodicttzinfor   UTCLOCALTZget_localzone	STDOFFSET	DSTOFFSETDSTDIFFr   r   r   r   r   <module>r      s    #   	 	   / # # "
(T]* **0"**> -` **.0 @>B((&& (62 	(// : ii
--''		


~~r   