ó
    Ð]j[  ã                  ó’   • S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	J
r
JrJrJr  SSKJr  SS	KJr     S         SS jjrg
)z.This is a python implementation of wcswidth().é    )Úannotations)ÚOptionalé   ©Úwcwidth)Úbisearch)Ú_EMOJI_ZWJ_SETÚ_ISC_VIRAMA_SETÚ_CATEGORY_MC_TABLEÚ_FITZPATRICK_RANGEÚ_REGIONAL_INDICATOR_SET)ÚVS16_NARROW_TO_WIDE)ÚISC_CONSONANTNc                óD  ^• Uc5  U R                  5       (       a   U R                  5       (       a  [        U 5      $ TS:X  a  [        OU4S jnUc  [        U 5      OUnSnSnSnSn	Sn
SnXu:  Ga¦  X   n[	        U5      nUS:X  a'  U
(       a  US-  nOUS-   U:  a  Sn
US-  nOSn
US-  nMB  US	:X  a0  US:¼  a*  U[        [	        X   5      [        S
   5      -  nSnUS-  nMx  US:”  a–  U[        ;   a\  SnUS-
  nUS:¼  a<  [	        X   5      [        ;   a'  US-  nUS-  nUS:¼  a  [	        X   5      [        ;   a  M'  US-  S:X  a	  Un	US-  nMã  O0[        S   Us=::  a  [        S   ::  a  O  OU	[        ;   a  US-  nGM  U
(       a%  [        U[        5      (       a  UnUn	Sn
SnUS-  nGM@  U" U5      nUS:  a  gUS:”  a  U(       a  US-  nSnUU-  nUnUn	Sn
O0US:¼  a!  [        U[        5      (       a  US-  nSnSn
SnO	U[        ;   n
US-  nXu:  a  GM¦  U(       a  US-  nU$ )a£  
Given a unicode string, return its printable length on a terminal.

See :ref:`Specification` for details of cell measurement.

This implementation differs from Markus Khun's original POSIX C implementation, in that this
``wcswidth()`` processes graphemes strings yielded by :func:`wcwidth.iter_graphemes` defined by
`Unicode Standard Annex #29`_. POSIX wcswidth(3) is not grapheme-aware and does not measure many
kinds of Emojis or complex scripts correctly.

:param pwcs: Measure width of given unicode string.
:param n: When ``n`` is None (default), return the length of the entire
    string, otherwise only the first ``n`` characters are measured.

:param unicode_version: Ignored. Retained for backwards compatibility.

    .. deprecated:: 0.3.0
       Only the latest Unicode version is now shipped.

:param ambiguous_width: Width to use for East Asian Ambiguous (A)
    characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.
:returns: The width, in cells, needed to display the first ``n`` characters
    of the unicode string ``pwcs``.  Returns ``-1`` for C0 and C1 control
    characters!

.. _`Unicode Standard Annex #29`: https://www.unicode.org/reports/tr29/
r   c                ó   >• [        U ST5      $ )NÚautor   )ÚcÚambiguous_widths    €ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/wcwidth/_wcswidth.pyÚ<lambda>Úwcswidth.<locals>.<lambda>=   s   ø€ ¼gÀaÈÐQ`Ô>aó    r   éþÿÿÿéÿÿÿÿFi   é   iþ  z9.0.0iÿÿ  T)ÚisasciiÚisprintableÚlenr   Úordr   r   r   r   r	   r   r   r
   )ÚpwcsÚnÚunicode_versionr   Ú_wcwidthÚendÚtotal_widthÚidxÚlast_measured_idxÚlast_measured_ucsÚlast_was_viramaÚconjunct_pendingÚcharÚucsÚ	ri_beforeÚjÚws      `             r   Úwcswidthr0      s�  ø€ ðL 	�y�T—\‘\—^‘^¨×(8Ñ(8×(:Ñ(:Ü�4‹yÐð *¨QÓ.�wÔ4a€Hà‘yŒ#ˆdŒ) a€CØ€KØ
€Cð ÐØÐØ€OØÐà
Œ)Ø‰yˆÜ�$‹iˆð �&‹=ÞØ�q‘‘Ø�q‘˜3“Ø"'�Ø�q‘‘à"'�Ø�q‘�Ùð �&‹=Ð.°!Ó3Øœ8Ü�DÑ+Ó,Ü# GÑ,óñ ˆKð !#ÐØ�1‰HˆCÙð �‹<ØÔ-Ó-Ø�	Ø˜!‘G�Ø˜1“f¤ T¡W£Ô1HÓ!HØ ‘N�IØ˜‘F�Að ˜1“f¤ T¡W£Ô1HÕ!Hð ˜q‘= AÓ%Ø(+Ð%Ø˜1‘H�CÙð &ô % QÑ'¨3ÕGÔ2DÀQÑ2GÖGØ'¬>Ó9Ø�q‘�Úö œx¨¬]×;Ñ;Ø #ÐØ #ÐØ#ˆOØ#ÐØ�1‰HˆCÚñ �T‹NˆØˆq‹5àØˆq‹5ÞØ˜qÑ �Ø#(Ð Ø˜1ÑˆKØ #ÐØ #ÐØ#‰OØ !Ó#¬°Ô6H×(IÑ(Ià˜1ÑˆKØ "ÐØ#ˆOØ$Ñà!¤_Ñ4ˆOØˆq‰ˆðS Ž)öV Ø�qÑˆØÐr   )Nr   r   )
r    Ústrr!   zOptional[int]r"   r1   r   ÚintÚreturnr2   )Ú__doc__Ú
__future__r   Útypingr   r#   r   r   Ú
_constantsr	   r
   r   r   r   Ú
table_vs16r   Útable_graphemer   r0   © r   r   Ú<module>r;      sl   ðÙ 4å "å õ Ý ÷2õ 2õ
 ,Ý )ð
 Ø!Øð	CØ
ðCàðCð ðCð ð	Cð
 	öCr   