# Path: resources/lib/kindleunpack/compatibility_utils.py
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
# ASCII_CHARS   = set(chr(x) for x in range(128))
# URL_SAFE      = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
#                     'abcdefghijklmnopqrstuvwxyz'
#                     '0123456789' '#' '_.-/~')
# IRI_UNSAFE = ASCII_CHARS - URL_SAFE
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def lrange(*args, **kwargs):
#     def lzip(*args, **kwargs):
#     def lmap(*args, **kwargs):
#     def lfilter(*args, **kwargs):
# def hexlify(bdata):
# def utf8_str(p, enc='utf-8'):
# def unicode_str(p, enc='utf-8'):
# def quoteurl(href):
# def unquoteurl(href):
# def unescapeit(sval):
# def unicode_argv():
# def add_cp65001_codec():


from .compatibility_utils import PY2, text_type, bchr, bord
from itertools import cycle
import binascii
            57 : {0 : 'hi'},  # Hindi
            14 : {0 : 'hu'},  # Hungarian
            15 : {0 : 'is'},  # Icelandic
            33 : {0 : 'id'},  # Indonesian
            16 : {0 : 'it', 1 : 'it' , 2 : 'it-ch'},  # Italian,  Italian (Switzerland)
            17 : {0 : 'ja'},  # Japanese
            75 : {0 : 'kn'},  # Kannada
            63 : {0 : 'kk'},  # Kazakh
            87 : {0 : 'x-kok'},  # Konkani (real language code is 'kok'?)
            18 : {0 : 'ko'},  # Korean
            38 : {0 : 'lv'},  # Latvian
            39 : {0 : 'lt'},  # Lithuanian
            47 : {0 : 'mk'},  # Macedonian
            62 : {0 : 'ms'},  # Malay
            76 : {0 : 'ml'},  # Malayalam
            58 : {0 : 'mt'},  # Maltese
            78 : {0 : 'mr'},  # Marathi
            97 : {0 : 'ne'},  # Nepali
            20 : {0 : 'no'},  # Norwegian
            72 : {0 : 'or'},  # Oriya
            21 : {0 : 'pl'},  # Polish
            22 : {0 : 'pt', 2 : 'pt' , 1 : 'pt-br'},  # Portuguese,  Portuguese (Brazil)
            70 : {0 : 'pa'},  # Punjabi
            23 : {0 : 'rm'},  # "Rhaeto-Romanic" (IANA: Romansh)
            24 : {0 : 'ro'},  # Romanian
            25 : {0 : 'ru'},  # Russian
            59 : {0 : 'sz'},  # "Sami (Lappish)" (not an IANA language code)
            # IANA code for "Northern Sami" is 'se'
            # 'SZ' is the IANA region code for Swaziland
            79 : {0 : 'sa'},  # Sanskrit

# Path: resources/lib/kindleunpack/compatibility_utils.py
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
# ASCII_CHARS   = set(chr(x) for x in range(128))
# URL_SAFE      = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
#                     'abcdefghijklmnopqrstuvwxyz'
#                     '0123456789' '#' '_.-/~')
# IRI_UNSAFE = ASCII_CHARS - URL_SAFE
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def lrange(*args, **kwargs):
#     def lzip(*args, **kwargs):
#     def lmap(*args, **kwargs):
#     def lfilter(*args, **kwargs):
# def hexlify(bdata):
# def utf8_str(p, enc='utf-8'):
# def unicode_str(p, enc='utf-8'):
# def quoteurl(href):
# def unquoteurl(href):
# def unescapeit(sval):
# def unicode_argv():
# def add_cp65001_codec():


# Path: resources/lib/kindleunpack/mobi_utils.py
from .compatibility_utils import PY2, text_type, bchr, bord
from itertools import cycle
import binascii

            57 : {0 : 'hi'},  # Hindi
            14 : {0 : 'hu'},  # Hungarian
            15 : {0 : 'is'},  # Icelandic
            33 : {0 : 'id'},  # Indonesian
            16 : {0 : 'it', 1 : 'it' , 2 : 'it-ch'},  # Italian,  Italian (Switzerland)
            17 : {0 : 'ja'},  # Japanese
            75 : {0 : 'kn'},  # Kannada
            63 : {0 : 'kk'},  # Kazakh
            87 : {0 : 'x-kok'},  # Konkani (real language code is 'kok'?)
            18 : {0 : 'ko'},  # Korean
            38 : {0 : 'lv'},  # Latvian
            39 : {0 : 'lt'},  # Lithuanian
            47 : {0 : 'mk'},  # Macedonian
            62 : {0 : 'ms'},  # Malay
            76 : {0 : 'ml'},  # Malayalam
            58 : {0 : 'mt'},  # Maltese
            78 : {0 : 'mr'},  # Marathi
            97 : {0 : 'ne'},  # Nepali
            20 : {0 : 'no'},  # Norwegian
            72 : {0 : 'or'},  # Oriya
            21 : {0 : 'pl'},  # Polish
            22 : {0 : 'pt', 2 : 'pt' , 1 : 'pt-br'},  # Portuguese,  Portuguese (Brazil)
            70 : {0 : 'pa'},  # Punjabi
            23 : {0 : 'rm'},  # "Rhaeto-Romanic" (IANA: Romansh)
            24 : {0 : 'ro'},  # Romanian
            25 : {0 : 'ru'},  # Russian
            59 : {0 : 'sz'},  # "Sami (Lappish)" (not an IANA language code)
            # IANA code for "Northern Sami" is 'se'
            # 'SZ' is the IANA region code for Swaziland
            79 : {0 : 'sa'},  # Sanskrit

            27 : {0 : 'sk'},  # Slovak