+
    s6!jm`                        ^ RI t ^ RIt^ RIt^ RIt^ RIHtHt ^RIHt ^RI	H
t
 ^	tRtRt]P                  ! R4      t]! RR	04      t]! 0 R<m4      t]! 0 R=m4      t]! 0 R>m4      t]! R
R04      t]! 0 R?m4      t]! RR04      t]! RR04      t]! RR04      tR R lt ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR R lt R R lt!R R lt"R R lt#R  R! lt$R" R# l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. R/ llt+R0 R1 lt,R2 R3 lt-R4 R5 lt.RAR6 R7 llt/RBR8 R9 llt0RBR: R; llt1R# )C    N)OptionalUnion)idnadata)intranges_contains   xn--i   u   [.。．｡]RALANENLDc                F    V ^8  d   QhR\         R\        \        ,          /#    cpreturn)intr   str)formats   ")lib/python3.14/site-packages/idna/core.py__annotate__r      s      c hsm     c                 ~    \         P                  P                  4        F  w  r\        W4      '       g   K  Vu # 	  R # N)r   joining_typesitemsr   )r   jtrangess   &  r   _joining_typer      s2    ,,224
R((I 5 r   c                       ] tR t^#tRtRtR# )	IDNAErrorz5Base exception for all IDNA-encoding related problems N__name__
__module____qualname____firstlineno____doc____static_attributes__r!   r   r   r    r    #   s    ?r   r    c                       ] tR t^'tRtRtR# )IDNABidiErrorz;Exception when bidirectional requirements are not satisfiedr!   Nr"   r!   r   r   r*   r*   '   s    Er   r*   c                       ] tR t^+tRtRtR# )InvalidCodepointz<Exception when a disallowed or unallocated codepoint is usedr!   Nr"   r!   r   r   r,   r,   +   s    Fr   r,   c                       ] tR t^/tRtRtR# )InvalidCodepointContextzCException when the codepoint is not valid in the context it is usedr!   Nr"   r!   r   r   r.   r.   /   s    Mr   r.   c                0    V ^8  d   QhR\         R\         /# r   )r   )r   s   "r   r   r   3   s        r   c                     \         P                  ! \        V 4      4      pV^ 8X  d1   \         P                  ! \        V 4      4      '       g   \	        R4      hV# )r   z Unknown character in unicodedata)unicodedata	combiningchrname
ValueError)r   vs   & r   _combining_classr7   3   sB    c"g&AAvk&&s2w//;<<Hr   c                <    V ^8  d   QhR\         R\         R\        /# )r   r   scriptr   r   bool)r   s   "r   r   r   :   s&     @ @3 @ @ @r   c                 V    \        \        V 4      \        P                  V,          4      # r   )r   ordr   scripts)r   r9   s   &&r   
_is_scriptr?   :   s    SWh&6&6v&>??r   c                0    V ^8  d   QhR\         R\        /# r   sr   r   bytes)r   s   "r   r   r   >   s            r   c                 $    V P                  R 4      # )punycode)encoderB   s   &r   	_punycoderI   >   s    88Jr   c                0    V ^8  d   QhR\         R\        /# rA   )r   r   )r   s   "r   r   r   B   s      S S r   c                     R V R 2# )zU+04Xr!   rH   s   &r   _unotrM   B   s    #w<r   c                R    V ^8  d   QhR\         \        \        3,          R\        /# r   labelr   r   rD   r   r;   )r   s   "r   r   r   F   s#      eE3J/ D r   c                    \        V 4      ^?8*  # )u  Check that a label does not exceed the maximum permitted length.

Per :rfc:`1035` (and :rfc:`5891` §4.2.4) a DNS label must not exceed
63 octets. The argument may be either a :class:`str` (a U-label, where
length is measured in characters) or :class:`bytes` (an A-label, where
length is measured in octets).

:param label: The label to check.
:returns: ``True`` if the label is within the length limit, otherwise
    ``False``.
lenrP   s   &r   valid_label_lengthrV   F   s     u:r   c                ^    V ^8  d   QhR\         \        \        3,          R\        R\        /# )r   domaintrailing_dotr   rQ   )r   s   "r   r   r   U   s*     9 9eSj 1 9 9$ 9r   c                6    \        V 4      V'       d   ^8*  # ^8*  # )a  Check that a full domain name does not exceed the maximum length.

Per :rfc:`1035`, a domain name is limited to 253 octets when no trailing
dot is present, or 254 octets when one is included.

:param domain: The full (possibly multi-label) domain name.
:param trailing_dot: ``True`` if ``domain`` includes a trailing ``.``.
:returns: ``True`` if the domain is within the length limit, otherwise
    ``False``.
rS   )rX   rY   s   &&r   valid_string_lengthr[   U   s     v;,388C88r   c                <    V ^8  d   QhR\         R\        R\        /# )r   rP   	check_ltrr   r:   )r   s   "r   r   r   c   s&     H Hc Hd Ht Hr   c                R   \        V 4      \        8  d   \        R4      hRp\        V ^4       FC  w  r4\        P
                  ! V4      pVR8X  d   \        RV : RV 24      hV\        9   g   KA  RpKE  	  V'       g   V'       g   R# \        P
                  ! V ^ ,          4      pV\        9   d   RpMVR8X  d   RpM\        RV : R	24      hRpR
p\        V ^4       F  w  r4\        P
                  ! V4      pV'       d^   V\        9  d   \        RV R24      hV\        9   d   RpM	VR8w  d   RpV\        9   d    V'       g   TpKk  W8w  d   \        R4      hK~  K  V\        9  d   \        RV R24      hV\        9   d   RpK  VR8w  g   K  RpK  	  V'       g   \        R4      hR# )a  Validate the Bidi Rule from :rfc:`5893` for a single label.

The Bidi Rule constrains how bidirectional characters (Hebrew, Arabic,
etc.) may appear within a label. By default the check is only applied
when the label contains at least one right-to-left character (Unicode
bidirectional categories ``R``, ``AL``, or ``AN``); set ``check_ltr``
to ``True`` to apply it to LTR-only labels as well.

:param label: The label to validate, as a Unicode string.
:param check_ltr: If ``True``, apply the rules even when the label
    contains no RTL characters.
:returns: ``True`` if the label satisfies the Bidi Rule.
:raises IDNABidiError: If any of Bidi Rule conditions 1-6 are violated,
    or if the directional category of a codepoint cannot be determined.
Label too longF z Unknown directionality in label  at position Tr   zFirst codepoint in label z" must be directionality L, R or ALNz,Invalid direction for codepoint at position z in a right-to-left labelNSMz2Can not mix numeral types in a right-to-left labelz in a left-to-right labelz0Label ends with illegal codepoint directionality)rT   _max_input_lengthr    	enumerater1   bidirectionalr*   _bidi_rtl_categories_bidi_rtl_first_bidi_rtl_allowed_bidi_rtl_valid_ending_bidi_rtl_numeric_bidi_ltr_allowed_bidi_ltr_valid_ending)	rP   r]   
bidi_labelidxr   	directionrtlvalid_endingnumber_types	   &&       r   
check_bidirs   c   s     5z%%())JUA&--b1	?"B5)=Y\X] ^__,,J ' i ))%(3IO#	c	7y@bcddL!%KUA&--b1	 11#&RSVRWWp$qrr22#e#$--""+K -'(\]] . .  11#&RSVRWWp$qrr22#e#$5 '8 NOOr   c                0    V ^8  d   QhR\         R\        /# rO   r:   )r   s   "r   r   r      s      # $ r   c                n    \         P                  ! V ^ ,          4      ^ ,          R8X  d   \        R4      hR# )uF  Reject labels that begin with a combining mark.

Per :rfc:`5891` §4.2.3.2 a label must not start with a character of
Unicode general category ``M`` (Mark).

:param label: The label to check.
:returns: ``True`` if the first character is not a combining mark.
:raises IDNAError: If the label begins with a combining character.
Mz0Label begins with an illegal combining characterT)r1   categoryr    rU   s   &r   check_initial_combinerrx      s/     E!H%a(C/JKKr   c                0    V ^8  d   QhR\         R\        /# rO   r:   )r   s   "r   r   r      s      3 4 r   c                    V R,          R8X  d   \        R4      hV ^ ,          R8X  g   V R,          R8X  d   \        R4      hR# )u  Validate the hyphen restrictions for a label.

Per :rfc:`5891` §4.2.3.1 a label must not start or end with a hyphen
(``U+002D``), and must not have hyphens in both the third and fourth
positions (the prefix reserved for A-labels).

:param label: The label to check.
:returns: ``True`` if the hyphen restrictions are satisfied.
:raises IDNAError: If any of the hyphen restrictions are violated.
:r      Nz--z4Label has disallowed hyphens in 3rd and 4th position-z)Label must not start or end with a hyphenT)r    rU   s   &r   check_hyphen_okr~      sA     SzTNOOQx3%)s*CDDr   c                (    V ^8  d   QhR\         RR/# r   rP   r   N)r   )r   s   "r   r   r      s     	A 	AS 	AT 	Ar   c                    \        V 4      \        8  d   \        R4      h\        P                  ! RV 4      V 8w  d   \        R4      hR# )zRequire that a label is in Unicode Normalization Form C.

:param label: The label to check.
:raises IDNAError: If ``label`` differs from its NFC normalisation.
r_   NFCz%Label must be in Normalization Form CN)rT   rc   r    r1   	normalizerU   s   &r   	check_nfcr      sC     5z%%())UE*e3?@@ 4r   c                <    V ^8  d   QhR\         R\        R\        /# )r   rP   posr   r   r   r;   )r   s   "r   r   r      s!     3 3# 3C 3D 3r   c                   \        V 4      \        8  d   \        R4      h\        W,          4      pVR8X  d   V^ 8  d-   \	        \        W^,
          ,          4      4      \
        8X  d   R# Rp\        V^,
          RR4       F5  p\        \        W,          4      4      pVR8X  d   K&  V\        9   d   Rp M M	  V'       g   R# Rp\        V^,           \        V 4      4       F7  p\        \        W,          4      4      pVR8X  d   K&  V\        9   d   Rp V#  V# 	  V# VR8X  d6   V^ 8  ;'       d)    \	        \        W^,
          ,          4      4      \
        8H  # R# )a  Validate the CONTEXTJ rules from :rfc:`5892` Appendix A.

These rules govern the contextual use of the joiner codepoints
``U+200C`` (ZERO WIDTH NON-JOINER, Appendix A.1) and ``U+200D``
(ZERO WIDTH JOINER, Appendix A.2) within a label.

:param label: The label containing the codepoint.
:param pos: Index of the joiner codepoint within ``label``.
:returns: ``True`` if the codepoint at ``pos`` satisfies its CONTEXTJ
    rule, ``False`` otherwise (including when the codepoint at
    ``pos`` is not a recognised joiner).
:raises ValueError: If an adjacent codepoint has no Unicode name when
    determining its combining class.
:raises IDNAError: If ``label`` exceeds the defensive input length limit.
r_   i   TFTi   r}   )
rT   rc   r    r=   r7   _virama_combining_classranger   _bidi_joiner_l_or_d_bidi_joiner_r_or_d)rP   r   cp_valueokijoining_types   &&    r   valid_contextjr      s:     5z%%())5:H67'E'N(;<@WWsQwB'A(UX7Ls"22 ( sQwE
+A(UX7Ls"22	 	 , 	6Qw[[+CAg,?@D[[[r   c                H    V ^8  d   QhR\         R\        R\        R\        /# )r   rP   r   	exceptionr   r   )r   s   "r   r   r     s(     . .# .C .D .T .r   c                .   \        V 4      \        8  d   \        R4      h\        W,          4      pV^8X  dm   ^ Tu;8  ;'       d    \        V 4      ^,
          8  Mu ;'       d?    \        W^,
          ,          4      ^l8H  ;'       d    \        W^,           ,          4      ^l8H  # VR8X  dC   V\        V 4      ^,
          8  d*   \        V 4      ^8  d   \	        W^,           ,          R4      # R# VR9   d#   V^ 8  d   \	        W^,
          ,          R4      # R# VR8X  dN   V  FE  pVR8X  d   K  \	        VR4      '       g'   \	        VR	4      '       g   \	        VR
4      '       g   KD   R# 	  R# RTu;8:  d   R8:  dG   M MC\
        ;QJ d&    R V  4       F  '       g   K   R'       * # 	  R'       * # ! R V  4       4      '       * # RTu;8:  d   R8:  dH   M R# \
        ;QJ d&    R V  4       F  '       g   K   R'       * # 	  R'       * # ! R V  4       4      '       * # R# )a  Validate the CONTEXTO rules from :rfc:`5892` Appendix A.

Covers the contextual rules for codepoints such as MIDDLE DOT
(``U+00B7``), Greek lower numeral sign, Hebrew punctuation, Katakana
middle dot, and the Arabic-Indic / Extended Arabic-Indic digit ranges.

:param label: The label containing the codepoint.
:param pos: Index of the codepoint within ``label``.
:param exception: Reserved for forward compatibility; currently unused.
:returns: ``True`` if the codepoint at ``pos`` satisfies its CONTEXTO
    rule, ``False`` otherwise (including when the codepoint is not a
    recognised CONTEXTO codepoint).
:raises IDNAError: If ``label`` exceeds the defensive input length limit.
r_   iu  GreekFHebrewi0  u   ・HiraganaKatakanaHanT`  i  c              3   `   "   T F$  pR \        V4      u;8*  ;'       d    R8*  Mu x  K&  	  R# 5i)    Nr=   .0r   s   & r   	<genexpr>!valid_contexto.<locals>.<genexpr>:  $     BEbuB11611E   ,.r   r   c              3   `   "   T F$  pR \        V4      u;8*  ;'       d    R8*  Mu x  K&  	  R# 5i)r   r   Nr   r   s   & r   r   r   =  r   r   >       )rT   rc   r    r=   r?   any)rP   r   r   r   r   s   &&&  r   valid_contextor     s    5z%%())5:H63''Ua'kkCAg,?6,IkkcRW^_X_R`NaekNkk6UaCJNe!Gng66##7e!Gnh776BX~"j))ZJ-G-G:VXZ_K`K`	 
 !E!3BEB33BB3BB3BEBBBB!E!  3BEB33BB3BB3BEBBBBr   c                T    V ^8  d   QhR\         \        \        \        3,          RR/# r   r   r   rD   	bytearray)r   s   "r   r   r   B  s&     4 4uS%23 4 4r   c           
     2   \        V 4      \        8  d   \        R4      h\        V \        \
        34      '       d   V P                  R4      p \        V 4      ^ 8X  d   \        R4      h\        V RR7      '       g   \        R4      h\        V 4       \        V 4       \        V 4       \        V 4       EF  w  r\        V4      p\        V\        P                  R,          4      '       d   K:  \        V\        P                  R,          4      '       d:    \!        W4      '       g&   \#        R\%        V4       R	V^,            R
