� ��gq� �\�dZddlZddlZGd�dej��Zded��ed��ed��ed ��ed ��ed ��ed ��d �fded��ed ��ed ��ed ��ed ��d�fded ��ed��ed��ed ��ed ��ed ��d�fded��ed ��ed ��ed ��ed ��d�fd�ZiZd�Zej e��dS)z�Extend the Python codecs module with a few encodings that are used in OpenType (name table) but missing from Python. See https://github.com/fonttools/fonttools/issues/236 for details.�Nc�0�eZdZd�Zd�Zdd�Zdd�Zd�ZdS) � ExtendCodecc�`�||_||_||_d�|���D��|_t d�|���D����|_tj |j|j |j ���|_ tj ||j��dS)Nc��i|]\}}||�� S�r)�.0�k�vs �j/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/fontTools/encodings/codecs.py� <dictcomp>z(ExtendCodec.__init__.<locals>.<dictcomp> s��9�9�9���A��1�9�9�9�c3�4K�|]}t|��V��dS�N)�len)rr s r � <genexpr>z'ExtendCodec.__init__.<locals>.<genexpr>s(����<�<�a�3�q�6�6�<�<�<�<�<�<r )�name�encode�decode)r� base_encoding�mapping�items�reverse�max�values�max_len�codecs� CodecInforr�info�register_error�error)�selfrrrs r �__init__zExtendCodec.__init__ s����� �*����� �9�9������9�9�9�� ��<�<�7�>�>�+;�+;�<�<�<�<�<�� ��$���4�;�t�{� � � �� � ��d�D�J�/�/�/�/�/r c�V�tj|��}t|��}|��}|rw |||j|j���} || z }nX#|$rN} |||d| j�|j|j��z }|| ��\} } || z }|| d�}Yd} ~ nd} ~ wwxYw|�w||fS)N)�errors)r� lookup_errorrrr�start) r!�mapper� output_type�exc_type�inputr$�base_error_handler�length�out�part�e� replacement�poss r �_mapzExtendCodec._maps���#�0��8�8���U�����k�m�m��� $� $��v�e�T�%7�� �J�J�J���t� ����� $� $� $��v�v�e�I�a�g�I�.��0B�D�I�N�N�N��#5�#5�a�#8�#8� � �S��{�"���c�d�d� �����������  $���� � $��F�{�s�A�B"�AB�B"�strictc�\�|�tjtt||��Sr)r2rr�bytes�UnicodeEncodeError�r!r*r$s r rzExtendCodec.encode&s���y�y����/A�5�&�Q�Q�Qr c�\�|�tjtt||��Sr)r2rr�str�UnicodeDecodeErrorr7s r rzExtendCodec.decode)s���y�y����-?���O�O�Or c���t|t��rRt|jdz|jdz��D]0}|j|j|�}||jvr|j||fcS�1nnt|t��rYt|jdz|j|jzdz��D]0}|j|j|�}||j vr|j ||fcS�1|j |_ |�)N�) � isinstancer:�ranger&�end�objectrr6rrr�encoding)r!r/r?�ss r r zExtendCodec.error,s�� �a�+� ,� ,� 0��Q�W�q�[�!�%�!�)�4�4� 0� 0���H�Q�W�s�]�+���� �$�$��<��?�C�/�/�/�/�%� 0���-� .� .� 0��Q�W�q�[�!�'�D�L�*@�1�*D�E�E� 0� 0���H�Q�W�s�]�+���� �$�$��<��?�C�/�/�/�/�%��Y�� ��r N)r3)�__name__� __module__� __qualname__r"r2rrr rr r rrsq������ 0� 0� 0����$R�R�R�R�P�P�P�P� � � � � r r� shift_jis�|�~�\��i"!i& )���~�����������big5)rNrOrPrQrR�euc_kri� i )rN������rQrR�gb2312��)�x_mac_japanese_ttx�x_mac_trad_chinese_ttx�x_mac_korean_ttx�x_mac_simp_chinese_ttxc�V�tj|��}|tvr�|tvrpt|\}}|dd�dksJ�|dd�|g}|D]A} t j|��n#t $rY�$wxYwt|||��t|<t|jSdS)N������_ttx) � encodings�normalize_encoding�_extended_encodings�_cacher�lookup� LookupErrorrr)rrr�base_encodingss r �search_functionrhls��� � '�� -� -�D� �"�"�"� �v� � �%8��%>� "�M�7�����9��&�&�&�&�#�3�B�3�i��7�N�!/� � � ���M�-�0�0�0�0��"�����H�����*�4���H�H��t� ���d�|� � � �4s�A-�- A:�9A:) �__doc__rra�Codecr�chrrcrdrh�registerrr r �<module>rms���`�`�� � � �����0�0�0�0�0�&�,�0�0�0�j ��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[� � � � ��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[�  � � � ��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[�  � � � ��S��[�[��S��[�[��S��[�[��S��[�[��S��[�[�  � � �E,�,��\ �����6���� � � � � r
Memory