�
�d� � �n � d dl mZmZ ddlmZ ddlmZ ddlmZm Z m
Z
ddlmZm
Z
mZmZ G d� de� Zy )
� )�Optional�Union� )�
CharSetProber)�CodingStateMachine)�LanguageFilter�MachineState�ProbingState)�HZ_SM_MODEL�ISO2022CN_SM_MODEL�ISO2022JP_SM_MODEL�ISO2022KR_SM_MODELc � � � e Zd ZdZej
fdeddf� fd�
Zd� fd�Zede e
fd�� Zede e
fd�� Zde
fd �Zd
eeef defd�Z� xZS )
�EscCharSetProberz�
This CharSetProber uses a "code scheme" approach for detecting encodings,
whereby easily recognizable escape or shift sequences are relied on to
identify these encodings.
�lang_filter�returnNc � �� t �| � |�� g | _ | j t j
z rP| j j
t t � � | j j
t t � � | j t j z r(| j j
t t � � | j t j z r(| j j
t t � � d| _ d | _ d | _ t" |