V : 24      hK  \        V\        P                  R,          4      '       d9   \)        W4      '       g&   \#        R\%        V4       R	V^,            R
V : 24      hK  \+        R\%        V4       RV^,            RV : R24      h	  \-        V 4       R#   \&         d,   p\        R\%        T4       RT^,            R
T : 24      ThRp?ii ; i)a   Run the full set of IDNA 2008 validity checks on a single label.

Applies, in order: NFC normalisation (:func:`check_nfc`), hyphen
restrictions (:func:`check_hyphen_ok`), the no-leading-combiner rule
(:func:`check_initial_combiner`), per-codepoint validity (PVALID,
CONTEXTJ, CONTEXTO classes from :rfc:`5892`), and the Bidi Rule
(:func:`check_bidi`).

:param label: The label to validate. ``bytes`` or ``bytearray`` input
    is decoded as UTF-8 first.
:raises IDNAError: If the label is empty or fails a structural rule.
:raises InvalidCodepoint: If the label contains a DISALLOWED or
    UNASSIGNED codepoint.
:raises InvalidCodepointContext: If a CONTEXTJ or CONTEXTO codepoint
    is not valid in its context.
:raises IDNABidiError: If the Bidi Rule is violated.
r_   zutf-8zEmpty LabelTrY   PVALIDCONTEXTJzJoiner  not allowed at position  in z%Unknown codepoint adjacent to joiner ra   NCONTEXTO
Codepoint z of z not allowed)rT   rc   r    
isinstancerD   r   decoder[   r   r~   rx   rd   r=   r   r   codepoint_classesr   r.   rM   r5   r   r,   rs   )rP   r   r   r   errs   &    r   check_labelr   B  s   $ 5z%%())%%+,,W%
5zQ&& u488())eE5!U#r7Xx'A'A('KLLXx'A'A*'MNN%e111GE(O;LLefilmfmennrsxr{2|}} 2 x)C)CJ)OPP!%---
5?:KKdehkleldmmqrwqz.{|| . #Zh/@cTUgYVZ[`Zcco#pqq! $$ u  ;E(O;LMZ]`aZaYbbfglfops   6G  H+&HHc                0    V ^8  d   QhR\         R\        /# rO   rC   )r   s   "r   r   r   y  s      # % r   c                V   \        V 4      \        8  d   \        R4      h V P                  R4      p\	        V4       \        V4      '       g   \        R4      hV#   \         d     Mi ; i\        T 4       \        \        T 4      ,           p\        T4      '       g   \        R4      hT# )u  Convert a single U-label into its A-label form.

The result is the ASCII-Compatible Encoding (ACE) form per :rfc:`5891`
§4: the label is validated, Punycode-encoded, and prefixed with
``xn--``. Pure ASCII labels that are already valid IDNA labels are
returned unchanged (as :class:`bytes`).

:param label: The label to convert, as a Unicode string.
:returns: The A-label as ASCII-encoded :class:`bytes`.
:raises IDNAError: If the label is invalid or the resulting A-label
    exceeds 63 octets.
r_   ascii)
rT   rc   r    rG   ulabelrV   UnicodeEncodeErrorr   _alabel_prefixrI   )rP   label_bytess   & r   alabelr   y  s     5z%%())ll7+ 	{!+..,--    9U#33Kk**())s   A A)(A)c                \    V ^8  d   QhR\         \        \        \        3,          R\        /# rO   r   )r   s   "r   r   r     s&     ( (%UI-. (3 (r   c                   \        V 4      \        8  d   \        R4      h\        V \        \
        34      '       g    V P                  R4      pM\	        V 4      pVP                  4       pVP                  \        4      '       dI   V\        \        4      R pV'       g   \        R4      hVP                  R4      '       d   \        R4      hM\        V4       VP                  R4      #  VP                  R4      p \        T 4       T #   \         d    \        T 4       T u # i ; i  \         d   p\        R4      ThRp?ii ; i)	a  Convert a single A-label into its U-label form.

Performs the inverse of :func:`alabel`: an ``xn--``-prefixed label is
Punycode-decoded and validated. Labels that are already Unicode (or
plain ASCII without the ACE prefix) are validated and returned as a
Unicode string.

:param label: The label to convert. ``bytes`` or ``bytearray`` input
    is treated as ASCII.
:returns: The U-label as a Unicode string.
:raises IDNAError: If the label is malformed or fails validation.
r_   r   Nz5Malformed A-label, no Punycode eligible content found   -z"A-label must not end with a hyphenrF   zInvalid A-label)rT   rc   r    r   rD   r   rG   r   r   lower
startswithr   endswithr   UnicodeError)rP   r   r   s   &  r   r   r     s+    5z%%())eeY/00	,,w/K
 El##%Kn--!#n"5"78STT%%@AA & 	K !!'**4"":. L- " 	L	&  4)*34s)   D *D& D#"D#&E1D==Ec                H    V ^8  d   QhR\         R\        R\        R\         /# )r   rX   
