+
   걗e$c                   sh2   R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIt^ RI	t	^ RI
t
^ RIt^ RIHt ]! R	R
4       ^ RIHt ^ RIt]P"                  ! R4      t ! R R]
P&                  4      t]
P*                  ! ]4      t ! R R]
P&                  4      t ! R R]
P&                  4      t ! R R]
P&                  4      t ! R R]
P&                  4      tR]
P6                  3R]
P8                  3R]
P:                  3R]3R]
P*                  ! ]4      3.]n         ! R R]
P&                  4      t ! R R]
P&                  4      t Rs!Rs"Rs#Rs$Rs%Rs&Rs'Rs(Rs)Rs*Rs+Rs,Rs-Rs.Rs/Rs0Rs1Rs2Rs3Rs4Rs5Rs6Rs7Rs8Rs9Rs:R  R! lt;R" R# lt<R$ R% lt= ! R& R'4      t>]>! 4       t?/ ]@! R(4      R)b]@! R*4      R+b]@! R,4      R-b]@! R.4      R/b]@! R04      R1b]@! R24      R3b]@! R44      R5b]@! R64      R7b]@! R84      R9b]@! R:4      R;b]@! R<4      R)b]@! R=4      R+b]@! R>4      R-b]@! R?4      R/b]@! R@4      R1b]@! RA4      R3b]@! RB4      R5b/ ]@! RC4      R7b]@! RD4      R9b]@! RE4      R;b]@! RF4      R)b]@! RG4      R+b]@! RH4      R-b]@! RI4      R/b]@! RJ4      R1b]@! RK4      R3b]@! RL4      R5b]@! RM4      R7b]@! RN4      R9b]@! RO4      R;b]@! RP4      R)b]@! RQ4      R+b]@! RR4      R-b]@! RS4      R/bC/ ]@! RT4      R1b]@! RU4      R3b]@! RV4      R5b]@! RW4      R7b]@! RX4      R9b]@! RY4      R;b]@! RZ4      R)b]@! R[4      R+b]@! R\4      R-b]@! R]4      R/b]@! R^4      R1b]@! R_4      R3b]@! R`4      R5b]@! Ra4      R7b]@! Rb4      R9b]@! Rc4      R;b]@! Rd4      R)bC/ ]@! Re4      R+b]@! Rf4      R-b]@! Rg4      R/b]@! Rh4      R1b]@! Ri4      R3b]@! Rj4      R5b]@! Rk4      R7b]@! Rl4      R9b]@! Rm4      R;b]@! Rn4      R)b]@! Ro4      R+b]@! Rp4      R-b]@! Rq4      R/b]@! Rr4      R1b]@! Rs4      R3b]@! Rt4      R5b]@! Ru4      R7bC/ ]@! Rv4      R9b]@! Rw4      R;b]@! Rx4      R)b]@! Ry4      R+b]@! Rz4      R-b]@! R{4      R/b]@! R|4      R1b]@! R}4      R3b]@! R~4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1bC/ ]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R)b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+bC/ ]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9bC/ ]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3bC/ ]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-bC/ ]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;bC/ ]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5bC/ ]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/b]@! R4      R1b]@! R4      R3b]@! R4      R5b]@! R4      R7b]@! R4      R9b]@! R4      R;b]@! R4      R)b]@! R4      R+b]@! R4      R-b]@! R4      R/bC/ ]@! R4      R1b]@! R4      R3b]@! ER 4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER	4      R3b]@! ER
4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)bC/ ]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7bC/ ]@! ER 4      R9b]@! ER!4      R;b]@! ER"4      R)b]@! ER#4      R+b]@! ER$4      R-b]@! ER%4      R/b]@! ER&4      R1b]@! ER'4      R3b]@! ER(4      R5b]@! ER)4      R7b]@! ER*4      R9b]@! ER+4      R;b]@! ER,4      R)b]@! ER-4      R+b]@! ER.4      R-b]@! ER/4      R/b]@! ER04      R1bC/ ]@! ER14      R3b]@! ER24      R5b]@! ER34      R7b]@! ER44      R9b]@! ER54      R;b]@! ER64      R)b]@! ER74      R+b]@! ER84      R-b]@! ER94      R/b]@! ER:4      R1b]@! ER;4      R3b]@! ER<4      R5b]@! ER=4      R7b]@! ER>4      R9b]@! ER?4      R;b]@! ER@4      R)b]@! ERA4      R+bC/ ]@! ERB4      R-b]@! ERC4      R/b]@! ERD4      R1b]@! ERE4      R3b]@! ERF4      R5b]@! ERG4      R7b]@! ERH4      R9b]@! ERI4      R;b]@! ERJ4      R)b]@! ERK4      R+b]@! ERL4      R-b]@! ERM4      R/b]@! ERN4      R1b]@! ERO4      R3b]@! ERP4      R5b]@! ERQ4      R7b]@! ERR4      R9bC/ ]@! ERS4      R;b]@! ERT4      R)b]@! ERU4      R+b]@! ERV4      R-b]@! ERW4      R/b]@! ERX4      R1b]@! ERY4      R3b]@! ERZ4      R5b]@! ER[4      R7b]@! ER\4      R9b]@! ER]4      R;b]@! ER^4      R)b]@! ER_4      R+b]@! ER`4      R-b]@! ERa4      R/b]@! ERb4      R1b]@! ERc4      R3bC/ ]@! ERd4      R5b]@! ERe4      R7b]@! ERf4      R9b]@! ERg4      R;b]@! ERh4      R)b]@! ERi4      R+b]@! ERj4      R-b]@! ERk4      R/b]@! ERl4      R1b]@! ERm4      R3b]@! ERn4      R5b]@! ERo4      R7b]@! ERp4      R9b]@! ERq4      R;b]@! ERr4      R)b]@! ERs4      R+b]@! ERt4      R-bC/ ]@! ERu4      R/b]@! ERv4      R1b]@! ERw4      R3b]@! ERx4      R5b]@! ERy4      R7b]@! ERz4      R9b]@! ER{4      R;b]@! ER|4      R)b]@! ER}4      R+b]@! ER~4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;bC/ ]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5bC/ ]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;bC/ ]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R5bC/ ]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      ERb]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7bC/ ]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1bC/ ]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+bC/ ]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER 4      R5b]@! ER4      R7b]@! ER4      R9bC/ ]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER	4      R3b]@! ER
4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3bC/ ]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER 4      R9b]@! ER!4      R;b]@! ER"4      R)b]@! ER#4      R+b]@! ER$4      R-bC/ ]@! ER%4      R/b]@! ER&4      R1b]@! ER'4      R3b]@! ER(4      R5b]@! ER)4      R7b]@! ER*4      R9b]@! ER+4      R;b]@! ER,4      R)b]@! ER-4      R+b]@! ER.4      R-b]@! ER/4      R/b]@! ER04      R1b]@! ER14      R3b]@! ER24      R5b]@! ER34      R7b]@! ER44      R9b]@! ER54      R;bC/ ]@! ER64      R)b]@! ER74      R+b]@! ER84      R-b]@! ER94      R/b]@! ER:4      R1b]@! ER;4      R3b]@! ER<4      R5b]@! ER=4      R7b]@! ER>4      R9b]@! ER?4      R;b]@! ER@4      R)b]@! ERA4      R+b]@! ERB4      R-b]@! ERC4      R/b]@! ERD4      R1b]@! ERE4      R3b]@! ERF4      R5bC/ ]@! ERG4      R7b]@! ERH4      R9b]@! ERI4      R;b]@! ERJ4      R)b]@! ERK4      R+b]@! ERL4      R-b]@! ERM4      R/b]@! ERN4      R1b]@! ERO4      R3b]@! ERP4      R5b]@! ERQ4      R7b]@! ERR4      R9b]@! ERS4      R;b]@! ERT4      R)b]@! ERU4      R+b]@! ERV4      R-b]@! ERW4      R/bC/ ]@! ERX4      R1b]@! ERY4      R3b]@! ERZ4      R5b]@! ER[4      R7b]@! ER\4      R9b]@! ER]4      R;b]@! ER^4      R)b]@! ER_4      R+b]@! ER`4      R-b]@! ERa4      R/b]@! ERb4      R1b]@! ERc4      R3b]@! ERd4      R5b]@! ERe4      R7b]@! ERf4      R9b]@! ERg4      R;b]@! ERh4      R)bC/ ]@! ERi4      R+b]@! ERj4      R-b]@! ERk4      R/b]@! ERl4      R1b]@! ERm4      R3b]@! ERn4      R5b]@! ERo4      R7b]@! ERp4      R9b]@! ERq4      R;b]@! ERr4      R)b]@! ERs4      R+b]@! ERt4      R-b]@! ERu4      R/b]@! ERv4      R1b]@! ERw4      R3b]@! ERx4      R5b]@! ERy4      R7bC/ ]@! ERz4      R9b]@! ER{4      R;b]@! ER|4      R)b]@! ER}4      R+b]@! ER~4      R-b]@! ER4      R/b]@! ER4      R1b]@! ER4      R3b]@! ER4      R5b]@! ER4      R7b]@! ER4      R9b]@! ER4      R;b]@! ER4      R)b]@! ER4      R+b]@! ER4      R-b]@! ER4      R/b]@! ER4      R1bC]@! ER4      R3]@! ER4      R5]@! ER4      R7]@! ER4      R9]@! ER4      R;/CtAER ER ltB ! ER ER]4      tC ! ER ER4      tD]EER8X  dw   ]P                  ! ]P                  ER7      tH]P                  ]P                  4       ]P                  ]H4       ^ RILtL]LP                  ! 4       w  tNtO]P                  ! ]N4       R# R# (  z/A module to do transliteration using m17n-lib.
)Dict)List)Tuple)
NamedTuple)Iterable)AnyN)require_versionIBusz1.0)r   zibus-typing-boosterc                   s    ] tR t^.tRtR# )libm17n__MSymbolStruct N__name__
__module____qualname____firstlineno____static_attributes__r	       6/usr/share/ibus-typing-booster/engine/m17n_translit.pyr   r   .       r   r   c                   s    ] tR t^1tRtR# )libm17n__MPlistr	   Nr
   r	   r   r   r   r   1   r   r   r   c                   s    ] tR t^3tRtR# )libm17n__MConverterr	   Nr
   r	   r   r   r   r   3   r   r   r   c                   s    ] tR t^5tRtR# )libm17n__MInputMethodr	   Nr
   r	   r   r   r   r   5   r   r   r   c                   s    ] tR t^7tRtR# )libm17n__MTextr	   Nr
   r	   r   r   r   r   7   r   r   r   Zmanaging_keynameZlengthplistZnextc            	       s    ] tR t^?tR]P
                  3R]P
                  3R]P
                  3R]P
                  3R]P
                  3R]P                  ! ]4      3R]P
                  3.tRt	R	# )
