§
    YŠtjk  ã                   ój   — d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlmZ ddlm	Z	 d„ Z
dd	„Zd
„ ZdS )zDynamic Protobuf class creator.é    )ÚOrderedDictN)Údescriptor_pb2)Ú
descriptor)Údescriptor_pool)Úmessage_factoryc                 óX   — |                       |¦  «        }t          j        |¦  «        }|S )a-  Get a proto class from the MessageFactory by name.

  Args:
    pool: a descriptor pool.
    full_name: str, the fully qualified name of the proto type.
  Returns:
    A class, for the type identified by full_name.
  Raises:
    KeyError, if the proto is not found in the factory's descriptor pool.
  )ÚFindMessageTypeByNamer   ÚGetMessageClass)ÚpoolÚ	full_nameÚproto_descriptorÚ	proto_clss       ú[/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/google/protobuf/proto_builder.pyÚ_GetMessageFromFactoryr      s/   € ð ×/Ò/°	Ñ:Ô:ÐÝÔ-Ð.>Ñ?Ô?€)Ø	Ðó    c                 óä  — |pt          j        ¦   «         }|�#	 t          ||¦  «        }|S # t          $ r Y nw xY w|                      ¦   «         }t          | t          ¦  «        st          |¦  «        }t          j	        ¦   «         }|D ]b\  }}| 
                    |                     d¦  «        ¦  «         | 
                    t          |¦  «                             d¦  «        ¦  «         Œc|                     ¦   «         dz   }	|€:d|                     ¦   «         z   }	 t          ||¦  «        }|S # t          $ r Y nw xY w|                     t          |	||¦  «        ¦  «         t          ||¦  «        S )aê  Create a Protobuf class whose fields are basic types.

  Note: this doesn't validate field names!

  Args:
    fields: dict of {name: field_type} mappings for each field in the proto. If
        this is an OrderedDict the order will be maintained, otherwise the
        fields will be sorted by name.
    full_name: optional str, the fully-qualified name of the proto type.
    pool: optional DescriptorPool instance.
  Returns:
    a class, the new protobuf class with a FileDescriptor.
  Nzutf-8z.protoz6net.proto2.python.public.proto_builder.AnonymousProto_)r   ÚDescriptorPoolr   ÚKeyErrorÚitemsÚ
isinstancer   ÚsortedÚhashlibÚsha1ÚupdateÚencodeÚstrÚ	hexdigestÚAddÚ_MakeFileDescriptorProto)
Úfieldsr   r   Úpool_instancer   Úfield_itemsÚfields_hashÚf_nameÚf_typeÚproto_file_names
             r   ÚMakeSimpleProtoClassr'   $   s�  € ð Ð:�/Ô8Ñ:Ô:€-ØÐðÝ(¨¸	ÑBÔB€iØÐøÝð ð ð à
€dðøøøð —’‘”€+Ý	�F�KÑ	(Ô	(ð &Ý˜Ñ%Ô%€Kõ ”‘”€+Ø#ð 4ð 4�n€fˆfØ×Ò�v—}’} WÑ-Ô-Ñ.Ô.Ð.Ø×Ò•s˜6‘{”{×)Ò)¨'Ñ2Ô2Ñ3Ô3Ð3Ð3Ø×)Ò)Ñ+Ô+¨hÑ6€/ð ÐØIØ×&Ò&Ñ(Ô(ñ)€IðÝ(¨¸	ÑBÔB€iØÐøÝð ð ð à
€dðøøøð
 ×ÒÝ˜°	¸;ÑGÔGñIô Ið Iå	 ¨yÑ	9Ô	9Ð9s   ™+ «
8·8ÄD. Ä.
D;Ä:D;c                 óT  — |                      dd¦  «        \  }}t          j        ¦   «         }t          j                             |                     dd¦  «        | ¦  «        |_        ||_        |j	         
                    ¦   «         }||_        t          |d¦  «        D ]Š\  }\  }}	|j         
                    ¦   «         }
||
_        |t          j        j        k    r)|t          j        j        t          j        j        z
  dz   z  }||
_        t          j        j        |
_        |	|
_        Œ‹|S )zAPopulate FileDescriptorProto for MessageFactory's DescriptorPool.ú.é   ú/)Úrsplitr   ÚFileDescriptorProtoÚosÚpathÚjoinÚreplaceÚnameÚpackageÚmessage_typeÚaddÚ	enumerateÚfieldr   ÚFieldDescriptorÚFIRST_RESERVED_FIELD_NUMBERÚLAST_RESERVED_FIELD_NUMBERÚnumberÚFieldDescriptorProtoÚLABEL_OPTIONALÚlabelÚtype)r&   r   r"   r3   r2   Ú
file_protoÚ
desc_protoÚf_numberr$   r%   Úfield_protos              r   r   r   [   s  € à×"Ò" 3¨Ñ*Ô*�-€'ˆ4ÝÔ1Ñ3Ô3€*Ý”G—L’L §¢°°cÑ!:Ô!:¸OÑLÔL€*„/Ø€*ÔØÔ&×*Ò*Ñ,Ô,€*Ø€*„/Ý$-¨k¸1Ñ$=Ô$=ð ð Ñ €hÑ �˜ØÔ"×&Ò&Ñ(Ô(€KØ€KÔð •:Ô-ÔIÒIÐIØÝ
Ô
$Ô
?Ý
Ô
$Ô
@ñAØCDñEñF€hð "€KÔÝ&Ô;ÔJ€KÔØ€KÔÐØ	Ðr   )NN)Ú__doc__Úcollectionsr   r   r.   Úgoogle.protobufr   r   r   r   r   r'   r   © r   r   ú<module>rH      s¶   ðð &Ð %à #Ð #Ð #Ð #Ð #Ð #Ø €€€Ø 	€	€	€	à *Ð *Ð *Ð *Ð *Ð *Ø &Ð &Ð &Ð &Ð &Ð &Ø +Ð +Ð +Ð +Ð +Ð +Ø +Ð +Ð +Ð +Ð +Ð +ðð ð ð 4:ð 4:ð 4:ð 4:ðnð ð ð ð r   