std3_rulestransitionalr   r:   )r   s   "r   r   r     s)     50 50 50 50D 50UX 50r   c           	        \        V 4      \        8  d   \        R4      h^RIHpHpHp Rp\        V 4       EF4  w  rx\        V4      p	V	R8  d   T	M\        P                  ! WI4      ^,
          p
\        WZ,          4      pW:,          pVR8H  ;'       g=    VR8H  ;'       d    V'       * ;'       g!    VR8H  ;'       d    V'       * ;'       d    VRJ pVRJ;'       d9    VR	8H  ;'       g,    VR8H  ;'       d    V'       * ;'       g    VR8H  ;'       d    TpV'       d   Wh,          pK  V'       d   Vf   Q hWl,          pEK  VR
8X  d   EK  \        R\        V	4       RV^,            RV : 24      h	  \        P                  ! RV4      # )u  Apply the UTS #46 character mapping to a domain string.

Implements the mapping table from `UTS #46 §4
<https://www.unicode.org/reports/tr46/>`_: each character is kept,
replaced, or rejected based on its status (``V``, ``M``, ``D``, ``3``,
``I``). The result is returned in Normalisation Form C.

:param domain: The full domain name to remap.
:param std3_rules: If ``True``, apply the stricter STD3 ASCII rules
    (status ``3`` codepoints raise instead of being kept or mapped).
