a lj2 @ s0 d dl mZ ddlZddlZddlZddlmZmZ d dlm Z dZ dZedZ G d d d eZG dd deZG d d deZG dd deZdd Zdd Zdd Zdd Zdd Zdd Zd7ddZd d! Zd"d# Zd$d% Zd&d' Zd8d(d)Zd*d+ Zd,d- Z d.d/ Z!d9d1d2Z"d:d3d4Z#d;d5d6Z$dS )< )idnadata N)UnionOptional)intranges_contain s xn--u [.。.。]c @ s e Zd ZdZdS ) IDNAErrorz7 Base exception for all IDNA-encoding related problems N__name__ __module____qualname____doc__ r r 9/usr/lib/python3.9/site-packages/pip/_vendor/idna/core.pyr s r c @ s e Zd ZdZdS ) IDNABidiErrorz= Exception when bidirectional requirements are not satisfied Nr r r r r r s r c @ s e Zd ZdZdS )InvalidCodepointz> Exception when a disallowed or unallocated codepoint is used Nr r r r r r s r c @ s e Zd ZdZdS )InvalidCodepointContextzE Exception when the codepoint is not valid in the context it is used Nr r r r r r s r c C s0 t t| }|dkr,t t| s,td|S )Nr z Unknown character in unicodedata)unicodedataZ combiningchrname ValueError)cpvr r r _combining_class s r c C s t t| tj| S )N)r ordr Zscripts)r Zscriptr r r _is_script( s r c C s | dS )Npunycode)encodesr r r _punycode, s r c C s d | S )NzU+{:04X})formatr r r r _unot0 s r" c C s t | dkrdS dS )N? FTlenlabelr r r valid_label_length5 s r( c C s t | |rdndkrdS dS )N FTr$ )r' trailing_dotr r r valid_string_length<