§
    ©	Êj&  ã                  ó"  — d Z ddlmZ ddlZddlmZ ddlmZmZ ddl	m
Z
 dZ ej        d¬	¦  «         G d
„ d¦  «        ¦   «         Z ej        d¬	¦  «         G d„ d¦  «        ¦   «         Z ej        d¬	¦  «         G d„ d¦  «        ¦   «         ZdS )z!Support for alias configurations.é    )ÚannotationsN)ÚCallable)ÚAnyÚLiteral)ÚPydanticUndefined)ÚAliasGeneratorÚ	AliasPathÚAliasChoicesT)Úslotsc                  ó6   — e Zd ZU dZded<   dd
„Zdd„Zdd„ZdS )r	   a  !!! abstract "Usage Documentation"
        [`AliasPath` and `AliasChoices`](../concepts/alias.md#aliaspath-and-aliaschoices)

    A data class used by `validation_alias` as a convenience to create aliases.

    Attributes:
        path: A list of string or integer aliases.
    zlist[int | str]ÚpathÚ	first_argÚstrÚargsú	str | intÚreturnÚNonec                ó6   — |gt          |¦  «        z   | _        d S ©N)Úlistr   )Úselfr   r   s      ú@C:\Projects\Muse2API\.venv\Lib\site-packages\pydantic/aliases.pyÚ__init__zAliasPath.__init__   s   € Ø�K¥$ t¡*¤*Ñ,ˆŒ	ˆ	ˆ	ó    úlist[str | int]c                ó   — | j         S )zvConverts arguments to a list of string or integer aliases.

        Returns:
            The list of aliases.
        )r   )r   s    r   Úconvert_to_aliaseszAliasPath.convert_to_aliases   s   € ð ŒyÐr   ÚdÚdictr   c                ó¸   — |}| j         D ]O}t          |t          ¦  «        r	t          c S 	 ||         }Œ*# t          t
          t          f$ r t          cY c S w xY w|S )z³Searches a dictionary for the path specified by the alias.

        Returns:
            The value at the specified path, or `PydanticUndefined` if the path is not found.
        )r   Ú
isinstancer   r   ÚKeyErrorÚ
IndexErrorÚ	TypeError)r   r   ÚvÚks       r   Úsearch_dict_for_pathzAliasPath.search_dict_for_path&   s�   € ð ˆØ”ð 	)ð 	)ˆAÝ˜!�SÑ!Ô!ð )å(Ð(Ð(Ð(ð)Ø�a”D��øÝ�j­)Ð4ð )ð )ð )Ý(Ð(Ð(Ð(Ð(Ð(ð)øøøàˆs   «4´AÁAN)r   r   r   r   r   r   )r   r   )r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   r   r'   © r   r   r	   r	      sj   € € € € € € ðð ð ÐÐÑð-ð -ð -ð -ðð ð ð ðð ð ð ð ð r   r	   c                  ó.   — e Zd ZU dZded<   dd„Zdd
„ZdS )r
   a  !!! abstract "Usage Documentation"
        [`AliasPath` and `AliasChoices`](../concepts/alias.md#aliaspath-and-aliaschoices)

    A data class used by `validation_alias` as a convenience to create aliases.

    Attributes:
        choices: A list containing a string or `AliasPath`.
    zlist[str | AliasPath]ÚchoicesÚfirst_choiceústr | AliasPathr   r   c                ó6   — |gt          |¦  «        z   | _        d S r   )r   r/   )r   r0   r/   s      r   r   zAliasChoices.__init__E   s   € Ø$�~­¨W©¬Ñ5ˆŒˆˆr   úlist[list[str | int]]c                óÄ   — g }| j         D ]U}t          |t          ¦  «        r(|                     |                     ¦   «         ¦  «         Œ?|                     |g¦  «         ŒV|S )z‡Converts arguments to a list of lists containing string or integer aliases.

        Returns:
            The list of aliases.
        )r/   r!   r	   Úappendr   )r   ÚaliasesÚcs      r   r   zAliasChoices.convert_to_aliasesH   si   € ð *,ˆØ”ð 	$ð 	$ˆAÝ˜!�YÑ'Ô'ð $Ø—’˜q×3Ò3Ñ5Ô5Ñ6Ô6Ð6Ð6à—’ ˜sÑ#Ô#Ð#Ð#Øˆr   N)r0   r1   r/   r1   r   r   )r   r3   )r(   r)   r*   r+   r,   r   r   r-   r   r   r
   r
   8   sV   € € € € € € ðð ð #Ð"Ð"Ñ"ð6ð 6ð 6ð 6ðð ð ð ð ð r   r
   c                  óN   — e Zd ZU dZdZded<   dZded<   dZded<   dd„Zdd„Z	dS )r   aÿ  !!! abstract "Usage Documentation"
        [Using an `AliasGenerator`](../concepts/alias.md#using-an-aliasgenerator)

    A data class used by `alias_generator` as a convenience to create various aliases.

    Attributes:
        alias: A callable that takes a field name and returns an alias for it.
        validation_alias: A callable that takes a field name and returns a validation alias for it.
        serialization_alias: A callable that takes a field name and returns a serialization alias for it.
    NzCallable[[str], str] | NoneÚaliasz6Callable[[str], str | AliasPath | AliasChoices] | NoneÚvalidation_aliasÚserialization_aliasÚ
alias_kindú;Literal['alias', 'validation_alias', 'serialization_alias']Úallowed_typesú<tuple[type[str] | type[AliasPath] | type[AliasChoices], ...]Ú
field_namer   r   ú%str | AliasPath | AliasChoices | Nonec           	     óš   — d}t          | |¦  «        }|�6 ||¦  «        }|�)t          ||¦  «        st          d|› d|› d|› d�¦  «        ‚|S )z·Generate an alias of the specified kind. Returns None if the alias generator is None.

        Raises:
            TypeError: If the alias generator produces an invalid type.
        Nz	Invalid `z	` type. `z!` generator must produce one of `ú`)Úgetattrr!   r$   )r   r<   r>   r@   r9   Úalias_generators         r   Ú_generate_aliaszAliasGenerator._generate_aliash   sz   € ð ˆÝ! $¨