:param transitional: If ``True``, use transitional processing (status
    ``D`` codepoints are mapped instead of kept). Transitional
    processing has been removed from UTS #46 and this option is
    retained only for backwards compatibility.
:returns: The remapped domain, in Normalisation Form C.
:raises InvalidCodepoint: If the domain contains a disallowed
    codepoint under the chosen rules.
:raises IDNAError: If ``domain`` exceeds the defensive input length limit.
Domain too long)uts46_replacementsuts46_startsuts46_statusesr`      Vr   3Nrv   Ir   r   r   r   )rT   rc   r    	uts46datar   r   r   rd   r=   bisectbisect_rightr3   r,   rM   r1   r   )rX   r   r   r   r   r   outputr   char
code_pointr   statusreplacement
keep_as_isuse_replacements   &&&            r   uts46_remapr     s   ( 6{&&)**KKFv&	Y
$s*J0C0CL0]`a0a^&'%7%:
 cMfm@@L0@fPSmF~F~\fXfF~F~kvz~k~ 	
 &T1 
 
cMccfm>>JccFcMDbDbVb 	 NF***!Fs]"Zj0A/BB[\_bc\c[ddhiohr#stt3 '6   //r   c                    V ^8  d   QhR\         \        \        \        3,          R\        R\        R\        R\        R\        /# )r   rB   strictuts46r   r   r   r   r   rD   r   r;   )r   s   "r   r   r     sX     E ES%"#EE E 	E
 E Er   c                >   V'       d   \         P                  ! R\        ^R7       \        V \        4      '       g    \	        V R4      p \        V 4      \        8  d   \        R4      hV'       d   \        WV4      p \        V RR7      '       g   \        R4      hR	p. pV'       d   V P                  R
