
    G@dXi                     @   d Z ddlZddlZddlZddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZ ddlmZmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ  G d de
          Z G d de	          Z G d de          Z G d de          Z  G d de e          Z!dS )zS
Widget that handles communications between a console in debugging
mode and Spyder
    N)HistoryManager)TransformerManager)IPythonLexerIPython3Lexer)bygroups)KeywordOperatorText)ClassNotFound)RichJupyterWidget)QEvent)QTextCursor)SpyderConfigurationAccessorget_conf_pathc            	       n    e Zd Zej        Zed                             dd eeee	          f           dS )SpyderIPy3Lexerrootr   (!)(\w+)(.*\n)N
__name__
__module____qualname__r   tokensinsertr   r	   r   r
        Olib/python3.11/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.pyr   r   !   sV        !F
6N	xx'4@@AC C C C Cr   r   c            	       n    e Zd Zej        Zed                             dd eeee	          f           dS )SpyderIPy2Lexerr   r   r   Nr   r   r   r   r    r    (   sV        !F
6N	xx'4@@AC C C C Cr   r    c                       e Zd ZddZdS )
PdbHistoryNc                      t          d          S )z
        Get default pdb history file name.

        The profile parameter is ignored, but must exist for compatibility with
        the parent class.
        zpdb_history.sqliter   )selfprofiles     r   _get_hist_file_namezPdbHistory._get_hist_file_name0   s     1222r   N)r   r   r   r&   r   r   r   r"   r"   .   s(        3 3 3 3 3 3r   r"   c                        e Zd ZdZdZ fdZd Zd Zd Ze	d             Z
e
j        d             Z
e	d	             Zej        d
             Ze	d             Zej        d             Z xZS )DebuggingHistoryWidgetzu
    Widget with the necessary attributes and methods to override the pdb
    history mechanism while debugging.
    i  c                 j   d| _         g | _        	 t                      | _        d | j                            | j        d          D             | _        n# t          $ r d | _        g | _        Y nw xY wi | _        t          | j                  | _
         t          t          |           j        |i | d S )Nr   c                     g | ]
}|d          S )r   ).0lines     r   
<listcomp>z3DebuggingHistoryWidget.__init__.<locals>.<listcomp>K   s)     ! ! !!R! ! !r   T)include_latest)_pdb_history_input_number_saved_pdb_history_input_numberr"   _pdb_history_fileget_tailPDB_HIST_MAX_pdb_history	Exception_pdb_history_editslen_pdb_history_indexsuperr)   __init__r$   argskwargs	__class__s      r   r<   zDebuggingHistoryWidget.__init__A   s    )*&/1,
	#%/\\D"! !%)%;%D%D%d &E &< &<! ! !D  	# 	# 	#%)D" "D	# #%"%d&7"8"8 	5$d++4dEfEEEEEs   AA A0/A0c                 X    d| _         | j        | j                                         dS dS )zStart a new history session.r   N)r1   r3   new_sessionr$   s    r   new_history_sessionz*DebuggingHistoryWidget.new_history_sessionZ   6    )*&!-"..00000 .-r   c                 X    d| _         | j        | j                                         dS dS )zEnd an history session.r   N)r1   r3   end_sessionrC   s    r   end_history_sessionz*DebuggingHistoryWidget.end_history_session`   rE   r   c                 |   | xj         dz  c_         | j         }t          | j                  | _        i | _        |                                }|sdS | j        }t          |          dk    r|d         |k    rdS |                    d          d         }|                    d          dd         }|                                o)|d         dk    od|z   t          t          j
                  v }|                                 rH|pE|                                o1|d         dk    o%d|dd         z   t          t          j
                  v }|rl|rt          |          dk    r[| j                            |           t          | j                  | _        | j        | j                            ||           dS dS dS dS )zAdd command to history   Nr   r,    !do_)r1   r9   r6   r:   r8   rstripsplitstripdirpdbPdbis_pdb_using_exclamantion_markappendr3   store_inputs)r$   r.   line_numhistorycmdr>   