libm17n__MInputContext__spotZxZyZascentZdescentZfontsizeZmtZposr	   N)
r   r   r   r   ctypesc_intPOINTERr   _fields_r   r	   r   r   r   r   ?   sb    	fll	fll	6<< 	FLL!	V\\"	v~~n-.	Hr   r   c                   s<   ] tR t^HtR]P
                  ! ]4      3R]P
                  ! ]4      3R]P                  3R]P                  3R]
3R]P                  3R]P
                  ! ]4      3R]P                  3R	]P
                  ! ]4      3R
]P                  3R]P                  3R]P                  3R]P
                  ! ]4      3R]P                  3R]P                  3R]P                  3R]P                  3R]P                  3R]P
                  ! ]4      3.tRtR# )libm17n__MInputContextZimZproducedZargZactiveZspotZinfostatusZstatus_changedpreeditpreedit_changed
cursor_posZcursor_pos_changedcandidate_listcandidate_indexcandidate_fromcandidate_tocandidate_showZcandidates_changedr   r	   N)r   r   r   r   r   r   r   r   c_void_pr   r   r   r   r   r	   r   r   r   r   H   s	   	v~~345	V^^N34	 	6<< 	-.	!	6>>.12	6<<(	FNN>23	FLL)	v||$	v||,	FNN?;<	FLL)	6<<(	&	6<<(	v||,	&..12'4Hr   r   c                s0    V ^8  d   QhR\         R\        /# )   mtext_pointerreturn)r   strformat   "r   __annotate__r0      s     - -3 -3 -r   c                sD   \        \        4       \        V 4      ^,           ^,          p\        V4      p\	        \        \
        P                  ! V4      \
        P                  ! V4      4       \        \        V 4       V^ VP                  R4       pVP                  R4      # )zReturn the text contained in an MText object as a Python string

:param mtext_pointer: pointer to the MText object to get the text from
:type mtext_pointer: pointer to an libm17n MText object
s    utf-8)libm17n__mconv_reset_converter_utf8_converterlibm17n__mtext_lenZbyteslibm17n__mconv_rebind_bufferr   c_char_pr   libm17n__mconv_encodeZfinddecode)r*   ZbufsizeZconversion_buffer   &  r   mtext_to_stringr:      s     #?3 "-0149Gg )*W /=9 *!,=,B,B7,KL##G,,r   c                    V ^8  d   QhRR/# r)   r+   Nr	   r-   r/   r   r0   r0      s     |7 |7d |7r   c                 s   \         P                  ! R\         P                  R7      s\        P	                  4        \        P
                  s. \        n        \         P                  ! \        4      \        n
        \        P                  s\        \         P                  \         P                  .\        n        \         P                  ! \         4      \        n
        \        P"                  s\         P                  ! \         4      .\$        n        \         P                  \$        n
        \        P&                  s\         P                  ! \         4      \         P                  \         P                  .\(        n        \         P                  ! \         4      \(        n
        \        P*                  s\         P                  ! \         4      \         P                  ! \.        4      .\,        n        \         P                  \,        n
        \        P0                  s\         P                  .\2        n        \        \2        n
        \        P4                  s\        \        \         P8                  .\6        n        \         P                  ! \:        4      \6        n
        \        P<                  s\         P                  ! \:        4      \         P8                  .\>        n        \         P                  ! \@        4      \>        n
        \        PB                  s"\         P                  ! \@        4      .\D        n        \        PF                  s$\         P                  ! \@        4      \        \         P8                  .\H        n        \         P                  \H        n
        \        PJ                  s&\         P                  ! \@        4      \        \         P8                  \         P                  ! \.        4      .\L        n        \         P                  \L        n
        \        PN                  s(. \P        n        \         P                  ! \.        4      \P        n
        \        PR                  s*\         P                  ! \.        4      .\T        n        \         P                  \T        n
        \        PW                  \         PX                  R4      s-\        \Z        \         P                  ! R4      \         P                  ! ^ 4      4      s.\        P^                  s0\        \        \        .\`        n        \         P                  ! \        4      \`        n
        \        Pb                  s2\         P                  ! \        4      .\d        n        \        \d        n
        \        Pf                  s4\         P                  ! \        4      .\h        n        \         P8                  \h        n
        \        Pj                  s6\         P                  ! \        4      .\l        n        \         P                  ! \        4      \l        n
        \        Pn                  s8\        .\p        n        \         P                  \p        n
        \        Pr                  s:\         P                  ! \        4      \        \         P8                  .\t        n        \         P                  ! \        4      \t        n
        \        Pv                  s<\         P                  ! \        4      .\x        n        \         P                  \x        n
        \        Pz                  s>\        \         P                  \         P                  .\|        n        \         P                  ! \.        4      \|        n
        \        P~                  s@\        \        \        \         P                  ! \        4      .\        n        \         P                  \        n
        \        P                  sB. \        n        \         P                  \        n
        R# )zPOpen libm17n and fill global variables for functions and
variables from libm17n
zlibm17n.so.0)ZmodeZMcoding_utf_8N)Cr   ZCDLLZRTLD_GLOBALlibm17n__libZ	m17n_initZmplistlibm17n__mplistZargtypesr   r   ZrestypeZmconv_buffer_converterlibm17n__mconv_buffer_converterlibm17n__MSymbolr6   r   r   Zmconv_reset_converterr2   Zmconv_rebind_bufferr5   Zmconv_encoder7   r   msymbollibm17n__msymbolZminput_open_imlibm17n__minput_open_imr(   r   Zminput_create_iclibm17n__minput_create_icr   Zminput_reset_iclibm17n__minput_reset_icZminput_filterlibm17n__minput_filterZminput_lookuplibm17n__minput_lookupmtextlibm17n__mtextZ	mtext_lenr4   Zin_dllZ	pythonapilibm17n__Mcoding_utf_8r3   Zminput_get_variablelibm17n__minput_get_variableZ
mplist_keylibm17n__mplist_keyZmplist_valuelibm17n__mplist_valueZmplist_nextlibm17n__mplist_nextZmsymbol_namelibm17n__msymbol_nameZ
mplist_addlibm17n__mplist_addZmplist_lengthlibm17n__mplist_lengthZmconv_decode_bufferlibm17n__mconv_decode_bufferZminput_config_variablelibm17n__minput_config_variableZminput_save_configlibm17n__minput_save_configr	   r   r   initrU      s    ;;~f6H6HIL"))O!O$nn_=O&2&I&I#&//6<<09#,.4nn/#+ &2%G%G"*+/-"+-3\\"*#/#C#C *+V__fll-L )+1>>:M+N ((55*+V^^N-K&M"$*LL!#++!' 1/*99*FOO(=$&,nn5J&K# , = =,-v*@&(.7M(N%+;;-.)0% *77-.'# &,\\")77-.~&	'(#
 &,\\"!''N N#^^N;N%//#)>>.#A"B!'-44/+ 6 5v||AHO $0#C#C *,<-> )+1>>/+J (&11$*NN?$C#D "2(55&,nn_&E%F"$*OO!'33%+^^O%D$E!#)>>/#B (55&6%7"$*OO!&11')96??$L "(.."A)77'-~~o'F&G#%+\\"#/#C#C &//6<<-9 )+1>>.+I (&2&I&I#*,<fnn_>]0_#,.4ll#+"."A"A+-(*0,,'r   c                r;   r<   r	   r-   r/   r   r0   r0     s      d r   c                 s.    \         P                  4        R# )ZCleanupN)r=   Z	m17n_finir	   r   r   finirV     s    r   c                   sD   a  ] tR tRt o V 3R lR ltV 3R lR ltRtV tR# )__ModuleInitializeri  c                   < V ^8  d   QhRR/# r<   r	   r.   __classdict__   "r   r0    __ModuleInitializer.__annotate__  s      $ r   c                s    \        4        R # N)rU   self   &r   __init__Z__ModuleInitializer.__init__  s    r   c                rX   r<   r	   rY   r[   r   r0   r\     s       r   c                s    R # r]   r	   r^   r`   r   __del__Z__ModuleInitializer.__del__  s    r   r	   N)r   r   r   r   ra   rb   r   __classdictcell__rZ      @r   rW   rW     s       r   rW   u   ०0u   १Z1u   २Z2u   ३Z3u   ४Z4u   ५Z5u   ६Z6u   ७Z7u   ८Z8u   ९Z9u   ০u   ১u   ২u   ৩u   ৪u   ৫u   ৬u   ৭u   ৮u   ৯u   ૦u   ૧u   ૨u   ૩u   ૪u   ૫u   ૬u   ૭u   ૮u   ૯u   ೦u   ೧u   ೨u   ೩u   ೪u   ೫u   ೬u   ೭u   ೮u   ೯u   ൦u   ൧u   ൨u   ൩u   ൪u   ൫u   ൬u   ൭u   ൮u   ൯u   ୦u   ୧u   ୨u   ୩u   ୪u   ୫u   ୬u   ୭u   ୮u   ୯u   ੦u   ੧u   ੨u   ੩u   ੪u   ੫u   ੬u   ੭u   ੮u   ੯u   ௦u   ௧u   ௨u   ௩u   ௪u   ௫u   ௬u   ௭u   ௮u   ௯u   ౦u   ౧u   ౨u   ౩u   ౪u   ౫u   ౬u   ౭u   ౮u   ౯u   ٠u   ١u   ٢u   ٣u   ٤u   ٥u   ٦u   ٧u   ٨u   ٩u   ۰u   ۱u   ۲u   ۳u   ۴u   ۵u   ۶u   ۷u   ۸u   ۹u   ߀u   ߁u   ߂u   ߃u   ߄u   ߅u   ߆u   ߇u   ߈u   ߉u   ෦u   ෧u   ෨u   ෩u   ෪u   ෫u   ෬u   ෭u   ෮u   ෯u   ๐u   ๑u   ๒u   ๓u   ๔u   ๕u   ๖u   ๗u   ๘u   ๙u   ໐u   ໑u   ໒u   ໓u   ໔u   ໕u   ໖u   ໗u   ໘u   ໙u   ༠u   ༡u   ༢u   ༣u   ༤u   ༥u   ༦u   ༧u   ༨u   ༩u   ၀u   ၁u   ၂u   ၃u   ၄u   ၅u   ၆u   ၇u   ၈u   ၉u   ႐u   ႑u   ႒u   ႓u   ႔u   ႕u   ႖u   ႗u   ႘u   ႙u   ០u   ១u   ២u   ៣u   ៤u   ៥u   ៦u   ៧u   ៨u   ៩u   ᠐u   ᠑u   ᠒u   ᠓u   ᠔u   ᠕u   ᠖u   ᠗u   ᠘u   ᠙u   ᥆u   ᥇u   ᥈u   ᥉u   ᥊u   ᥋u   ᥌u   ᥍u   ᥎u   ᥏u   ᧐u   ᧑u   ᧒u   ᧓u   ᧔u   ᧕u   ᧖u   ᧗u   ᧘u   ᧙u   ᪀u   ᪁u   ᪂u   ᪃u   ᪄u   ᪅u   ᪆u   ᪇u   ᪈u   ᪉u   ᪐u   ᪑u   ᪒u   ᪓u   ᪔u   ᪕u   ᪖u   ᪗u   ᪘u   ᪙u   ᭐u   ᭑u   ᭒u   ᭓u   ᭔u   ᭕u   ᭖u   ᭗u   ᭘u   ᭙u   ᮰u   ᮱u   ᮲u   ᮳u   ᮴u   ᮵u   ᮶u   ᮷u   ᮸u   ᮹u   ᱀u   ᱁u   ᱂u   ᱃u   ᱄u   ᱅u   ᱆u   ᱇u   ᱈u   ᱉u   ᱐u   ᱑u   ᱒u   ᱓u   ᱔u   ᱕u   ᱖u   ᱗u   ᱘u   ᱙u   ꘠u   ꘡u   ꘢u   ꘣u   ꘤u   ꘥u   ꘦u   ꘧u   ꘨u   ꘩u   ꣐u   ꣑u   ꣒u   ꣓u   ꣔u   ꣕u   ꣖u   ꣗u   ꣘u   ꣙u   ꤀u   ꤁u   ꤂u   ꤃u   ꤄u   ꤅u   ꤆u   ꤇u   ꤈u   ꤉u   ꧐u   ꧑u   ꧒u   ꧓u   ꧔u   ꧕u   ꧖u   ꧗u   ꧘u   ꧙u   ꧰u   ꧱u   ꧲u   ꧳u   ꧴u   ꧵u   ꧶u   ꧷u   ꧸u   ꧹u   ꩐u   ꩑u   ꩒u   ꩓u   ꩔u   ꩕u   ꩖u   ꩗u   ꩘u   ꩙u   ꯰u   ꯱u   ꯲u   ꯳u   ꯴u   ꯵u   ꯶u   ꯷u   ꯸u   ꯹u   𐒠u   𐒡u   𐒢u   𐒣u   𐒤u   𐒥u   𐒦u   𐒧u   𐒨u   𐒩u   𐴰u   𐴱u   𐴲u   𐴳u   𐴴u   𐴵u   𐴶u   𐴷u   𐴸u   𐴹u   𑁦u   𑁧u   𑁨u   𑁩u   𑁪ZAu   𑁫ZBu   𑁬ZCu   𑁭ZDu   𑁮ZEu   𑁯ZFu   𑃰u   𑃱u   𑃲u   𑃳u   𑃴u   𑃵u   𑃶u   𑃷u   𑃸u   𑃹u   𑄶u   𑄷u   𑄸u   𑄹u   𑄺u   𑄻u   𑄼u   𑄽u   𑄾u   𑄿u   𑇐u   𑇑u   𑇒u   𑇓u   𑇔u   𑇕u   𑇖u   𑇗u   𑇘u   𑇙u   𑋰u   𑋱u   𑋲u   𑋳u   𑋴u   𑋵u   𑋶u   𑋷u   𑋸u   𑋹u   𑑐u   𑑑u   𑑒u   𑑓u   𑑔u   𑑕u   𑑖u   𑑗u   𑑘u   𑑙u   𑓐u   𑓑u   𑓒u   𑓓u   𑓔u   𑓕u   𑓖u   𑓗u   𑓘u   𑓙u   𑙐u   𑙑u   𑙒u   𑙓u   𑙔u   𑙕u   𑙖u   𑙗u   𑙘u   𑙙u   𑛀u   𑛁u   𑛂u   𑛃u   𑛄u   𑛅u   𑛆u   𑛇u   𑛈u   𑛉u   𑜰u   𑜱u   𑜲u   𑜳u   𑜴u   𑜵u   𑜶u   𑜷u   𑜸u   𑜹u   𑣠u   𑣡u   𑣢u   𑣣u   𑣤u   𑣥u   𑣦u   𑣧u   𑣨u   𑣩u   𑥐u   𑥑u   𑥒u   𑥓u   𑥔u   𑥕u   𑥖u   𑥗u   𑥘u   𑥙u   𑱐u   𑱑u   𑱒u   𑱓u   𑱔u   𑱕u   𑱖u   𑱗u   𑱘u   𑱙u   𑵐u   𑵑u   𑵒u   𑵓u   𑵔u   𑵕u   𑵖u   𑵗u   𑵘u   𑵙u   𑶠u   𑶡u   𑶢u   𑶣u   𑶤u   𑶥u   𑶦u   𑶧u   𑶨u   𑶩u   𑽐u   𑽑u   𑽒u   𑽓u   𑽔u   𑽕u   𑽖u   𑽗u   𑽘u   𑽙u   𖩠u   𖩡u   𖩢u   𖩣u   𖩤u   𖩥u   𖩦u   𖩧u   𖩨u   𖩩u   𖫀u   𖫁u   𖫂u   𖫃u   𖫄u   𖫅u   𖫆u   𖫇u   𖫈u   𖫉u   𖭐u   𖭑u   𖭒u   𖭓u   𖭔u   𖭕u   𖭖u   𖭗u   𖭘u   𖭙u   𞅀u   𞅁u   𞅂u   𞅃u   𞅄u   𞅅u   𞅆u   𞅇u   𞅈u   𞅉u   𞋰u   𞋱u   𞋲u   𞋳u   𞋴u   𞋵u   𞋶u   𞋷u   𞋸u   𞋹u   𞓰u   𞓱u   𞓲u   𞓳u   𞓴u   𞓵u   𞓶u   𞓷u   𞓸u   𞓹u   𞥐u   𞥑u   𞥒u   𞥓u   𞥔u   𞥕u   𞥖u   𞥗u   𞥘u   𞥙c                s0    V ^8  d   QhR\         R\         /# )r)   textr+   r,   r-   r/   r   r0   r0     s     - -# -# -r   c                s,    V P                  \        4      # )u  
Convert language specific digits in a text to ASCII digits

:param text: The text to convert
:return: The converted text containing only ASCII digits

Examples:

>>> convert_digits_to_ascii('hello ०१२३४५६७८९') # Devanagari
'hello 0123456789'
>>> convert_digits_to_ascii('hello ౦౧౨౩౪౫౬౭౮౯') # Telugu
'hello 0123456789'
>>> convert_digits_to_ascii('hello 𞥐𞥑𞥒𞥓𞥔𞥕𞥖𞥗𞥘𞥙') # Adlam
'hello 0123456789'
)Z	translateDIGIT_TRANS_TABLE)rg   r`   r   convert_digits_to_asciirj     s      >>+,,r   c                   sX   a  ] tR tRt o RtRt^ tRt^ tRt	. t
^ t^ t^ t^ tV 3R ltRtV tR# )TransliterationPartsi  u  
A named tuple containing the parts of a transliteration

committed: str        The part of the transliteration which cannot be
                      changed anymore by adding more input, could be
                      committed already if desired.
committed_index: int  The index up to which the msymbol_list input
                      was “used up” to create the “committed” text.
preedit:              The transliteration of the remaining input,
                      may still change by adding more input.
cursor_pos: int       The cursor position in the preedit.
                      Counted in codepoints, not glyphs (For example
                      '☺️' usually renders as one glyph (☺️) but
                      has two codepoints).
                      Usually this is at the end of the preedit but
                      not always! An input method may move the cursor
                      within the preedit!
                      (I think only ja-anthy.mim actually moves the
                      cursor within the preedit sometimes when moving
                      or resizing the henkan region).
status: str           May change for some input methods to
                      indicate a state.
                      For example in case of ja-anthy.mim,
                      this is 'aあ' before Henkan and changes
                      to '漢' in Henkan mode.
candidates: List[str] May contain a list of candidates if the
                      input method can produce multiple candidates.
candidate_index: int  Index of the selected candidate.
                      0 if no candidate is selected.
candidate_from: int   Start of the current candidate in the preedit.
candidate_to: int     End of the  current candidate in the preedit.
                      If candidate_index == 0, i.e.
                      no candidate is selected, the current candidate
                      in the preedit is the first candidate.
candidate_show: int   0: candidates should be hidden
                      1: candidates should be shown
 c                s   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[ ;R&   S[;R&   S[ ;R&   S[S[ ,          ;R&   S[;R&   S[;R&   S[;R	&   S[;R
&   # )r)   	committedcommitted_indexr    r"   r   
candidatesr$   r%   r&   r'   )r,   intr   rY   r[   r   r0   Z!TransliterationParts.__annotate__  s     L M N O P Q R S T U V S	W X Y Z [ \ ] ^ _ r   r	   N)r   r   r   r   __doc__rm   rn   r    r"   r   ro   r$   r%   r&   r'   Z__annotate_func__r   rc   rd   re   r   rk   rk     sG     $J IOGJFJONLN_  r   rk   c                   s   a  ] tR tRt o RtV 3R lR ltV 3R lR ltV 3R lR ltRV 3R	 lR
 lltRV 3R lR llt	V 3R lR lt
V 3R lR ltRtV tR# )Transliteratori  zA class for transliterators using libm17n

If initializing the transliterator fails, for example because a
non-existing input method was given as the argument, a ValueError
is raised.
c                s$   < V ^8  d   QhRS[ RR/# )r)   imer+   Nrh   rY   r[   r   r0   Transliterator.__annotate__  s      E  EC  ED  Er   c           
     sV   RV n         VR8X  d
   RV n         R# VP                  R4      ^ ,          V n        RP                  VP                  R4      R,          4      V n        \
        P                  ! R4      V n        \        \        \        P                  ! V P                  P                  R4      4      4      \        \        P                  ! V P                  P                  R4      4      4      \        P                  ! R4      4      V n         V P                  P                  p\#        T P                  \        P                  ! R4      4      T n         T P$                  P                  pR#   \          d   p\!        R	4      ThRp?ii ; i  \          d   p\!        R
4      ThRp?ii ; i)u  Initialize the input method to use for the transliteration

Raises ValueError if something fails.

:param ime: Full name of the m17n input method, for example
            “hi-inscript2” or “t-latn-post”. There is one
            special input method name “NoIME”. The input method
            “NoIME” is just a dummy which does not do transliteration
            at all, it only joins the list of Msymbol names to
            a string.
FZNoIMETNZ-:i   NNz)^(?P<prefix>([SCMAGsH]-)*)(?P<unicode>.)$r1   zminput_open_im() failedzminput_create_ic() failed)_dummyZsplit	_languagejoin_namereZcompile(_msymbol_single_char_with_prefix_patternrC   rB   r   r6   encoder(   _imcontents
ValueErrorrD   _ic)r_   rs   Z_im_contentserrorZ_ic_contentss   &&   r   ra   ZTransliterator.__init__  sC    '>DK3*XXciinR01
8:

89:5*V__T^^-B-B7-KLMV__TZZ->->w-GHIOOD!#	C88,,L -TXXvt7LM	E88,,L	  	C67UB	C
  	E89uD	Es0   E- F -F	8FF	F(F##F(c                s&   < V ^8  d   QhRS[ RS[ /# )r)   rA   r+   rh   rY   r[   r   r0   rt     s     0 0# 0# 0r   c                s0   \         P                  ! V4      '       d   V# \        P                  ! V P                  V4      pV'       g   V# \
        P                  ! \
        P                  ! VP                  R 4      4      4      pVP                  R4       V 2# )ZunicodeZprefix)	itb_utilZis_asciiry   Zsearchrz   r   Zkeyval_nameZunicode_to_keyvalZgroup)r_   rA   Zmatchr   s   &&  r   _convert_non_ascii_msymbolZ)Transliterator._convert_non_ascii_msymbol  sy     W%%N		997DN 6 6u{{97M NO++h'(//r   c                rX   r<   r	   rY   r[   r   r0   rt      s     6 6$ 6r   c                s    V P                   '       d   R# \        V P                  4       \        R4      p\	        V P                  V\
        P                  ! R4      4      pR# )zResets the input context

Can be used to reset the internal state of the input method to
the default.  For example, if zh-py is in fullwidth-mode (to
input fullwidth Latin), calling reset_ic() switches to the
default mode to input Chinese characters.
N   nil)ru   rE   r   rB   rF   r   r(   )r_   _symbol_retvalr9   r   reset_icZTransliterator.reset_ic   sF     ;;; *  #6*(HHgvt46r   c                sB   < V ^8  d   QhRS[ S[,          RS[RS[RS[/# r)   msymbol_listascii_digitsresetr+   )r   r,   boolrk   rY   r[   r   r0   rt     s=     	+ 	+"3-	+ 	+ 		+ %9		+r   c                sB   \        V\        4      '       g   \        R4      hV P                  '       d&   \	        RP                  V4      \        V4      R7      # V'       d   \        V P                  4       Rp^ pRp. p\        V4       F  w  rV P                  V	4      p	\        V	P                  R4      4      p
\        V P                  V
\        P                  ! R4      4      pV^ 8X  g   Kd  \!        4       p\#        V P                  V
\        P                  ! R4      V4      p\%        V4      ^ 8  d   V\'        V4      ,          pTpV'       g   K  WAV,          ,          pV^,           pK  	   V P                  P(                  P*                  '       dX   \%        V P                  P(                  P,                  4      ^ 8  d*   \'        V P                  P(                  P,                  4      pT P                  P(                  P0                  p\3        T4      '       Edw   \5        T4      p\3        T4      '       g   EMX\7        TP(                  4      pTR8X  dU   \'        \        P8                  ! \;        T4      \        P<                  ! \>        4      4      4      pT\        T4      ,          pMTR8X  d   \        P8                  ! \;        T4      \        P<                  ! \@        4      4      p \5        T4      p\3        T4      '       g   M}\7        TP(                  4      pTR8w  d   M`\'        \        P8                  ! \;        T4      \        P<                  ! \>        4      4      4      pTPC                  T4       \E        T4      pK  M\E        T4      pEK  T P                  P(                  PF                  p\'        T P                  P(                  PH                  4      pT P                  P(                  PJ                  pT P                  P(                  PL                  pT P                  P(                  PN                  pT P                  P(                  PP                  p\        R	4      p
\        T P                  T
\        P                  ! R4      4      pT'       d   T'       g   \        T4      pT'       d   T'       g   T'       d   T.pT PR                  R
8X  da   T PT                  R8X  dP   TR8w  d%   T Uu. uF  pT'       g   K  RT9  g   K  TNK  	  ppT'       g   T'       d   T^ ,          p\        T4      pT'       g   \	        TTTTTTTTTTR7
      # \	        \W        T4      T\W        T4      TTTTTTTR7
      #   \.         d   p\        R4      ThRp?ii ; iu upi )u,  Transliterate a list of Msymbol names

