+
     h2  c                   s    ^ RI Ht ^ RIHt ^ RIHtHtHt ]! ^ 4      tRR.tR t	]
! ]R4      '       d   RR ltM ! R	 R
]4      tRR ltR t ! R R]4      t ! R R]4      tR# )i    )PY2wraps)datetime	timedeltatzinfotzname_in_python2enfoldc                sL   a  \         '       d   \        S 4      V 3R l4       pV# S # )zChange unicode output into bytestrings in Python 2

tzname() API changed in Python 3. It used to return bytes, but was changed
to unicode strings
c                  s@   < S! V / VB pVe   VP                  4       pV# N)Zencode)argskwargsZnamenamefuncs   *, 8/usr/lib/python3.14/site-packages/dateutil/tz/_common.pyadjust_encodingZ*tzname_in_python2.<locals>.adjust_encoding   s(    T,V,D{{}K    )r    r   )r   r      f r   r   r      s-     s	x	 
	 r   foldc                s&    V P                  VR7      # )F  
Provides a unified interface for assigning the ``fold`` attribute to
datetimes both before and after the implementation of PEP-495.

:param fold:
    The value for the ``fold`` attribute in the returned datetime. This
    should be either 0 or 1.

:return:
    Returns an object for which ``getattr(dt, 'fold', 0)`` returns
    ``fold`` for all versions of Python. In versions prior to
    Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
    subclass of :py:class:`datetime.datetime` with the ``fold``
    attribute added, if ``fold`` is 1.

.. versionadded:: 2.6.0
r   replace)dtr      &&r   r   r   %   s    $ zztz$$r   c                   s>   a  ] tR t^:t o RtRtR t]R 4       tRt	V t
R# )_DatetimeWithFoldz
This is a class designed to provide a PEP 495-compliant interface for
Python versions before 3.6. It is used only for dates in a fold, so
the ``fold`` attribute is fixed at ``1``.

.. versionadded:: 2.6.0
c                s   Rp\        W4       F)  w  rEWR9   d   \        RP                  V4      4      hWBV&   K+  	  V F  pWR9  g   K  \        W4      W%&   K  	  VP	                  R^4      '       d   V P
                  M\        pV! R/ VB # )a  
Return a datetime with the same attributes, except for those
attributes given new values by whichever keyword arguments are
specified. Note that tzinfo=None can be specified to create a naive
datetime from an aware datetime with no conversion of date and time
data.

This is reimplemented in ``_DatetimeWithFold`` because pypy3 will
return a ``datetime.datetime`` even if ``fold`` is unchanged.
zDuplicate argument: {}r   )yearZmonthZdayZhourZminuteZsecondmicrosecondr    )Zzip	TypeErrorZformatgetattrZget	__class__r   )selfr	   r
   ZargnamesZargZargnameZdt_classs   &*,    r   r   Z_DatetimeWithFold.replaceD   s    H
 !$D 3$#$<$C$CG$LMM"%w	 !4 $(&-d&<FO $ *0FA)>)>t~~HH%f%%r   c                s    ^# i   r   r      &r   r   Z_DatetimeWithFold.foldb   s    r   r   N)__name__
__module____qualname____firstlineno____doc__Z	__slots__r   propertyr   __static_attributes____classdictcell__Z__classdict__   @r   r   r   :   s*     	 		&< 
	 
	r   r   c                s    \        V R^ 4      V8X  d   V # V P                  4       R,          pW P                  V P                  3,          pV'       d
   \	        V!  # \        V!  # )r   r   :Ni   N)r   Z	timetupler   r   r   r   )r   r   r	      && r   r   r   f   sW    $ 2vq!T)I||~b!++$d++T?"r   c                s0   a  \        S 4      V 3R l4       pV# )z
The CPython version of ``fromutc`` checks that the input is a ``datetime``
object and that ``self`` is attached as its ``tzinfo``.
c                 s   < \        V\        4      '       g   \        R 4      hVP                  V Jd   \	        R4      hS! W4      # )&fromutc() requires a datetime argumentdt.tzinfo is not self)
isinstancer   r   r   
ValueError)r   r   fs   &&r   fromutcZ)_validate_fromutc_inputs.<locals>.fromutc   s>    "h''DEE99D 455{r   r   )r1   r2   r   r   _validate_fromutc_inputsr3      s"    
 1X  Nr   c                   sL   a  ] tR t^t o RtR tR tR tR t]	R 4       t