is_pdb_cmds          r   add_to_pdb_historyz)DebuggingHistoryWidget.add_to_pdb_historyf   s   &&!+&&1"%d&7"8"8"${{}} 	F #w<<!t 3 3Fjjooa zz#qrr"IIKKICFcMIeckS\\.I 	 ..00 	5# 5		 4A# 4CGOs37||3   	D
 	Dc$ii!mm$$T***&)$*;&<&<D#%1&33HdCCCCC		D 	D 21 '4mr   c                 F    |                                  r| j        S | j        S )zGet history.is_debuggingr6    _DebuggingHistoryWidget__historyrC   s    r   _historyzDebuggingHistoryWidget._history   s)      	"$$>!r   c                 N    |                                  r	|| _        dS || _        dS )zSet history.Nr]   )r$   rX   s     r   r`   zDebuggingHistoryWidget._history   s1      	% 'D$DNNNr   c                 F    |                                  r| j        S | j        S )zGet edited history.r^   r8   &_DebuggingHistoryWidget__history_editsrC   s    r   _history_editsz%DebuggingHistoryWidget._history_edits   *      	(**''r   c                 N    |                                  r	|| _        dS || _        dS )zSet edited history.Nrc   )r$   history_editss     r   re   z%DebuggingHistoryWidget._history_edits   4      	1&3D####0D   r   c                 F    |                                  r| j        S | j        S )zGet history index.r^   r:   &_DebuggingHistoryWidget__history_indexrC   s    r   _history_indexz%DebuggingHistoryWidget._history_index   rf   r   c                 N    |                                  r	|| _        dS || _        dS )zSet history index.Nrk   )r$   history_indexs     r   rm   z%DebuggingHistoryWidget._history_index   ri   r   )r   r   r   __doc__r5   r<   rD   rH   r[   propertyr`   setterre   rm   __classcell__r@   s   @r   r)   r)   :   s+         LF F F F F21 1 11 1 1D D D@ " " X" _% % _% ( ( X( 1 1 1 ( ( X( 1 1 1 1 1 1 1r   r)   c                   (    e Zd ZdZdZ fdZd Zd Zd Zd)dZ	 fd	Z
	 	 d*dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd) fd	Zd Zd Z fdZd Zd+d Zd! Z d, fd"	Z!d# Z"d+d$Z#	 	 d- fd%	Z$ fd&Z% fd'Z& fd(Z' xZ(S ).DebuggingWidgetz
    Widget with the necessary attributes and methods to handle
    communications between a console in debugging mode and
    Spyder
    ipython_consolec                 b   d| _         d| _        d| _        d| _        d| _        d| _        d| _        g | _        d| _         t          t          |           j        |i | t          j        d                    t          j        | j                            dz   dz             | j        _        d S )Nr   FNN z^({})?(z[ \t]*\(*IPdb \[\d+\]\)*: |z)[ \t]*In \[\d+\]: |[ \t]*\ \ \ \.\.\.+: ))_pdb_in_loop_pdb_input_ready_waiting_pdb_input_pdb_prompt_pdb_last_cmd_pdb_frame_loc_pdb_focus_to_editor_pdb_input_queue_tmp_readingr;   rv   r<   recompileformatescapeother_output_prefix_highlighter_ipy_prompt_rer=   s      r   r<   zDebuggingWidget.__init__   s     %"''*$)! !#!-ot$$-t>v>>> ,.:bi(@AABB*+89,: ,:(((r   c                    | j         	 | j         j                                         t          j        | j         j        j                   n# t
          $ r Y nw xY w	 | j         j                                         dS # t
          $ r Y dS w xY wdS )z:
        Close the save thread and database file.
        N)r3   save_threadstopatexit
unregisterAttributeErrordbcloserC   s    r   shutdownzDebuggingWidget.shutdown   s     !-&277999!$"8"D"IJJJJ!   &)//11111!    .-s$   AA 
AAA< <
B
	B
