+
    i2                         ^ 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# )    )PY2wraps)datetime	timedeltatzinfotzname_in_python2enfoldc                L   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! V / VB pVe   VP                  4       pV# N)encode)argskwargsnamenamefuncs   *, s/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/dateutil/tz/_common.pyadjust_encoding*tzname_in_python2.<locals>.adjust_encoding   s(    T,V,D{{}K    )r   r   )r   r   s   f r   r	   r	      s-     s	x	 
	 r   foldc                &    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   s   &&r   r
   r
   %   s    $ zztz$$r   c                   >   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                   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   )yearmonthdayhourminutesecondmicrosecondr    )zip	TypeErrorformatgetattrget	__class__r   )selfr   r   argnamesargargnamedt_classs   &*,    r   r   _DatetimeWithFold.replaceD   s    H
 !$D 3$#$<$C$CG$LMM"%w	 !4 $(&-d&<FO $ *0FA)>)>t~~HH%f%%r   c                    ^#    r(   r/   s   &r   r   _DatetimeWithFold.foldb   s    r   r(   N)__name__
__module____qualname____firstlineno____doc__	__slots__r   propertyr   __static_attributes____classdictcell____classdict__s   @r   r   r   :   s*     	 		&< 
	 
	r   r   c                    \        V R^ 4      V8X  d   V # V P                  4       R,          pW P                  V P                  3,          pV'       d
   \	        V!  # \        V!  # )r   r   :N   N)r,   	timetupler'   r   r   r   )r   r   r   s   && r   r
   r
   f   sW    $ 2vq!T)I||~b!++$d++T?"r   c                0   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                    < \        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   fromutc)_validate_fromutc_inputs.<locals>.fromutc   s>    "h''DEE99D 455{r   r   )rN   rO   s   f r   _validate_fromutc_inputsrQ      s"    
 1X  Nr   c                   L   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                   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   wall_0wall_1same_offsetsame_dts   &&    r   is_ambiguous_tzinfo.is_ambiguous   sx     ZZtZ$##&&(F,<,<,>>...-t1LL**{?*r   c                    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.
)r\   intrW   dst)r/   dt_utcdt_wall
delta_wall_folds   &&&  r   _fold_status_tzinfo._fold_status   sQ    " W%% )J
'7'7'9FJJL'HIJE  Er   c                    \        VR ^ 4      # r   )r,   r/   r   s   &&r   rd   _tzinfo._fold   s    r61%%r   c                   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)rW   rM   r`   r
   )r/   r   dtoffdtdstdeltas   &&   r   _fromutc_tzinfo._fromutc   s     = & ' ' =IJJ
 r"&&(= 7 8 8zr   c                ^    V P                  V4      pV P                  W4      p\        W#R7      # )rk   r   )ro   re   r
   )r/   r   rb   rd   s   &&  r   rO   _tzinfo.fromutc   s1     --# !!". g**r   r(   N)r:   r;   r<   r=   r>   r\   re   rd   ro   rQ   rO   rA   rB   rC   s   @r   rS   rS      s3     +22&#J + +r   rS   c                      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                    \        R 4      h)z%tzrangebase is an abstract base class)NotImplementedErrorr8   s   &r   __init__tzrangebase.__init__!  s    !"IJJr   c                p    V P                  V4      pVf   R # V'       d   V P                  # V P                  # r   )_isdst_dst_offset_std_offsetr/   r   isdsts   && r   rW   tzrangebase.utcoffset$  s2    B=######r   c                d    V P                  V4      pVf   R # V'       d   V P                  # \        # r   )rz   _dst_base_offsetZEROr}   s   && r   r`   tzrangebase.dst.  s+    B=(((Kr   c                `    V P                  V4      '       d   V P                  # V P                  # r   )rz   	_dst_abbr	_std_abbrrh   s   &&r   tznametzrangebase.tzname8  s#    ;;r??>>!>>!r   c                F   \        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 rJ   rK   NrV   r   )rL   r   r*   r   rM   transitionsr!   rW   r|   r   _naive_isdstr{   r_   r\   r
   )
r/   r   r   dstondstoffutc_transitionsra   r~   rb   rd   s
   &&        r   rO   tzrangebase.fromutc?  s    "h''DEE99D 455 &&rww/r*** $!!!""" /4(!!&:+++G+++GI<<$"3"3G"<=g**r   c                    V P                   '       g   R# V P                  VP                  4      w  r#VP                  RR7      pY1u;8*  ;'       d    W0P                  ,           8  # u # )rU   FNrV   )hasdstr   r!   r   r   )r/   r   startends   &&  r   r\   tzrangebase.is_ambiguous`  sV     {{{%%bgg.
ZZtZ$77C"7"777878r   c                ,   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# )FNrV   )r   r   r!   r   r   r\   rd   )r/   r   r   r~   s   &&  r   rz   tzrangebase._isdstv  s~    {{{Z&&rww/ZZtZ$!!"2 **2..zz"~%%Lr   c                    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# )NrV   r   )r/   r   r   r   r   r~   s   &&&   r   r   tzrangebase._naive_isdst  s]    #ZZtZ$>((&(E 	 )E  ,,u,,Er   c                <    V P                   V P                  ,
          # r   )r{   r|   r8   s   &r   r   tzrangebase._dst_base_offset  s    $"2"222r   Nc                    W8X  * # r   r(   )r/   others   &&r   __ne__tzrangebase.__ne__  s    ""r   c                <    R V P                   P                  ,          # )z%s(...))r.   r:   r8   s   &r   __repr__tzrangebase.__repr__  s    4>>2222r   r(   )r:   r;   r<   r=   r>   rw   rW   r`   r	   r   rO   r\   rz   r   r@   r   __hash__r   r   object
__reduce__rA   rB   rC   s   @r   rt   rt     su     *K$ " "+B9,*
 3 3 H#3 ""Jr   rt   Nr6   )sixr   	functoolsr   r   r   r   r   __all__r	   hasattrr
   r   rQ   rS   rt   r(   r   r   <module>r      ss      0 0 |
), 8V%**H *X#<"s+f s+lX#' X#r   