RtV tR# )	_tzinfoz5
Base class for all ``dateutil`` ``tzinfo`` objects.
c                s   VP                  V R7      p\        V^ R7      p\        V^R7      pVP                  4       VP                  4       8H  pVP                  RR7      VP                  RR7      8H  pT;'       d    V'       * # )
Whether or not the "wall time" of a given datetime is ambiguous in this
zone.

:param dt:
    A :py:class:`datetime.datetime`, naive or time zone aware.


:return:
    Returns ``True`` if ambiguous, ``False`` otherwise.

.. versionadded:: 2.6.0
r   r   N)r   r   	utcoffset)r   r   Zwall_0Zwall_1Zsame_offsetZsame_dts   &&    r   is_ambiguousZ_tzinfo.is_ambiguous   sx     ZZtZ$##&&(F,<,<,>>...-t1LL**{?*r   c                s    V P                  V4      '       d;   W!,
          p\        W1P                  4       VP                  4       ,
          8H  4      pV# ^ pV# )aX  
Determine the fold status of a "wall" datetime, given a representation
of the same datetime as a (naive) UTC datetime. This is calculated based
on the assumption that ``dt.utcoffset() - dt.dst()`` is constant for all
datetimes, and that this offset is the actual number of hours separating
``dt_utc`` and ``dt_wall``.

:param dt_utc:
    Representation of the datetime as UTC

:param dt_wall:
    Representation of the datetime as "wall time". This parameter must
    either have a `fold` attribute or have a fold-naive
    :class:`datetime.tzinfo` attached, otherwise the calculation may
    fail.
)r8   intr7   dst)r   dt_utcdt_wallZ
delta_wall_folds   &&&  r   _fold_statusZ_tzinfo._fold_status   sQ    " W%% )J
'7'7'9FJJL'HIJE  Er   c                s    \        VR ^ 4      # r   )r   r   r   r   r   r=   Z_tzinfo._fold   s    r61%%r   c                s   VP                  4       pVf   \        R4      hVP                  4       pVf   \        R4      hW#,
          pW,          p\        V^R7      P                  4       pVf   \        R4      hW,           # )  
Given a timezone-aware datetime in a given timezone, calculates a
timezone-aware datetime in a new timezone.

Since this is the one time that we *know* we have an unambiguous
datetime object, we take this opportunity to determine whether the
datetime is ambiguous and in a "fold" state (e.g. if it's the first
occurrence, chronologically, of the ambiguous datetime).

:param dt:
    A timezone-aware :class:`datetime.datetime` object.
z0fromutc() requires a non-None utcoffset() resultz*fromutc() requires a non-None dst() resultr   z;fromutc(): dt.dst gave inconsistent results; cannot convert)r7   r0   r:   r   )r   r   ZdtoffZdtdstZdeltas   &&   r   _fromutcZ_tzinfo._fromutc   s     = & ' ' =IJJ
 r"&&(= 7 8 8zr   c                s^    V P                  V4      pV P                  W4      p\        W#R7      # )r@   r   )rA   r>   r   )r   r   r<   r=      &&  r   r2   Z_tzinfo.fromutc   s1     --# !!". g**r   r   N)r"   r#   r$   r%   r&   r8   r>   r=   rA   r3   r2   r(   r)   r*   r+   r   r4   r4      s3     +22&#J + +r   r4   c                   s   a  ] tR tRt o RtR tR tR t]R 4       t	R t
