
    BVh                     $    d Z ddlZdgZ	 	 	 ddZy)z3TensorFlow Debugger (tfdbg) User-Interface Factory.    Nreadlinec                    |t        j                  t              }| r| |vrt        d| z        	 | dk(  rddlm} |j                  ||      S y# t        $ r1 |j                  |        |st        d      t        |d   |      cY S w xY w)	ac  Create a `base_ui.BaseUI` subtype.

  This factory method attempts to fallback to other available ui_types on
  ImportError.

  Args:
    ui_type: (`str`) requested UI type. Currently supported:
      ( readline)
    on_ui_exit: (`Callable`) the callback to be called when the UI exits.
    available_ui_types: (`None` or `list` of `str`) Manually-set available
      ui_types.
    config: An instance of `cli_config.CLIConfig()` carrying user-facing
      configurations.

  Returns:
    A `base_ui.BaseUI` subtype object.

  Raises:
    ValueError: on invalid ui_type or on exhausting or fallback ui_types.
  NzInvalid ui_type: '%s'r   r   )readline_ui)
on_ui_exitconfigz Exhausted all fallback ui_types.)available_ui_types)
copydeepcopySUPPORTED_UI_TYPES
ValueErrortensorflow.python.debug.clir   
ReadlineUIImportErrorremoveget_ui)ui_typer   r   r   r   s        V/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/debug/cli/ui_factory.pyr   r      s    0 '9:'!33
,w6
779*9##z&#II  
 9g&9::$Q'%79 9	9s   A 7B
	B
)NNN)__doc__r	   r   r        r   <module>r      s'    :  !\  ")9r   