
    bi                     x    d Z ddlmZmZmZmZ ddlZddlZddlm	Z	m
Z
 ddlmZ ddl d Zdd	Zd
 Z e        y)a  Interactive widgets for the Jupyter notebook.

Provide simple interactive controls in the notebook.
Each Widget corresponds to an object in Python and Javascript,
with controls on the page.

To put a Widget on the page, you can display it with Jupyter's display machinery::

    from ipywidgets import IntSlider
    slider = IntSlider(min=1, max=10)
    display(slider)

Moving the slider will change the value. Most Widgets have a current value,
accessible as a `value` attribute.
   )__version____protocol_version__$__jupyter_widgets_controls_version__ __jupyter_widgets_base_version__    N)linkdlink)get_ipython)*c                 2    t        | d      syt                y)z#Set up Jupyter to work with widgetskernelN)hasattrregister_comm_targetips    N/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/ipywidgets/__init__.pyload_ipython_extensionr       s    2x     c                     ddl m} |j                         }|y|j                  dt        j
                         |j                  dt        j                         y)z'Register the jupyter.widget comm targetr   )commNzjupyter.widgetzjupyter.widget.control) r   get_comm_managerregister_targetWidgethandle_comm_openedhandle_control_comm_opened)r   r   comm_managers      r   r   r   &   sJ    ((*L  !163L3LM  !96;\;\]r   c                  2    t               } | yt                y)z=Register with the comm target at import if running in JupyterN)r
   r   r   s    r   _handle_ipythonr   /   s    	B	zr   )N)__doc___versionr   r   r   r   ossys	traitletsr   r	   IPythonr
   widgetsr   r   r    r   r   <module>r(      s:   " @  	 
 !  ^  r   