+
    &j6                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	t
^RIHtHtHt ^RIHt ]
P"                  ! 4        ]P$                  ! R4      t ! R R4      t ! R	 R
]4      t ! R R]4      tR# )    N)Sequence)ClassVar)OpenFileget_filesystem_classsplit_protocol)known_implementationsz
fsspec.guic                      a  ] tR t^t o Rt. t. tR tR tR]	P                  R3R ltR tR tR	 t]P                   R
 4       tRR ltRR ltV 3R ltRtV tR# )SigSlotar  Signal-slot mixin, for Panel event passing

Include this class in a widget manager's superclasses to be able to
register events and callbacks on Panel widgets managed by that class.

The method ``_register`` should be called as widgets are added, and external
code should call ``connect`` to associate callbacks.

By default, all signals emit a DEBUG logging statement.
c                P    R V n         / V n        / V n        V P                  4        R# )FN)_ignoring_events_sigs_map_setupselfs   &b/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/fsspec/gui.py__init__SigSlot.__init__&   s!     %
	    c                L    \         P                  P                  4       V n        R# )z(Create GUI elements and register signalsN)pnpanePaneBasepanelr   s   &r   r   SigSlot._setup,   s    WW%%'
r   valueFc           	        W P                   9  d   \        RV 24      hRVR. RVRV/V P                  V&   RP                  Ve   \	        VR\        V4      4      MR	V.4      pW P                  V&   Ve)   VP                  P                  V P                  VR
R7       V'       d1   \        W4      '       d   V P                  V\	        W4      4       R# R# R# )ab  Watch the given attribute of a widget and assign it a named event

This is normally called at the time a widget is instantiated, in the
class which owns it.

Parameters
----------
widget : pn.layout.Panel or None
    Widget to watch. If None, an anonymous signal not associated with
    any widget.
name : str
    Name of this event
thing : str
    Attribute of the given widget to watch
log_level : int
    When the signal is triggered, a logging event of the given level
    will be fired in the dfviz logger.
auto : bool
    If True, automatically connects with a method in this class of the
    same name.
z(Attempt to assign an undeclared signal: widget	callbacksthinglog-NnamenoneT)onlychanged)signals
ValueErrorr   joingetattrstrr   paramwatch_signalhasattrconnect)r   r   r#   r    	log_levelautowns   &&&&&& r   	_registerSigSlot._register1   s    0 ||#GvNOOfU9	


4 XX8>8JF4PV
 		"LLt||UEGD''LLwt23 (4r   c                     V P                   P                  ! V/ VB #   \        \        3 d   p\	        R4      ThRp?ii ; i)z!Display in a notebook or a serverz)Panel does not seem to be set up properlyN)r   _repr_mimebundle_r'   AttributeErrorNotImplementedError)r   argskwargsexcs   &*, r   r6   SigSlot._repr_mimebundle_]   sI    	:://@@@N+ 	%;	s    A ;A c                X    V P                   V,          R,          P                  V4       R# )an  Associate call back with given event

The callback must be a function which takes the "new" value of the
watched attribute as the only parameter. If the callback return False,
this cancels any further processing of the given event.

Alternatively, the callback can be a string, in which case it means
emitting the correspondingly-named event (i.e., connect to self)
r   N)r   append)r   signalslots   &&&r   r/   SigSlot.connectf   s      	

6;'..t4r   c                V   V P                   '       g   RP                  VP                  P                  VP                  .4      pW P                  9   dT   V P                  V,          V P
                  9   d0   V P                  V P                  V,          VP                  4       R# R# R# R# )zThis is called by a an action on a widget

Within an self.ignore_events context, nothing happens.

Tests can execute this method by directly changing the values of
widget components.
r"   N)r   r(   objr#   r   r   _emitnew)r   eventr2   s   && r   r-   SigSlot._signalr   sq     $$$599>>5::67BYY499R=DJJ#>

499R=%))4 $? %r   c              #  L   "   RV n          Rx  RV n         R#   RT n         i ; i5i)zZTemporarily turn off events processing in this instance

(does not propagate to children)
TNF)r   r   s   &r   ignore_eventsSigSlot.ignore_events   s'      !%	*$)D!ED!s   $ 	$	!$Nc                   \         P                  V P                  V,          R,          V RV 24       V P                  V,          R,           F>  p\        V\        4      '       d   V P                  V4       K,   V! V4      pVRJ d    R# K@  	  R#   \         d#   p\         P                  RTT4        Rp?Kl  Rp?ii ; i)zAn event happened, call its callbacks

