ó
    |chö  ã                   ó6   • S r SSKrSSKJr  S rSS jrSS jrg)	z&
Helpers for dealing with HTML input.
é    N)ÚMultiValueDictc                 ó   • [        U S5      $ )NÚgetlist)Úhasattr)Ú
dictionarys    Úb/var/www/djangovue.mamus.xyz/django/venv/lib/python3.13/site-packages/rest_framework/utils/html.pyÚis_html_inputr	   	   s   € ô �:˜yÓ)Ð)ó    c                 óê  • 0 n[         R                  " S[         R                  " U5      -  5      nU R                  5        H…  u  pVUR	                  U5      nU(       d  M  UR                  5       u  p‰[        U5      nU	(       d  XcU'   MI  [        UR                  U5      [        5      (       a	  XcU   U	'   Mv  [        X–/05      X8'   M‡     U(       a  [        U5       V
s/ s H  o£U
   PM	     sn
$ U$ s  sn
f )aô  
Used to support list values in HTML forms.
Supports lists of primitives and/or dictionaries.

* List of primitives.

{
    '[0]': 'abc',
    '[1]': 'def',
    '[2]': 'hij'
}
    -->
[
    'abc',
    'def',
    'hij'
]

* List of dictionaries.

{
    '[0]foo': 'abc',
    '[0]bar': 'def',
    '[1]foo': 'hij',
    '[1]bar': 'klm',
}
    -->
[
    {'foo': 'abc', 'bar': 'def'},
    {'foo': 'hij', 'bar': 'klm'}
]

:returns a list of objects, or the value specified in ``default`` if the list is empty
z^%s\[([0-9]+)\](.*)$)ÚreÚcompileÚescapeÚitemsÚmatchÚgroupsÚintÚ
isinstanceÚgetÚdictr   Úsorted)r   ÚprefixÚdefaultÚretÚregexÚfieldÚvaluer   ÚindexÚkeyÚitems              r   Úparse_html_listr       sÇ   € ðF €CÜ�JŠJÐ.´·²¸6Ó1BÑBÓC€EØ"×(Ñ(Ö*‰ˆØ—‘˜EÓ"ˆÞÙØ—\‘\“^‰
ˆÜ�E“
ˆÞØ�‹JÜ˜Ÿ™ ›¬×-Ñ-Ø#�‰J�s‹Oä'¨¨g¨Ó7ˆC‹Jñ +ö 36¤&¨¤+Ó.¢+˜$�ŒI¡+Ñ.ÐB¸7ÐBùÒ.s   ÃC0c                 ó$  • [        5       n[        R                  " S[        R                  " U5      -  5      nU  HR  nUR	                  U5      nU(       d  M  UR                  5       S   nU R                  U5      nUR                  Xg5        MT     U$ )zï
Used to support dictionary values in HTML forms.

{
    'profile.username': 'example',
    'profile.email': 'example@example.com',
}
    -->
{
    'profile': {
        'username': 'example',
        'email': 'example@example.com'
    }
}
z
^%s\.(.+)$r   )r   r   r   r   r   r   r   Úsetlist)r   r   r   r   r   r   r   r   s           r   Úparse_html_dictr#   E   sy   € ô  Ó
€CÜ�JŠJ�}¤r§y¢y°Ó'8Ñ8Ó9€EÛˆØ—‘˜EÓ"ˆÞÙØ�l‰l‹n˜QÑˆØ×"Ñ" 5Ó)ˆØ�‰�CÖñ ð €Jr
   )Ú N)r$   )Ú__doc__r   Údjango.utils.datastructuresr   r	   r    r#   © r
   r   Ú<module>r(      s#   ðñó 
å 6ò*ô3Cõlr
   