c                    |rc| j         dk    r3| j                            | j                   |                                  |                                  | xj         dz  c_         nl| j         dk    ra| xj         dz  c_         |                                  | j         dk    r2|                                  | j                                        | _        g | _        d| _        dS )zUpdate the debug state.r   rJ   ry   N)	r{   r2   rU   r1   rH   rD   popr   r   )r$   r^   s     r   set_debug_statezDebuggingWidget.set_debug_state   s     	@ 1$$4;;24 4 4((***$$&&&""""$$&&& 1$$((***8<<>> . !#*r   c                 h    d}| j                                         r|                                 rd}|S )zReturn the command prefixrz   rL   )spyder_kernel_commis_openrT   )r$   prefixs     r   _pdb_cmd_prefixzDebuggingWidget._pdb_cmd_prefix  s<    #++-- 	3355	Fr   Fc                 p    || _         |                     |                                 |z   ddd           dS )z'
        Execute a pdb command
        F)hiddenecho_stack_entryadd_historyN)r   pdb_executer   )r$   commandfocus_to_editors      r   pdb_execute_commandz#DebuggingWidget.pdb_execute_command  sN     %4!  ""W,U" 	 	7 	7 	7 	7 	7r   c                 <   | j                                         s|d         d         dk    r|                                  |                                 }|                    | j        t          j                   |                                	                                }t          j        d|          }|r?|                                \  }}| j                            |t          |                     t!          t"          |                               |          S )zProcess an input request.contentpromptzipdb> z> (.*\.py)\((\d+)\))r   r   _flush_pending_stream_get_end_cursorsetPosition_prompt_posr   
KeepAnchor	selectiontoPlainTextr   searchgroupssig_pdb_stepemitintr;   rv   _handle_input_request)r$   msgcursortextmatchfnamelinenor@   s          r   r   z%DebuggingWidget._handle_input_request  s    '//11 
	;Ix(H44&&((())++Ft/1GHHH##%%1133DI4d;;E ; %v!&&uc&kk:::_d++AA#FFFr   Tc                 F   | j                                         sJ|s|                     |dz              |                                  | j                            |           dS |                                 sdS |                                s| j        }|rd}n/| 	                                s | j
                            ||||f           dS |                                r|| _        |                                | j                                        k    r|| _        |                     d           |r|                     |           | j        | _        d| _        d| _        d| _        |                                  d}| j                            |           | j                            d|                                            | j        r2d| _        |                     d                              ||          S | j
                            ||||f           dS )a  
        Send line to the pdb kernel if possible.

        Parameters
        ----------
        line: str
            the line to execute

        hidden: bool
            If the line should be hidden

        echo_stack_entry: bool
            If not hidden, if the stack entry should be printed

        add_history: bool
            If not hidden, wether the line should be added to history
        
NFT	interrupt)r   )r   r   _append_plain_text_finalize_input_requestkernel_clientinputr^   rP   r   is_waiting_pdb_inputr   rU   input_bufferr[   _input_buffer_executing
_executingr}   r   	executingr   sig_pdb_state_changedget_pdb_last_stepr|   call_kernelpdb_input_reply)r$   r.   r   r   r   s        r   r   zDebuggingWidget.pdb_execute'  sb   ( &..00 	 5''t444((***$$T***F  "" 	Fzz|| 	&%D #	1$,,.. %,,6#3[AC C Czz|| *%)" zz||t0668888$(!##D))) .''--- ,0+<D("DO&+D# !&D((***F N%%%&++t--//1 1 1   	9$)D!##d#33CC'7 D 9 9 9 	$$6+[9	; 	; 	; 	; 	;r   c                     |                      di d          |                      d          |                      d          |                                 |                      d          dS )zGet pdb settingsbreakpointsrundefaultsectionpdb_ignore_libpdb_execute_eventspdb_stop_first_line)r   r   r   pdb_use_exclamation_markr   )get_confrT   rC   s    r   get_pdb_settingsz DebuggingWidget.get_pdb_settingsw  so      ==r5 ) : :"mm,<=="&--0D"E"E(,(K(K(M(M#'==1F#G#G
 
 	
r   c                     | j                                         r(|                                 s|                                  |                     d           dS )zStop debugging.exitN)r   r   r   interrupt_kernelr   rC   s    r   stop_debuggingzDebuggingWidget.stop_debugging  sY    #++-- 	$--//	$!!###  (((((r   c                     |                      d                              |                     di d                     dS )z/Set Spyder breakpoints into a debugging sessionTr   r   r   r   N)r   set_breakpointsr   rC   s    r   set_spyder_breakpointsz&DebuggingWidget.set_spyder_breakpoints  sO    4((88MM-UMCC	E 	E 	E 	E 	Er   c                 X    |                      d                              |           dS )z+Set pdb_ignore_lib into a debugging sessionTr   N)r   set_pdb_ignore_lib)r$   r   s     r   r   z"DebuggingWidget.set_pdb_ignore_lib  s8    4((;;	 	 	 	 	r   c                 X    |                      d                              |           dS )z/Set pdb_execute_events into a debugging sessionTr   N)r   set_pdb_execute_events)r$   r   s     r   r   z&DebuggingWidget.set_pdb_execute_events  s8    4((??	  	  	  	  	 r   c                 X    |                      d                              |           dS )z5Set pdb_use_exclamation_mark into a debugging sessionTr   N)r   set_pdb_use_exclamation_mark)r$   r   s     r   r   z,DebuggingWidget.set_pdb_use_exclamation_mark  s8    4((EE$	& 	& 	& 	& 	&r   c                 ,    |                      d          S )Nr   )r   rC   s    r   rT   z.DebuggingWidget.is_pdb_using_exclamantion_mark  s    }}7888r   c                 X    | j         \  }}|r| j                            ||           dS dS )z-Where was called, go to the current location.N)r   r   r   r$   r   r   s      r   do_wherezDebuggingWidget.do_where  s?    +v 	2""5&11111	2 	2r   c                 @   d|v rYd|d         v rO|d         d         }|d         d         }| j         }||f| _         ||f|k    r| j                            ||           d|v r|                     |d                    d|v r|                     |d                    dS dS )z
        Refresh Variable Explorer and Editor from a Pdb session,
        after running any pdb command.

        See publish_pdb_state and notify_spyder in spyder_kernels
        stepr   r   namespace_viewvar_propertiesN)r   r   r   set_namespace_viewset_var_properties)r$   	pdb_stater   r   last_pdb_locs        r   refresh_from_pdbz DebuggingWidget.refresh_from_pdb  s     Y7i.?#?#?f%g.Ev&x0F.L#(&/D v,..!&&uf555y((##I.>$?@@@y((##I.>$?@@@@@ )(r   c                 f    |,t          |t                    r|                     |           dS dS dS )zSet current pdb state.N)
isinstancedictr   )r$   r   s     r   set_pdb_statezDebuggingWidget.set_pdb_state  s?     Z	4%@%@ !!),,,,, !   r   c                 p   |                      | j        d           |                                 }|                     d|z  d           d|v r1| j                            d          s|                      dd           |                      || j        z   d           |                      dd           dS )zShow Pdb output.T)before_promptz"<span class="out-prompt">%s</span>r   N)r   
output_sep_current_out_prompt_append_htmlendswithoutput_sep2)r$   r   r   s      r   show_pdb_outputzDebuggingWidget.show_pdb_output  s    tDDD))++069 	 	
 	
 	
 4<< 8 8 > ><##D#===t'7 7tLLLD99999r   c                 (    | j         \  }}|i S ||dS )z/Get last pdb step retrieved from a Pdb session.N)r   r   )r   r   s      r   r   z!DebuggingWidget.get_pdb_last_step  s-    +v=I " " 	"r   c                     | j         dk    S )zCheck if we are debugging.r   )r{   rC   s    r   r^   zDebuggingWidget.is_debugging  s     1$$r   c                 8    |                                  o| j        S )z$Check if we are waiting a pdb input.)r^   r}   rC   s    r   r   z$DebuggingWidget.is_waiting_pdb_input  s       "">t'>>r   c                    t          t          |                               |           |r|                                 r| j        \  }}	 | j        j                                        s| j        j                                         n.# t          $ r! | j        j                                         Y nw xY wd| _
        |                     || j        |           dS dS dS )z_
        Resets the widget to its initial state if ``clear`` parameter
        is True
        Fr   callbackpasswordN)r;   rv   resetr   r~   r   iopub_channelclosedflushr   _reading	_readline_pdb_readline_callback)r$   clearr   r  r@   s       r   r  zDebuggingWidget.reset  s
   
 	ot$$**5111 	.T..00 	.#/FH9 )7>>@@ =&4::<<<! 9 9 9"066888889 "DMNN&43N$,  . . . . .	. 	. 	. 	.s   <B (B32B3c                     d                     | j        dz             }t          | j        dz
            D ]}d                     |          }|dz   S )Nz	IPdb [{}]rJ   ({}): r   r1   ranger{   r$   r   is      r   _current_promptzDebuggingWidget._current_prompt  sY    ##D$BQ$FGGt(1,-- 	+ 	+A]]6**FF}r   c                     d                     | j                  }t          | j        dz
            D ]}d                     |          }|dz   S )zGet current out prompt.u   Out  [{}]rJ   r  r  r  r  s      r   r   z#DebuggingWidget._current_out_prompt  sT    &--d.LMMt(1,-- 	+ 	+A]]6**FF}r   c                 0   t          t          |                               |           |d         d                             dd          }	 |dk    rt	                      }n|dk    rt                      }ndS || j        _        dS # t          $ r Y dS w xY w)zHandle kernel info replies.r   language_infopygments_lexerrz   ipython3ipython2N)	r;   rv   _handle_kernel_info_replygetr   r    r   _lexerr   )r$   repr  lexerr@   s       r   r  z)DebuggingWidget._handle_kernel_info_reply  s    ot$$>>sCCCY8<<b" "
	++')):--'))',D$$$ 	 	 	DD	s   *B 9B 
BBc                 8     j         d fd	}|_         dS )zARedefine kernel client's complete method to work while debugging.Nc                                                      r:j        r3j        }j        _        	  | |          |_        S # |_        w xY w | |          S r'   )r   comm_channelshell_channel_shell_channel)code
cursor_posr"  clientoriginal_completer$   s      r   completez<DebuggingWidget._redefine_complete_for_dbg.<locals>.complete"  s{    ((** ;v/B ; & 4(.(;%:,,T:>>,9F))MF)9999((z:::s   A 	Ar'   )r(  )r$   r&  r(  r'  s   `` @r   _redefine_complete_for_dbgz*DebuggingWidget._redefine_complete_for_dbg  sD     #O		; 		; 		; 		; 		; 		; 		; 		; #r   Nc                     || j         d         k    rdS || j         d         }||f| _         |                     |                     |          d           dS )z5Update the prompt that is recognised as a pdb prompt.r   NrJ   T)html)r~   _set_continuation_prompt_make_continuation_prompt)r$   r   r  s      r   _update_pdb_promptz"DebuggingWidget._update_pdb_prompt/  sv    T%a(((F'*H"H- 	%%**622 	& 	? 	? 	? 	? 	?r   c                     |r|d         dk    r
|dd         }t                      }|                    |          \  }}||dz  }|dk    |fS )zA
        Check if the pdb input is ready to be executed.
        r   rL   rJ   NrK   
incomplete)r   check_complete)r$   sourcetmr(  indents        r   _is_pdb_completez DebuggingWidget._is_pdb_complete=  si      	 fQi3&&ABBZF!!,,V44&c\F<'//r   c                    |                                  r||rdS | j        }n"|                                 sd|z   }|s|| _        |r3|                     |          \  }}|s|                     |||           dS |r|                     ||           n| j        r|                                  dS t          t          |           	                    |||          S )z
        Executes source or the input buffer, possibly prompting for more
        input.

        Do not use to run pdb commands (such as `continue`).
        Use pdb_execute instead. This will add a '!' in front of the code.
        NrL   )
r   r   rT   r5  
do_executer   _reading_callbackr;   rv   execute)r$   r2  r   interactiver(  r4  r@   s         r   r9  zDebuggingWidget.executeI  s    $$&& 	~ /F!.FF::<< * 6\F /(.D% #'#8#8#@#@ & OOFHf===F -  0000) -**,,,F_d++33FK) ) 	)r   c                 0    |                      |           dS )z/Callback used when the user inputs text in pdb.N)r   )r$   r.   s     r   r
  z&DebuggingWidget._pdb_readline_callbackn  s    r   c                    |                                  }|                     ||           | j         o+t          | j                  dk    p| j        d         d          }|r	 | j        j                                        s| j        j                                         n.# t          $ r! | j        j                                         Y nw xY wd| _
        |                     || j        |           d| _        d| j        _        | j                            | j                   | j                                         | j                            d|                                            d| _        |                     dd          }|r/|r-|                                 r|                     |d	           d
S t          | j                  dk    r&| j                            d          } | j        |  d
S d
S )zGet input for a command.r   rJ   Tr  Fzstartup/pdb_run_linesrz   )r   )r   N)r  r.  r  r9   r   r   r  r  r  r   r}   r	  r
  r   r   highlighting_onexecutedr   r~   sig_pdb_prompt_readyr   r   r|   r   r   r   r   )r$   r   r  print_prompt
start_liner>   s         r   	pdb_inputzDebuggingWidget.pdb_inputr  s'    %%''111
 !M) A !6771< @$($9!$<Q$? ? 	  	L9 )7>>@@ =&4::<<<! 9 9 9"066888889 '+D#NN&43N$,  . . .#DO04D-Mt/000%**,,,&++D$2H2H2J2JKKK $]]#:B]GG
 	, 	4+D+D+F+F 	Z555F t$%%))(,,Q//DDd##F *)s   #<B   (C
Cc                     || j         d         k    rd}d|z  }t          t          |                               ||||           dS )z?
        Writes a new prompt at the end of the buffer.
        r   Tz!<span class="in-prompt">%s</span>N)r~   r;   rv   _show_prompt)r$   r   r+  newline	separatorr@   s        r   rD  zDebuggingWidget._show_prompt  s\    
 T%a(((D86AFot$$11&$2;	= 	= 	= 	= 	=r   c                 T   |                                  rl| j        | j        _        | j        | _        d| _        	 t          t          |                               |          }|| j        | _        S # | j        | _        w xY wt          t          |                               |          S )z'Handle Key_Up/Key_Down while debugging.F)	r   r   _controlcurrent_prompt_posr  r   r;   rv   _event_filter_console_keypress)r$   eventretr@   s      r   rJ  z.DebuggingWidget._event_filter_console_keypress  s    $$&& 	E/3/?DM, $D!DM2O " ""@"@"G"G  $ 1 11111 ==eDDEs   )A1 1A?c                     |                                  r&|                     |          \  }} |||           dS t          t          |                               ||          S )z1Call the callback with the result of is_complete.N)r   r5  r;   rv   _register_is_complete_callback)r$   r2  r  r(  r4  r@   s        r   rN  z.DebuggingWidget._register_is_complete_callback  sp     $$&& 	"#44V<<HfHXv&&&&&$//NN" " "r   c                 v    t          |t                    sdS t                                          ||          S )NT)r   r   r;   eventFilter)r$   objrK  r@   s      r   rP  zDebuggingWidget.eventFilter  s6     %(( 	4ww""3...r   )F)FTTr'   )NFF)NFTT))r   r   r   rp   CONF_SECTIONr<   r   r   r   r   r   r   r   r   r   r   r   r   rT   r   r   r   r   r   r^   r   r  r  r   r  r)  r.  r5  r9  r
  rB  rD  rJ  rN  rP  rs   rt   s   @r   rv   rv      s         %L: : : : :6  &+ + +2  7 7 7 7G G G G G @D $N; N; N; N;`	
 	
 	
) ) )E E E
  
     
& & &
9 9 92 2 2A A A0- - -
: : :" " "% % %? ? ?. . . . . .0        "# # #$? ? ? ?
0 
0 
0#) #) #) #) #) #)J  4 4 4 4n =A#	= 	= 	= 	= 	= 	=E E E E E"	" 	" 	" 	" 	"
/ 
/ 
/ 
/ 
/ 
/ 
/ 
/ 
/r   rv   )"rp   r   rR   r   IPython.core.historyr   IPython.core.inputtransformer2r   IPython.lib.lexersr   r   pygments.lexerr   pygments.tokenr   r	   r
   pygments.utilr   qtconsole.rich_jupyter_widgetr   qtpy.QtCorer   
qtpy.QtGuir   spyder.api.config.mixinsr   spyder.config.baser   r   r    r"   r)   rv   r   r   r   <module>r^     s     



 				 0 / / / / / = = = = = = : : : : : : : : # # # # # # 2 2 2 2 2 2 2 2 2 2 ' ' ' ' ' ' ; ; ; ; ; ;       " " " " " " A @ @ @ @ @ , , , , , ,C C C C Cm C C CC C C C Cl C C C	3 	3 	3 	3 	3 	3 	3 	3z1 z1 z1 z1 z1. z1 z1 z1zd/ d/ d/ d/ d/,.I d/ d/ d/ d/ d/r   