:param msymbol_list: A list of strings which are interpreted
                     as the names of Msymbols to transliterate.
                     If the input method has the special name “NoIME”,
                     no transliteration is done, the list of
                     Msymbols is just joined to a single string.
:param ascii_digits: If true, convert language specific digits
                     to ASCII digits
:return: The transliteration in several parts

Examples:

>>> trans = Transliterator('hi-itrans')
>>> parts = trans.transliterate_parts(list('n'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'न्'
>>> parts.cursor_pos
2
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('n '))
>>> parts.committed
'न '
>>> parts.committed_index
2
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts =trans.transliterate_parts(list('na'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'न'
>>> parts.cursor_pos
1
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('nam'))
>>> parts.committed
'न'
>>> parts.committed_index
2
>>> parts.preedit
'म्'
>>> parts.cursor_pos
2
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('nama'))
>>> parts.committed
'न'
>>> parts.committed_index
2
>>> parts.preedit
'म'
>>> parts.cursor_pos
1
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('namas'))
>>> parts.committed
'नम'
>>> parts.committed_index
4
>>> parts.preedit
'स्'
>>> parts.cursor_pos
2
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('namast'))
>>> parts.committed
'नम'
>>> parts.committed_index
4
>>> parts.preedit
'स्त्'
>>> parts.cursor_pos
4
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('namaste'))
>>> parts.committed
'नम'
>>> parts.committed_index
4
>>> parts.preedit
'स्ते'
>>> parts.cursor_pos
4
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('namaste '))
>>> parts.committed
'नमस्ते '
>>> parts.committed_index
8
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'क'
>>> parts.candidates
[]
>>> parts.candidate_show
0