4      M\        P                  V 4      pV'       d	   VR.8X  d   \        R4      hVR,          R8X  d   VR RpV F2  p	\        V	4      p V '       d   VP                  V 4       K)  \        R4      h	  V'       d   VP                  R4       RP!                  V4      p \        W4      '       g   \        R4      hV #   \
        \        3 d   p\        R4      ThRp?ii ; i)a  Encode a Unicode domain name into its ASCII (A-label) form.

Splits the input on label separators (only ``U+002E`` if ``strict`` is
set; otherwise also IDEOGRAPHIC FULL STOP ``U+3002``, FULLWIDTH FULL
STOP ``U+FF0E``, and HALFWIDTH IDEOGRAPHIC FULL STOP ``U+FF61``),
encodes each label with :func:`alabel`, and rejoins them with ``.``.
Optionally pre-processes the input through :func:`uts46_remap`.

:param s: The domain name to encode.
:param strict: If ``True``, only ``U+002E`` is recognised as a label
    separator.
:param uts46: If ``True``, apply UTS #46 mapping before encoding.
:param std3_rules: Forwarded to :func:`uts46_remap` when ``uts46`` is
    ``True``.
:param transitional: Forwarded to :func:`uts46_remap` when ``uts46``
    is ``True``. Deprecated: emits a :class:`DeprecationWarning` and
    will be removed in a future version.
