
    Mi_                    ~   % S r SSKJr  SSKrSSKrSSKrSSKr/ SQr\R                  " S5      r	\R                  " S5      r
SES jr\" 5       rSFS	 jr\R                  " S
5      r\" 5       rSGS jrSHS jr\" 5       r\R                  " S5      r\R                  " S5      r\R                  " S5      r0 \" S5      S_\" S5      S_\" S5      S_\" S5      S_\" S5      S_\" S5      S_\" S5      S_\" S5      S_\" S 5      S!_\" S"5      S#_\" S$5      S%_\" S&5      S'_\" S(5      S)_\" S*5      S+_\" S,5      S-_\" S.5      S/_\" S05      S1_\" S25      S3\" S45      S5\" S65      S7\" S85      S9\" S:5      S;0ErSIS< jr\" 5       rS=S>S?S@SASB.rS\SC'   \R                  " SDR8                  " SJ0 \D6\R:                  5      rg)Kzi
This gives other modules access to the gritty details about characters and the
encodings that use them.
    )annotationsN)
zlatin-1zsloppy-windows-1252zsloppy-windows-1251zsloppy-windows-1250zsloppy-windows-1253zsloppy-windows-1254zsloppy-windows-1257z
iso-8859-2macromancp437u   [ʼ‘-‛]u	   [“-‟]c            	         S[         R                  " S5      0n [         HT  n[        [	        [        SS5      5      S/-   5      nUR                  U5      nSU S3n[         R                  " U5      X'   MV     U $ )z
ENCODING_REGEXES contain reasonably fast ways to detect if we
could represent a given string in a given encoding. The simplest one is
the 'ascii' detector, which of course just determines if all characters
are between U+0000 and U+007F.
asciiz^[ -]*$         z^[ --z]*$)recompileCHARMAP_ENCODINGSbyteslistrangedecode)encoding_regexesencoding
byte_rangecharlistregexs        g/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/ftfy/chardata.py_build_regexesr       s|      ,<!=>% 4dE 23tf<=
$$X. 'xj4%'ZZ%6" &     dict[str, str]c                 Z   0 n [         R                  R                  R                  5        H|  u  pUR	                  S5      (       d  M  X SU-   '   XR                  5       :X  d  M9  UR                  5       nSU-   n[         R                  " U5      U:X  d  Mj  UR                  5       X'   M~     U $ )N;&)htmlentitieshtml5itemsendswithlowerupperunescape)r   namechar
name_upperentity_uppers        r   _build_html_entitiesr*   >   s    H mm))//1
==#'S4Z 
 zz|#!ZZ\
"Z/==.,>-1ZZ\H* 2 Or   z&#?[0-9A-Za-z]{1,24};c                D    [        [        U   R                  U 5      5      $ )z
Given text and a single-byte encoding, check whether that text could have
been decoded from that single-byte encoding.

In other words, check whether it can be encoded in that encoding, possibly
sloppily.
)boolENCODING_REGEXESmatch)textr   s     r   possible_encodingr0   V   s       *00677r   c                     0 n [         R                  " [        SS5      S/[        SS5      S/[        SS5      S	/[        S
S5      5       H  nSX'   M	     U $ )z
Build a translate mapping that strips likely-unintended control characters.
See :func:`ftfy.fixes.remove_control_chars` for a description of these
codepoint ranges and why they should be removed.
r   	                ij   ip   i  i  i  N)	itertoolschainr   )control_charsis     r   _build_control_char_mappingr;   a   se     &(M__dD	dD	ff	ff   r   se   [][ ]|[][ ][---]|[-][---][ ]|[][ ][-][-]|[][-][ ][-]|[][-][-][ ]s   [-][]|[-][?]|[-][?][-][?-]|[-][?-][-][?]|[-][?][-]|[-][-][?]|[-][?][-][-]|[-][-][?][-]|[-][-][-][?]|z[\x80-\x9f]u   ĲIJu   ĳiju   ŉu   ʼnu   ǱDZu   ǲDzu   ǳdzu   Ǆu   DŽu   ǅu   Džu   ǆu   džu   ǇLJu   ǈLju   ǉlju   ǊNJu   ǋNju   ǌnju   ﬀffu   ﬁfiu   ﬂflu   ﬃffiu   ﬄfflu   ﬅu   ſtu   ﬆstc                     SS0n [        SS5       H0  n[        U5      n[        R                  " SU5      nX2:w  d  M,  X0U'   M2     U $ )zh
Build a translate mapping that replaces halfwidth and fullwidth forms
with their standard-width forms.
i 0   i  i  NFKC)r   chrunicodedata	normalize)	width_mapr:   r'   	alternates       r   _build_width_maprU      sN     I66"1v))&$7	$aL	 #
 r   u   ĂÂÄĀÅÃÆĆČÇĎĐÉĚÊËĖÈĒĘÐĞĢÍÎÏİÌĪĶĹĻŁŃŇŅÑÓÔÖŐÒŌØÕŘŚŠŞŢÞÚÛÜŰÙŪŲŮÝŹŽŻß×ΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯu   áăâäàāąåãæćčçďéěêëėèēęęģíîïìīįķĺļŕźΰαβγδεζηθικλμνξοабвгдежзийклмнопu   đðğóšπσруu   -¿ ĄÆĽŁØŖŚŠŞŤŸŹŽŻŒąæƒľłøŗśšşťźžżœˆˇ˘˛˜˝΄΅ΆΈΉΊΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏёђѓєѕіїјљњћќўџҐґ–—―‘’‚“”„†‡•…‰‹›€№™u   -¿ĄÆĽŁØŖŚŠŞŤŸŹŽŻŒąæƒľłøŗśšşťźžżœˆˇ˘˛˜˝΄΅ΆΈΉΊΌΎΏЁЂЃЄЅІЇЈЉЊЋЌЎЏёђѓєѕіїјљњћќўџҐґ†‡‰‹›€№™)utf8_first_of_2utf8_first_of_3utf8_first_of_4utf8_continuationutf8_continuation_strict
UTF8_CLUESz
    (?<! [{utf8_continuation_strict}])
    (
        [{utf8_first_of_2}] [{utf8_continuation}]
        |
        [{utf8_first_of_3}] [{utf8_continuation}]{{2}}
        |
        [{utf8_first_of_4}] [{utf8_continuation}]{{3}}
    )+
    )returnzdict[str, re.Pattern[str]])r\   r   )r/   strr   r]   r\   r,   )r\   zdict[int, None])r\   zdict[int, str] )__doc__
__future__r   r   r7   r   rQ   r   r   SINGLE_QUOTE_REDOUBLE_QUOTE_REr   r-   r*   HTML_ENTITY_REHTML_ENTITIESr0   r;   CONTROL_CHARSALTERED_UTF8_RELOSSY_UTF8_REC1_CONTROL_REord	LIGATURESrU   	WIDTH_MAPr[   __annotations__formatVERBOSEUTF8_DETECTOR_REr^   r   r   <module>rp      s  
 #   	   **45**./6 "# ( 45$&8, ,-P **($ 

	  

>*ItIt Iu It	
 It It Iu Iu Iu It It It It It It  J!" J#$ JJJJJ-	4" 	{	)~B	'N	&_	JS	w	P
N PF ::	 		 	 	 JJ r   