>>> trans = Transliterator('t-latn-post')
>>> parts = trans.transliterate_parts(list('u'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'u'
>>> parts.cursor_pos
1
>>> parts.status
'Latin-post'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('u"'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'ü'
>>> parts.cursor_pos
1
>>> parts.status
'Latin-post'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('u""'))
>>> parts.committed
'u"'
>>> parts.committed_index
3
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'Latin-post'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('u"u'))
>>> parts.committed
'ü'
>>> parts.committed_index
2
>>> parts.preedit
'u'
>>> parts.cursor_pos
1
>>> parts.status
'Latin-post'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('üu"u'))
>>> parts.committed
'üü'
>>> parts.committed_index
3
>>> parts.preedit
'u'
>>> parts.cursor_pos
1
>>> parts.status
'Latin-post'
>>> parts.candidates
[]
>>> parts.candidate_show
0

>>> trans = Transliterator('t-rfc1345')
>>> parts = trans.transliterate_parts(list('&'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'&'
>>> parts.cursor_pos
1
>>> parts.status
'RFC1345'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('&C'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'&C'
>>> parts.cursor_pos
2
>>> parts.status
'RFC1345'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('&Co'))
>>> parts.committed
'©'
>>> parts.committed_index
3
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'RFC1345'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('&f'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'&f'
>>> parts.cursor_pos
2
>>> parts.status
'RFC1345'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('&ff'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'ﬀ'
>>> parts.cursor_pos
1
>>> parts.status
'RFC1345'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('&ffi'))
>>> parts.committed
'ﬃ'
>>> parts.committed_index
4
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'RFC1345'
>>> parts.candidates
[]
>>> parts.candidate_show
0

>>> trans = Transliterator('t-lsymbol')
>>> parts = trans.transliterate_parts(list('/:)'))
>>> parts.committed
''
>>> parts.committed_index
0
>>> parts.preedit
'☺️'
>>> parts.cursor_pos
2
>>> parts.status
'lsymbol'
>>> parts.candidates
['☺️', '😃', '😅', '😆', '😉', '😇', '😂', '😏', '😛', '😜', '😝', '😋', '😉', '💏', '💋', '😍', '😘', '😚', '😽', '😻']
>>> parts.candidate_show
1
>>> parts = trans.transliterate_parts(list('a'))
>>> parts.committed
'a'
>>> parts.committed_index
1
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'lsymbol'
>>> parts.candidates
[]
>>> parts.candidate_show
0
>>> parts = trans.transliterate_parts(list('a/'))
>>> parts.committed
'a'
>>> parts.committed_index
1
>>> parts.preedit
'/'
>>> parts.cursor_pos
1
>>> parts.status
'lsymbol'
>>> parts.candidates
['/']
>>> parts.candidate_show
1
>>> parts = trans.transliterate_parts(list('a/:'))
>>> parts.committed
'a'
>>> parts.committed_index
1
>>> parts.preedit
'/:'
>>> parts.cursor_pos
2
>>> parts.status
'lsymbol'
>>> parts.candidates
['/:']
>>> parts.candidate_show
1
>>> parts = trans.transliterate_parts(list('a/:('))
>>> parts.committed
'a'
>>> parts.committed_index
1
>>> parts.preedit
'😢'
>>> parts.cursor_pos
1
>>> parts.status
'lsymbol'
>>> parts.candidates
['😢', '😩', '😡', '😭', '😪', '🙈', '🙊', '🙉']
>>> parts.candidate_show
1
>>> parts = trans.transliterate_parts(list('a/:(b'))
>>> parts.committed
'a😢b'
>>> parts.committed_index
5
>>> parts.preedit
''
>>> parts.cursor_pos
0
>>> parts.status
'lsymbol'
>>> parts.candidates
[]
>>> parts.candidate_show
0

For a test transliterating parts using 'ja-anthy' see 'tests/test_m17n_translit.py'.
z+Argument of transliterate() must be a list.rl   )rm   rn   r1   NzProblem accessing preedit   mtext   plistr   ZjaZanthyu   下駄u   〓)
rm   rn   r    r"   r   ro   r$   r%   r&   r'   ),Z
isinstanceZlistr~   ru   rk   rw   lenrE   r   Z	enumerater   rB   r{   rF   r   r(   rI   rG   r4   r:   r}   r!   r    Z	Exceptionr#   r   rL   rO   castrM   r   r   r   appendrN   r"   r   r$   r%   r&   r'   rv   rx   rj   )r_   r   r   r   rm   rn   r    ro   ZindexZsymbolr   retvalZ_mtr   r   keykey_nameZ
charactersZcandidate_plistZcandidate_plist_keyZcandidate_plist_key_nameZ	candidater"   r   r$   r%   r&   r'   r   s   &&&&                         r   transliterate_partsZ"Transliterator.transliterate_parts  s   H ,--JKK;;;'"'',2G7:<7HJ J$TXX.	 "
&|4ME44V<F&v}}W'=>G+'6??4#8:F{$&/HHgvt'<cC%c*Q.!55I&+O6e!44I&+aiO 5	E!!111"HH%%--/123)$((*;*;*C*CD !!005kk%e,C99,S\\:H8#,KK 5e <~689
 d:..
