ó â\e[c@`s'ddlmZmZmZddlmZddlmZyddlj j Z Wn#e k rwddl j jZ nXddddd d gZyCed ƒZeeeƒsÒed ƒZeeeƒsÒt‚nWn eZnXeZd efd„ƒYZd„Zd„Zd„Zd„ZdS(i(tabsolute_importtdivisiontunicode_literals(t ModuleType(t text_typeNu default_etreeuMethodDispatcheruisSurrogatePairusurrogatePairToCodepointumoduleFactoryFactoryusupports_lone_surrogatesu"\uD800"u u"\uD800"tMethodDispatchercB`s#eZdZdd„Zd„ZRS(upDict with 2 special properties: On initiation, keys that are lists, sets or tuples are converted to multiple keys so accessing any one of the items in the original list-like object returns the matching value md = MethodDispatcher({("foo", "bar"):"baz"}) md["foo"] == "baz" A default value which can be set through the default attribute. cC`s­g}xi|D]a\}}t|ttttfƒr[x7|D]}|j||fƒq;Wq |j||fƒq Wtj||ƒt|ƒt|ƒks t ‚d|_ dS(N( t isinstancetlistttuplet frozensettsettappendtdictt__init__tlentAssertionErrortNonetdefault(tselftitemst _dictEntriestnametvaluetitem((s:/tmp/pip-install-0xiv62/pip/pip/_vendor/html5lib/_utils.pyR 1s cC`stj|||jƒS(N(R tgetR(Rtkey((s:/tmp/pip-install-0xiv62/pip/pip/_vendor/html5lib/_utils.pyt __getitem__@s((t__name__t __module__t__doc__R R(((s:/tmp/pip-install-0xiv62/pip/pip/_vendor/html5lib/_utils.pyR$s  cC`sht|ƒdkogt|dƒdkogt|dƒdkogt|dƒdkogt|dƒdkS(NiiiØiÿÛiiÜiÿß(Rtord(tdata((s:/tmp/pip-install-0xiv62/pip/pip/_vendor/html5lib/_utils.pytisSurrogatePairGs,cC`s2dt|dƒddt|dƒd}|S(NiiiØiiiÜ(R(Rtchar_val((s:/tmp/pip-install-0xiv62/pip/pip/_vendor/html5lib/_utils.pytsurrogatePairToCodepointMsc`si‰‡‡fd†}|S(Nc`sttjtdƒƒr(d|j}n d|j}t|jƒƒ}yˆ|||SWnµtk rt|ƒ}ˆ|||Ž}|jj|ƒdˆkr²iˆ|s,      #