:returns: The encoded domain as ASCII :class:`bytes`.
:raises IDNAError: If the domain is empty, contains an invalid label,
    or exceeds the maximum domain length.
zuTransitional processing has been removed from UTS #46. The transitional argument will be removed in a future version.)
stacklevelr   zGshould pass a unicode string to the function rather than a byte string.Nr   Tr   F.r`   Empty domainEmpty labelr      .r}   )warningswarnDeprecationWarningr   r   UnicodeDecodeError	TypeErrorr    rT   rc   r   r[   split_unicode_dots_rer   appendjoin)
rB   r   r   r   r   r   rY   resultlabelsrP   s
   &&&&&     r   rG   rG     si   8 M		
 a	pAwA 1v!!)**|4 qt44)**LF#QWWS\)9)?)?)BFVt^''bzR2J5MMM!M**  c		&Aq//)**H? #I. 	pefloo	ps   E: :FFFc                    V ^8  d   QhR\         \        \        \        3,          R\        R\        R\        R\        R\        /# )r   rB   r   r   r   displayr   r   )r   s   "r   r   r   F  sX     B BS%"#BB B 	B
 B 	Br   c                H   \        V \        4      '       g    \        V R4      p \        V 4      \        8  d   \	        R4      hV'       d   \        WR4      p \        V RR7      '       g   \	        R4      hRp. pV'       d   V P                  R4      M\        P                  V 4      pV'       d	   VR	.8X  d   \	        R
4      hVR,          '       g   VR RpV F3  p	 \        V	4      p
T
'       d   TP                  T
4       K*  \	        R4      h	  V'       d   VP                  R	4       RP                  V4      #   \        \        3 d   p\	        R4      ThRp?ii ; i  \         d9    T'       d/   T	R,          P                  4       R8X  d   T	P                  4       p
 Lh i ; i)uy  Decode an A-label-encoded domain name back to Unicode.

Splits the input on label separators (see :func:`encode` for the
rules), decodes each label with :func:`ulabel`, and rejoins them
with ``.``. Optionally pre-processes the input through
:func:`uts46_remap`.

:param s: The domain name to decode.
:param strict: If ``True``, only ``U+002E`` is recognised as a label
    separator.
:param uts46: If ``True``, apply UTS #46 mapping before decoding.
:param std3_rules: Forwarded to :func:`uts46_remap` when ``uts46`` is
    ``True``.
:param display: If ``True``, any ``xn--`` label that fails IDNA
    validation is passed through unchanged (lowercased) rather than
    aborting the whole call. Intended for "decode for display"
    consumers (e.g. URL libraries, HTTP clients) that want to show
    the user the label as it appears on the wire when it cannot be
    rendered as Unicode. Matches the per-label recovery prescribed
    by UTS #46 §4 and the WHATWG URL "domain to Unicode" algorithm.
:returns: The decoded domain as a Unicode string.
:raises IDNAError: If the input is not valid ASCII, contains an
    invalid label, or is empty.
r   zInvalid ASCII in A-labelNr   FTr   r   r`   r   :Nr{   Nzxn--r   r}   )r   r   r   r   r    rT   rc   r   r[   r   r   r   r   r   r   )rB   r   r   r   r   r   rY   r   r   rP   us   &&&&&      r   r   r   F  sh   > a	AAwA 1v!!)**u- qt44)**LF#QWWS\)9)?)?)BFVt^''"::2J	uA MM!M**  b88FA #I. 	A67S@	A*  	59??,6KKM		s/   D9 E9E
EEF!1,F!F!>   r   r   r	   >
   r   r   r	   BNCSr
   ESETONrb   >   r   r   r	   r
   >   r   r   r   r
   r   r   r   rb   )F)TF)FFFF)2r   rer1   r   typingr   r   r`   r   	intrangesr   r   r   rc   compiler   	frozensetrg   rf   rh   ri   rj   rk   rl   r   r   r   r   r    r*   r,   r.   r7   r?   rI   rM   rV   r[   rs   rx   r~   r   r   r   r   r   r   r   rG   r   r!   r   r   <module>r     sa    	   "  (  :::;  S$K( !23 Z[ "#:; tTl+ NO "C;/ c
+ c
+ @ @FI FGy GNi N@ 9HV$	A3l.b4nD(V50pEPB Br   