R tR	 tR
 t]R 4       tRtR tR t]P(                  tRtV tR# )tzrangebasei  aG  
This is an abstract base class for time zones represented by an annual
transition into and out of DST. Child classes should implement the following
methods:

    * ``__init__(self, *args, **kwargs)``
    * ``transitions(self, year)`` - this is expected to return a tuple of
      datetimes representing the DST on and off transitions in standard
      time.

A fully initialized ``tzrangebase`` subclass should also provide the
following attributes:
    * ``hasdst``: Boolean whether or not the zone uses DST.
    * ``_dst_offset`` / ``_std_offset``: :class:`datetime.timedelta` objects
      representing the respective UTC offsets.
    * ``_dst_abbr`` / ``_std_abbr``: Strings representing the timezone short
      abbreviations in DST and STD, respectively.
    * ``_hasdst``: Whether or not the zone has DST.

.. versionadded:: 2.6.0
c                s    \        R 4      h)z%tzrangebase is an abstract base class)ZNotImplementedErrorr    r!   r   __init__Ztzrangebase.__init__!  s    !"IJJr   c                sp    V P                  V4      pVf   R # V'       d   V P                  # V P                  # r   )_isdst_dst_offset_std_offsetr   r   isdstr,   r   r7   Ztzrangebase.utcoffset$  s2    B=######r   c                sd    V P                  V4      pVf   R # V'       d   V P                  # \        # r   )rE   _dst_base_offsetZEROrH   r,   r   r:   Ztzrangebase.dst.  s+    B=(((Kr   c                s`    V P                  V4      '       d   V P                  # V P                  # r   )rE   Z	_dst_abbrZ	_std_abbrr?   r   r   tznameZtzrangebase.tzname8  s#    ;;r??>>!>>!r   c                sF   \        V\        4      '       g   \        R4      hVP                  V Jd   \	        R4      hV P                  VP                  4      pVf   WP                  V4      ,           # Vw  r4W0P                  ,          pW@P                  ,          pW43pVP                  RR7      pV P                  We4      pV'       d   WP                  ,           pMWP                  ,           p\        V'       * ;'       d    V P                  V4      4      p	\        WR7      # )z+Given a datetime in UTC, return local time r-   r.   Nr6   r   )r/   r   r   r   r0   transitionsr   r7   rG   r   _naive_isdstrF   r9   r8   r   )
r   r   rM   dstondstoffZutc_transitionsr;   rI   r<   r=   s
   &&        r   r2   Ztzrangebase.fromutc?  s    "h''DEE99D 455 &&rww/r*** $!!!""" /4(!!&:+++G+++GI<<$"3"3G"<=g**r   c                s    V P                   '       g   R# V P                  VP                  4      w  r#VP                  RR7      pY1u;8*  ;'       d    W0P                  ,           8  # u # )r5   FNr6   )hasdstrM   r   r   rJ   )r   r   ZstartZendrB   r   r8   Ztzrangebase.is_ambiguous`  sV     {{{%%bgg.
ZZtZ$77C"7"777878r   c                s,   V P                   '       g   R # Vf   R# V P                  VP                  4      pVf   R # VP                  RR7      pV P	                  W4      pV'       g.   V P                  V4      '       d   V P                  V4      '       * # V# )FNr6   )rQ   rM   r   r   rN   r8   r=   )r   r   rM   rI   rB   r   rE   Ztzrangebase._isdstv  s~    {{{Z&&rww/ZZtZ$!!"2 **2..zz"~%%Lr   c                s    Vw  r4VP                  R R7      pW48  d   Y1u;8*  ;'       d    V8  pV# u pV# YAu;8*  ;'       d    V8  Mu '       * pV# )Nr6   r   )r   r   rM   rO   rP   rI   s   &&&   r   rN   Ztzrangebase._naive_isdst  s]    #ZZtZ$>((&(E 	 )E  ,,u,,Er   c                s<    V P                   V P                  ,
          # r   )rF   rG   r    r!   r   rJ   Ztzrangebase._dst_base_offset  s    $"2"222r   Nc                s    W8X  * # r   r   )r   Zotherr   r   __ne__Ztzrangebase.__ne__  s    ""r   c                s<    R V P                   P                  ,          # )z%s(...))r   r"   r    r!   r   __repr__Ztzrangebase.__repr__  s    4>>2222r   r   )r"   r#   r$   r%   r&   rD   r7   r:   r   rL   r2   r8   rE   rN   r'   rJ   Z__hash__rR   rS   ZobjectZ
__reduce__r(   r)   r*   r+   r   rC   rC     su     *K$ " "+B9,*
 3 3 H#3 ""Jr   rC   Nr   )Zsixr    Z	functoolsr   r   r   r   rK   Z__all__r   Zhasattrr   r   r3   r4   rC   r   r   r   <module>rT      ss      0 0 |
), 8V%**H *X#<"s+f s+lX#' X#r   