+
    ~j                        a  R t0 t R t^ RIt^ RIt]P                  ! R]P
                  4      tRRRRRRR	R
RR/t] ^ k R^R^<RRRRRR RR!RR"/t] ^k R R lt	R R lt
R R ltR R ltR R ltR# )#z&Parsing helpers shared across modules.Nz(\d+)([a-z]+)ki  mi@B gi ʚ;tl    J)pl     I5 shdwmoyc                0    V ^8  d   QhR\         R\        /#    valuereturnstrint)formats   "s/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/huggingface_hub/utils/_parsing.py__annotate__r   )   s     / /c /c /    c                "    \        V \        4      # )zaParse a size expressed as a string with digits and unit (like `"10MB"`) to an integer (in bytes).)_parse_with_unit
BYTE_UNITSr   s   &r   
parse_sizer   )       E:..r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r   .   s     / /# /# /r   c                "    \        V \        4      # )zfParse a duration expressed as a string with digits and unit (like `"10s"`) to an integer (in seconds).)r   
TIME_UNITSr   s   &r   parse_durationr"   .   r   r   c                ^    V ^8  d   QhR\         R\        \         \        3,          R\        /# )r   r   unitsr   )r   dictr   )r   s   "r   r   r   3   s)        C  S#X  3  r   c           	        V P                  4       pV'       g   \        R4      h \        V 4      #   \         d     Mi ; i\        P	                  T4      pT'       g   \        RT  R24      h\        TP                  ^4      4      pTP                  ^4      P                  4       pYQ9  d*   \        RT R\        TP                  4       4       R24      hYAT,          ,          # )z)Parse a numeric value with optional unit.zValue cannot be empty.zInvalid value 'z7'. Must match pattern '\d+[a-z]+' or be a plain number.zUnknown unit 'z'. Must be one of .)	strip
ValueErrorr   RE_NUMBER_WITH_UNIT	fullmatchgrouplowerlistkeys)r   r$   strippedmatchnumberunits   &&    r   r   r   3   s    {{}H1225z   ))(3E?5'1ijkkQ F;;q>!D>$/A$uzz|BTAUUVWXX$Ks   
0 >>c                >    V ^8  d   QhR\         R,          R\        /# )r   secsNr   )r   r   )r   s   "r   r   r   J   s     5 5#* 5 5r   c                    V f   R# \        V 4      p V ^<8  d   V  R2# V R8  d   V ^<,           RV ^<,           R2# V R,           RV R,          ^<,           R2# )zFormat a duration in seconds as a short human-readable string (e.g. `"1m 32s"`, `"2h 15m"`, `"45s"`).

Returns `"--"` when `secs` is `None` so it can be used directly as a CLI table cell.
z--r     zm zh r   )r   )r5   s   &r   format_durationr8   J   sk    
 |t9Dbyqzd{"*Rr	{!,,dl^2td{r12!44r   c                0    V ^8  d   QhR\         R\        /# )r   tsr   )floatr   )r   s   "r   r   r   Y   s     < < <3 <r   c                    Rp\         P                   ! 4       V ,
          pV^8  d   R# V F%  w  r4p\        W$,          4      pVf   K  We8:  g   K%   M	  X RX V^8  d   R R2# R R2# )zFormat timestamp in seconds into a human-readable string, relative to now.

Vaguely inspired by Django's `timesince` formatter.
za few seconds ago r    z ago))second   <   )minuterA   rA   )hourr7      )dayQ    )week:	 rG   )month '    )year3N)timeround)r:   _TIMESINCE_CHUNKSdeltalabeldivider	max_valuer   s   &      r   format_timesincerV   Y   s|    
	 IIK"Erz"%6!	eo& U%7 &7 WAeWEAIS6d;;26d;;r   c                    V ^8  d   Qh/ ^ \         9   d   \        \        \        3,          ;R&   ^\         9   d   \        \        \        3,          ;R&   # )r   r   r!   )__conditional_annotations__r%   r   r   )r   s   "r   r   r      sD     , , DcN  -  DcN ! -r   r7   rF   rI   rK   rN   )rX   __doc__rerO   compile
IGNORECASEr*   r   r!   r   r"   r   r8   rV   r   )rX   s   @r   <module>r]      s    - 	  jj!12==A  		
  	
	
 /
/
 .5<r   