This method can be used in tests to simulate message passing without
directly changing visual elements.

Calling of callbacks will halt whenever one returns False.
r!   z: r   Fz6Exception (%s) while executing callback for signal: %sN)loggerr!   r   
isinstancer*   rD   	Exception	exception)r   sigr   callbackretes   &&&   r   rD   SigSlot._emit   s     	

4::c?5)cU"UG+<=

344H(C((

8$
"5/Ce| $ 5 ! $$P s   ;BB?B::B?c                @    V P                   P                  VRR7       V # )z<Open a new browser tab and display this instance's interfaceF)threadsverbose)r   show)r   rV   s   &&r   rX   SigSlot.show   s    

7r   c                r   < V ^8  d   Qh/ S[ S[S[,          ,          ;R&   S[ S[S[,          ,          ;R&   # )   r&   slots)r   r   r*   )format__classdict__s   "r   __annotate__SigSlot.__annotate__   s1      hsm$)   HSM"'! r   )r   r   r   r   N)F)__name__
__module____qualname____firstlineno____doc__r&   r\   r   r   loggingDEBUGr3   r6   r/   r-   
contextlibcontextmanagerrI   rD   rX   __annotate_func____static_attributes____classdictcell__)r^   s   @r   r
   r
      sn     	 (*G%'E( #*W]]*4X
55 	* 	*2e  r   r
   c                      a a ] tR t^t oRtRR.t. ROtV 3R ltR tV 3R lt	R t
R tR	 t]R
 4       tR tRtVtV ;t# )SingleSelectzCA multiselect which only allows you to select one item for an event	_selectedselectedc                0   < Wn         \        SV `	  4        R # ra   )r:   superr   )r   r:   	__class__s   &,r   r   SingleSelect.__init__   s    r   c                    \         P                  P                  ! R/ V P                  B V n        V P                  V P                  R R4       V P                  RR4       V P                  R V P                  4       R# )rp   r   Nrq    )r   widgetsMultiSelectr:   r   r3   r/   
select_oner   s   &r   r   SingleSelect._setup   sS    ZZ++:dkk:
tzz;8tZ([$//2r   c                (   < \         SV `  ! V/ VB  R # ra   )rs   r-   )r   r9   r:   rt   s   &*,r   r-   SingleSelect._signal   s    ((r   c                R   V P                  4       ;_uu_ 4        V P                  P                  '       d   V P                  P                  R,          .M. pW P                  n        RRR4       V P                  RV P                  P                  4       R#   + '       g   i     L8; i)   Nrq   )rI   r   r   rD   )r   _vals   &* r   rz   SingleSelect.select_one   sk    !!,0JJ,<,<,<4::##B'("C"JJ " 	

:tzz//0 "!s   ABB&	c                &    WP                   n        R # ra   r   options)r   r   s   &&r   set_optionsSingleSelect.set_options   s    $

r   c                (    . V P                   n        R # ra   r   r   s   &r   clearSingleSelect.clear   s    

r   c                .    V P                   P                  # ra   r   r   r   s   &r   r   SingleSelect.value   s    zzr   c                *    V.V P                   n        R # ra   r   )r   	selections   &&r   set_selectionSingleSelect.set_selection   s    %;

r   )r:   r   )r   r   addr   select)rb   rc   rd   re   rf   r&   r\   r   r   r-   rz   r   r   propertyr   r   rl   rm   __classcell__rt   r^   s   @@r   ro   ro      sS     MJ'GFE3)1%     ' 'r   ro   c                      a a ] tR t^t oRt. ROtRR.tRV 3R lltR tRR lt	]
R 4       t]
R 4       t]
R	 4       tRR
 ltR tR tR tR tR tR tRtVtV ;t# )FileSelectorzPanel-based graphical file selector widget

Instances of this widget are interactive and can be displayed in jupyter by having
them as the output of a cell,  or in a separate browser tab using ``.show()``.
set_filtersgo_homec                  < V'       d   \        V4      w  V n        pMR\        P                  ! 4       uV n        pWn        \        V\        4      '       d   TM
\        V4      ;'       g    RV n        W n        T;'       g    .  Uu. uF  p\        P                  ! V4      NK  	  upV n        RV n        \        SV `9  4        R# u upi )a  

Parameters
----------
url : str (optional)
    Initial value of the URL to populate the dialog; should include protocol
filters : list(str) (optional)
    File endings to include in the listings. If not included, all files are
    allowed. Does not affect directories.
    If given, the endings will appear as checkboxes in the interface
ignore : list(str) (optional)
    Regex(s) of file basename patterns to ignore, e.g., "\." for typical
    hidden files on posix
kwargs : dict (optional)
    To pass to file system instance
filez{}N)r   init_protocolosgetcwdinit_urlrM   r*   init_kwargsfiltersrecompileignore_fsrs   r   )r   urlr   r   r:   irt   s   &&&&& r   r   FileSelector.__init__   s    " &4S&9#D&,biik#D&0&=&=F3v;WWSW.4lll;lrzz!}l; <s   Cc           
     j   \         P                  P                  R V P                  RRRR7      V n        \         P                  P                  \        \        4      V P                  RRR7      V n	        \         P                  P                  RV P                  RR	7      V n        \         P                  P                  R
R^-R7      V n        \        ^
R7      V n        \         P                  P                  R^(^RR7      V n        \         P                  P                  R^^RR7      V n        V P%                  V P                  RRR7       V P%                  V P                  RRRR7       V P%                  V P"                  RRRR7       V P%                  V P                   RRRR7       V P%                  RR4       V P                  P'                  RV P(                  4       V P%                  RR4       V P                  P*                  V n        V P.                  V n        \         P                  P3                  . . RRRR7      V n        V P%                  V P4                  RRR7       \         P6                  ! \         P8                  ! V P                  V P                  4      \         P8                  ! V P                   V P"                  V P                  V P                  V P4                  4      V P                  P:                  4      V n        V P=                  V P>                  4       V PA                  4        R# )r   endstretch_widthmax)r#   r   alignsizing_modewidth_policyprotocolcenter)r   r   r#   r   r:   )r#   r   r   u   ⇨)r#   r   width)sizeu   🏠)r#   r   heightr   u   ‹protocol_changedT)r1   
go_clickedclicks
up_clickedhome_clickedNselection_changedrq   directory_enteredFmin)r   r   inliner   r   filters_changed)!r   rx   	TextInputr   r   Selectsortedr   r   r   r   r:   Buttongoro   mainhomeupr3   r/   r   r   prev_protocolstorage_optionsprev_kwargsCheckBoxGroup
filter_selColumnRowr   r   r   r   r   s   &r   r   FileSelector._setup   se   ::''--' ( 
 

))01$$	 * 
 jj**!1!1 + 
 **##e2#F b)	JJ%%6Be%T	**##b5#Qt}}&8tDtwwhTBtwwhTBtyy.(Ft01		*d&<&<=t01!]]00//**22be% 3 
 	t(9EYYFF4==$++.FF499dggtxx$//JIIOO


 	&r   c                    Wn         V'       d#   WP                  n        WP                  n        R # . V P                  n        . V P                  n        R # ra   )r   r   r   r   )r   r   s   &&r   r   FileSelector.set_filters,  s6    &-OO#$+OO!&(DOO#$&DOO!r   c                j    \         P                  ! V P                  P                  4      ;'       g    / # )z'Value of the kwargs box as a dictionary)astliteral_evalr:   r   r   s   &r   r   FileSelector.storage_options5  s'      1 1288b8r   c                    V P                   f7   \        V P                  P                  4      pV! R/ V P                  B V n         V P                   # )zCurrent filesystem instancerw   )r   r   r   r   r   )r   clss   & r   fsFileSelector.fs:  s@     88&t}}':':;C2T112DHxxr   c                    V P                   P                  '       d7   V P                  P                   RV P                   P                  ^ ,           2# R# )zURL of currently selected itemz://N)r   r   r   r   s   &r   urlpathFileSelector.urlpathB  sI    
 yy ##$C		(:';<	
 	
r   c                x    V P                   f   \        R4      h\        V P                  V P                   WV4      # )a/  Create OpenFile instance for the currently selected item

For example, in a notebook you might do something like

.. code-block::

    [ ]: sel = FileSelector(); sel

    # user selects their file

    [ ]: with sel.open_file('rb') as f:
    ...      out = f.read()

Parameters
----------
mode: str (optional)
    Open mode for the file.
compression: str (optional)
    The interact with the file as compressed. Set to 'infer' to guess
    compression from the file ending
encoding: str (optional)
    If using text mode, use this encoding; defaults to UTF8.
zNo file selected)r   r'   r   r   )r   modecompressionencodings   &&&&r   	open_fileFileSelector.open_fileK  s3    0 <</00t(KKr   c                2    Wn         V P                  4        R # ra   )r   r   )r   valuess   &&r   r   FileSelector.filters_changedg  s    r   c                   V P                   f   R # V P                  P                  V P                   4      '       d5   V P                  P                  V P                   4      V P                  n        V P                  4        R # ra   )r   r   isdir_strip_protocolr   r   r   r   r   s   &*r   r   FileSelector.selection_changedk  sN    <<77==&&!WW44T\\BDHHNr   c                  aa V P                   V P                  P                  8w  g   V P                  V P                  8w  d4   R V n        V P                  P                  V n         V P                  V n        \        V P                  P                  V P                  P                  RR7      R R7      pV Uau. uF[  o\        ;QJ d)    V3R lV P                   4       F  '       g   K   RM	  RM! V3R lV P                   4       4      '       d   KY  SNK]  	  ppV Uu/ uFB  pVR,          R8X  g   K  R	VR
,          P                  R^4      R,          ,           VR
,          bKD  	  ppV Uu/ uFB  pVR,          R8X  g   K  RVR
,          P                  R^4      R,          ,           VR
,          bKD  	  ppV P                  '       d}   VP                  4        UUau/ uF_  w  po\        ;QJ d)    V3R lV P                   4       F  '       g   K   RM	  RM! V3R lV P                   4       4      '       g   K\  VSbKa  	  pppV P                  P!                  \#        R/ VBVB 4       R # u upi u upi u upi u uppi )NT)detailc                     V R ,          # )r#   rw   )xs   &r   <lambda>)FileSelector.go_clicked.<locals>.<lambda>{  s    1V9r   )keyc              3      <"   T F3  qP                  SR ,          P                  R^4      R,          4      x  K5  	  R# 5i)r#   /Nr   )matchrsplit).0r   ls   & r   	<genexpr>*FileSelector.go_clicked.<locals>.<genexpr>  s1     Rkwwqy//Q7;<<ks   ;>Ftype	directoryu   📁 r#   r   r   u   📄 c              3   F   <"   T F  pSP                  V4      x  K  	  R # 5ira   )endswith)r   extvs   & r   r   r     s     ?,3qzz#,s   !r   rw   )r   r   r   r   r   r   r   r   lsr   anyr   r   r   itemsr   r   dict)	r   r   listingr   ofoldersfileskr   s	   &* `    `r   r   FileSelector.go_clickedr  s	   $--"5"554#7#77DH!%!4!4D#33DGGJJtxx~~dJ39L

 
3RdkkR333RdkkRR A 	 
 
yK' >Gai&&sA.r22AfI= 	 
 
yF" >Gai&&sA.r22AfI= 	 

 <<< "KKM)DAq3?$,,?333?$,,?? 1)  
 			d6W667+




sH   8I-I-)%I-I-I243I2-I73I7I<0I<%I<;I<c                X    R V n         . V P                  n        RV P                  n        R # )N )r   r   r   r   r   r   s   &*r   r   FileSelector.protocol_changed  s     		r   c                    V P                   V P                  n        V P                  V P                  n        V P
                  V P                  n        V P                  4        R # ra   )r   r   r   r   r:   r   r   r   r   s   &*r   r   FileSelector.home_clicked  s?    "00 ,,r   c                    V P                   P                  V P                  P                  4      V P                  n        V P	                  4        R # ra   )r   _parentr   r   r   r   s   &*r   r   FileSelector.up_clicked  s,    8r   )r   r   r   r   r   r   r   r   r   r:   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   )NNNNra   )rbNN)rb   rc   rd   re   rf   r&   r\   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rl   rm   r   r   s   @@r   r   r      s     G I&E8+Z' 9 9   
 
L8 8D
 r   r   )r   ri   rg   r   r   collections.abcr   typingr   r   r   corer   r   r   registryr   	extension	getLoggerrL   r
   ro   r   rw   r   r   <module>r     sg    
   	 	 $   @ @ + 			<	(U Up$'7 $'NP7 Pr   