X%"(++)%0NN?3#5 *='+)' 344/D+4406,/8; /1/B"NN>:<!=I %%i0&:'')O (/EXX&&11
 !2!2!9!9:((++;;**99xx((55**99L #6*(HHgvt46W!,/O> :.!J>>T!djjG&;R (" &0=%/	  %*)%; I%/  = z$Q- \
')7F/62<.42<7F6D4@6D	F 	F $-i8++G4!!+)%)
+ 
	+c  	E89uD	E~=s1   .%U= AU= 5
VVV=VVVc                sB   < V ^8  d   QhRS[ S[,          RS[RS[RS[/# r   )r   r,   r   rY   r[   r   r0   rt     sC     XO XO"3-XO XO 	XO %(	XOr   c                s`    V P                  WV4      pVP                  VP                  ,           # )u  Transliterate a list of Msymbol names

:param msymbol_list: A list of strings which are interpreted
                     as the names of Msymbols to transliterate.
                     If the input method has the special name “NoIME”,
                     no transliteration is done, the list of
                     Msymbols is just joined to a single string.
:param ascii_digits: If true, convert language specific digits
                     to ASCII digits
:return: The transliteration in one string

Examples:

Russian transliteration:

>>> trans = Transliterator('ru-translit')
>>> trans.transliterate(list('y'))
'ы'
>>> trans.transliterate(list('yo'))
'ё'
>>> trans.transliterate(list('yo y'))
'ё ы'

Marathi transliteration:

>>> trans = Transliterator('mr-itrans')
>>> trans.transliterate(list('praviN'))
'प्रविण्'
>>> trans.transliterate(list('namaste'))
'नमस्ते'

Hindi transliteration:

>>> trans = Transliterator('hi-itrans')
>>> trans.transliterate(list('namaste'))
'नमस्ते'
>>> trans.transliterate(list('. '))
'। '

Hindi-Inscript2 uses the AltGr key a lot, 'G-4' is
the MSymbol name for AltGr-4 and it transliterates
to something different than just '4':

>>> trans = Transliterator('hi-inscript2')
>>> trans.transliterate(['4', 'G-4'])
'४₹'

>>> trans = Transliterator('hi-inscript2')
>>> trans.transliterate(['G-p'])
'ज़'

AltGr-3 ('G-3') is not used though in Hindi-Inscript2.
Therefore, 'G-3' transliterates just as 'G-3':

>>> trans = Transliterator('hi-inscript2')
>>> trans.transliterate(['3', 'G-3'])
'३G-3'

In mr-inscript2, 'G-1' transliterates to U+200D ZERO WIDTH JOINER
('â' in UTF-8 encoding):

>>> trans = Transliterator('mr-inscript2')
>>> trans.transliterate(['j', 'd', 'G-1', '/']).encode('utf-8')
b'à¤°à¥âà¤¯'

>>> trans = Transliterator('t-latn-post')
>>> trans.transliterate(list('gru"n'))
'grün'

>>> trans = Transliterator('NoIME')
>>> trans.transliterate(['a', 'b', 'c', 'C-c', 'G-4', 'C-α', 'G-α'])
'abcC-cG-4C-αG-α'

>>> trans = Transliterator('ko-romaja')
>>> trans.transliterate(list('annyeonghaseyo'))
'안녕하세요'

>>> trans = Transliterator('si-wijesekara')
>>> trans.transliterate(list('vksIal kjSka '))
'ඩනිෂ්ක නවීන් '
)r   rm   r    )r_   r   r   r   Ztransliteration_partss   &&&& r   transliterateZTransliterator.transliterate  s3    l !% 8 8!/$..1F1N1NNNr   c                sJ   < V ^8  d   QhRS[ S[S[S[S[3,          ,          /# )r)   r+   )r   r   r,   rY   r[   r   r0   rt     s'     M MtE#sC-$89 Mr   c                s0   . pV P                   '       d   V# \        \        V P                  P	                  R4      4      \        V P
                  P	                  R4      4      \        R4      4      p\        V4      '       Ed   \        V4      p\        V4      '       g    V# R\        VP                  4      8w  d    V# \        P                  ! \        V4      \        P                  ! \        4      4      p\        P                  ! \        V4      \        P                  ! \        4      4      p\        V4      '       g    V# \        VP                  4      P!                  R4      p\#        V4      p\        P                  ! \        V4      \        P                  ! \$        4      4      pRp\        V4      '       d   \'        V4      p\#        V4      p\#        V4      p\        V4      p\        V4      '       g    V# \        VP                  4      p	Rp
V	R8X  d\   \        \        P                  ! \        V4      \        P                  ! \        4      4      P                  4      P!                  R4      p
M~V	R8X  dC   \'        \        P                  ! \        V4      \        P                  ! \$        4      4      4      p
M5V	R8X  d&   \        V4      f   Rp
M\)        \        V4      4      p
M	V	R	8X  d   Rp
VP+                  VVV
34       \#        V4      pEK  V# )
a  
Gets the optional variables of this transliterator input method

Examples:

>>> trans = Transliterator('NoIME')
>>> trans.get_variables()
[]
>>> trans = Transliterator('si-wijesekara')
>>> trans.get_variables()
[('use-surrounding-text', 'Surrounding text vs. preedit.\nIf 1, try to use surrounding text.  Otherwise, use preedit.', '0')]
>>> trans = Transliterator('t-unicode')
>>> trans.get_variables()
[('prompt', 'Preedit prompt\nPrompt string shown in the preedit area while typing hexadecimal numbers.', 'U+')]
r1   r   r   rl      symbolr      integerrf   s   t)ru   rK   rB   rv   r{   rx   r   rL   rO   r}   r   r   rM   r   r   r   r8   rN   r   r:   r,   r   )r_   Zvariables_listr   r   ptrvariable_nameZvariable_description_pointerZvariable_descriptionmvaluer   variable_values   &          r   get_variablesZTransliterator.get_variables  s   $ 68;;;!!,T^^227;<TZZ..w78V$& 5kk%e,C99b a 0>>^ ] ++3E:"NN?;=C++3C8$nn-CDFC99R Q 2$fWo &s+C+1;;%c*~.,0( $& 011'60(2$ 's+C)#.F%f-C992 1 -S\\:HN9$!6KK-f5'=>@@H" &/	 
 X%!0KK 5f ="NN>:<"= Z'(08%(N%(-f5&7NT!!#!!=#7#1#3 4 )/Er   c                s:   < V ^8  d   QhRS[ S[S[3,          RR/# )r)   	variablesr+   N)r    r,   rY   r[   r   r0   rt   H  s'     v vtCH~ v$ vr   c           
     s   V P                   '       g	   V'       g   R# VP                  4        EF   w  r#\        \        V P                  P                  R4      4      \        V P                  P                  R4      4      \        VP                  R4      4      4      p\        V4      '       g   \        R4      h\        V4      p\        V4      '       g   \        R4      hR\        VP                  4      8w  d   \        R4      h\        P                  ! \        V4      \        P                  ! \         4      4      p\#        V4      p\#        V4      p\#        V4      p\        V4      p\        V4      '       g   \        R4      h\        VP                  4      p\%        4       p	V'       d   VR8X  d0   \'        V	\        R4      \        VP                  R4      4      4       MVR	8X  dd   \)        \*        \        P,                  ! VP                  R4      4      \/        VP                  R4      4      4      p
\'        V	\        R	4      V
4       M6VR
8X  d%    \1        V^
4      p\'        V	\        R
4      V4       M\        R4      h\3        \        V P                  P                  R4      4      \        V P                  P                  R4      4      \        VP                  R4      4      V	4      pV'       d   \        RV 24      h\5        4       pV^8X  d   EK  V^ 8X  d   \        RV R24      hVR8X  d   \        RV R24      h\        RV R24      h	  R#   \         d    \%        4       p	 Li ; i)a  
Sets the optional variables of this transliterator input method

Raises ValueError if something fails.

Examples:

>>> trans = Transliterator('NoIME')
>>> trans.set_variables([])

Only two >> from here on to avoid executing these Examples
accidentally as doctests and accidentally do real changes
to the user config file ~/.m17n.d/config.mic:

>> trans = Transliterator('bn-national-jatiya')
>> trans.set_variables({'use-automatic-vowel-forming': '1'})

Setting empty strings as values sets the default values
(i.e. it removes the setting from the user config file to
use the global default instead):

>> trans = Transliterator('bn-national-jatiya')
>> trans.set_variables({'use-automatic-vowel-forming': ''})

>> trans = Transliterator('t-unicode')
>> trans.set_variables({'prompt': 'U+'})

>> trans = Transliterator('ja-anthy')
>> trans.set_variables({'input-mode': 'hiragana', 'zen-han': 'hankaku'})
Nr1   z#minput_get_variable() returned NULLzmplist_key(plist) returned NULLr   z*msymbol_name(key.contents) is not b"plist"z mplist_key(mvalue) returned NULLr   r   r   z0Variable type is not Msymbol, Minteger, or Mtextz.minput_config_variable() failed with retval = z*minput_save_config() failed with retval = z) (per-user customization file is locked).z$ (configuration file not writeable).z% (unknown error, should never happen)i)ru   ZitemsrK   rB   rv   r{   rx   r   r~   rL   rO   r}   r   r   rM   r   r   rN   r>   rP   rR   rJ   r6   r   rp   rS   rT   )r_   r   r   r   r   r   r   r   r   Znew_value_plistrH   Z	int_valuer   s   &&           r   set_variablesZTransliterator.set_variablesH  s   > ;;;i-6__->)M0 !6!6w!?@ !2!27!;< !5!5g!>?AE ;; !FGG%e,C99 !BCC0>> !MNN++3E:$nn_=?C&s+C&s+C)#.F%f-C99 !CDD,S\\:H-/O y(''(3()>)>w)GHJ )8.(=(=g(FGN11':;=E ('(2 +<$'$;	++,Z8%' %JL L4 !6!6w!?@ !2!27!;< !5!5g!>?	!F  DVHMO O02F {{ @ I? ?@ @ | @ I: :; ; <VH E7 78 8e .?j 	I & <*9*;<s   "MM,+M,)ru   r   r|   rv   rz   rx   N)FF)r   r   r   r   rq   ra   r   r   r   r   r   r   r   rc   rd   re   r   rr   rr     s`      E  ED0 06 6<	+ 	+BXO XOtM M^v vr   rr   Z__main__)Zstream)Qrq   Ztypingr    r   r   r   r   r   Zsysry   r   ZloggingZgir   Zgi.repositoryr   r   Z	getLoggerZLOGGERZ	Structurer   r   r@   r   r   r   r   Zc_uintr6   r   r   r   r   r=   rB   r>   r?   r2   r5   r7   rC   rD   rE   rF   rG   rI   r4   rJ   r3   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   r:   rU   rV   rW   Z__module_initZordri   rj   rk   rr   r   ZStreamHandlerZstderrZLOG_HANDLERZsetLevelZDEBUGZ
addHandlerZdoctestZtestmodZFAILEDZ
_ATTEMPTEDZexitr	   r   r   <module>r      s.  (       
 	       			0	1	V-- 	>>"89 	f&& 		&** 		F,, 		V%% 	 V]]#V__v||oV^^234#6  6#3#3 4V-- 46  "& !% #          #       # "& " -*|7@  $%b	Jb	Jb	 Jb	 J	b	
 Jb	 Jb	 Jb	 Jb	 Jb	 Jb	 Jb	 Jb	 Jb	 Jb	 Jb	  J!b	" J#b	$ J%b	& J'b	( J)b	* J+b	, J-b	. J/b	0 J1b	2 J3b	4 J5b	6 J7b	8 J9b	: J;b	< J=b	> J?b	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Iswb	x Isyb	z Is{b	| Is}b	~ Isb	@ IsAb	B IsCb	D IsEb	F IsGb	H IsIb	J IsKb	L IsMb	N IsOb	P IsQb	R IsSb	T IsUb	V IsWb	X IsYb	Z Is[b	\ Is]b	^ Is_b	` Isab	b Iscb	d Iseb	f Isgb	h Isib	j Iskb	l Ismb	n Isob	p Isqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@ JAb	B JCb	D JEb	F JGb	H JIb	J JKb	L JMb	N JOb	P JQb	R JSb	T JUb	V JWb	X JYb	Z J[b	\ J]b	^ J_b	` Jab	b Jcb	d Jeb	f Jgb	h Jib	j Jkb	l Jmb	n Job	p Jqb	r Jsb	t Jub	v Jwb	x Jyb	z J{b	| J}b	~ Jb	@	 JA	b	B	 JC	b	D	 JE	b	F	 JG	b	H	 JI	b	J	 JK	b	L	 JM	b	N	 JO	b	P	 JQ	b	R	 JS	b	T	 JU	b	V	 JW	b	X	 JY	b	Z	 J[	b	\	 J]	b	^	 J_	b	`	 Ja	b	b	 Jc	b	d	 Je	b	f	 Jg	b	h	 Ji	b	j	 Jk	b	l	 Jm	b	n	 Jo	b	p	 Jq	b	r	 Js	b	t	 Ju	b	v	 Jw	b	x	 Jy	b	z	 J{	b	|	 J}	b	~	 J	b	@
 JA
b	B
 JC
b	D
 JE
b	F
 JG
b	H
 JI
b	J
 JK
b	L
 JM
b	N
 JO
b	P
 JQ
b	R
 JS
b	T
 JU
b	V
 JW
b	X
 JY
b	Z
 J[
b	\
 J]
b	^
 J_
b	`
 Ja
b	b
 Jc
b	d
 Je
b	f
 Jg
b	h
 Ji
b	j
 Jk
b	l
 Jm
b	n
 Jo
b	p
 Jq
b	r
 Js
b	t
 Ju
b	v
 Jw
b	x
 Jy
b	z
 J{
b	|
 J}
b	~
 K
b	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z K{b	| K}b	~ Kb	@ KAb	B KCb	D KEb	F KGb	H KIb	J KKb	L KMb	N KOb	P KQb	R KSb	T KUb	V KWb	X KYb	Z K[b	\ K]b	^ K_b	` Kab	b Kcb	d Keb	f Kgb	h Kib	j Kkb	l Kmb	n Kob	p Kqb	r Ksb	t Kub	v Kwb	x Kyb	z KKKKKCb	 H-$/: /bt tl z''szz:K
OOGMM"
k""??,VZHHV r   