Ñ3Ô3ˆàÐ&Ø#�O JÑ/Ô/ˆEØÐ ­°E¸=Ñ)IÔ)IÐ ÝØr 
ÐrÐr°ZÐrÐrÐboÐrÐrÐrñô ð ð ˆr   úDtuple[str | None, str | AliasPath | AliasChoices | None, str | None]c                óÒ   — |                       dt          f|¦  «        }|                       dt          t          t          f|¦  «        }|                       dt          f|¦  «        }|||fS )z´Generate `alias`, `validation_alias`, and `serialization_alias` for a field.

        Returns:
            A tuple of three aliases - alias, validation, and serialization.
        r9   r:   r;   )rF   r   r
   r	   )r   r@   r9   r:   r;   s        r   Úgenerate_aliaseszAliasGenerator.generate_aliases~   sj   € ð ×$Ò$ W­s¨f°jÑAÔAˆØ×/Ò/Ð0BÅSÍ,ÕXaÐDbÐdnÑoÔoÐØ"×2Ò2Ð3HÍ3È&ÐR\Ñ]Ô]ÐàÐ&Ð(;Ð;Ð;r   )r<   r=   r>   r?   r@   r   r   rA   )r@   r   r   rG   )
r(   r)   r*   r+   r9   r,   r:   r;   rF   rI   r-   r   r   r   r   W   s   € € € € € € ð	ð 	ð *.€EÐ-Ð-Ð-Ñ-ØOSÐÐSÐSÐSÑSØ7;ÐÐ;Ð;Ð;Ñ;ðð ð ð ð,
<ð 
<ð 
<ð 
<ð 
<ð 
<r   r   )r+   Ú
__future__r   ÚdataclassesÚcollections.abcr   Útypingr   r   Úpydantic_corer   Ú__all__Ú	dataclassr	   r
   r   r-   r   r   ú<module>rQ      sD  ðØ 'Ð 'à "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $Ø Ð Ð Ð Ð Ð Ð Ð à +Ð +Ð +Ð +Ð +Ð +à
9€ð €Ô˜TÐ"Ñ"Ô"ð&ð &ð &ð &ð &ñ &ô &ñ #Ô"ð&ðR €Ô˜TÐ"Ñ"Ô"ðð ð ð ð ñ ô ñ #Ô"ðð< €Ô˜TÐ"Ñ"Ô"ð0<ð 0<ð 0<ð 0<ð 0<ñ 0<ô 0<ñ #Ô"ð0<ð 0<ð 0<r   