Ë
    tPêjµ  ã            	       óJ   — U d Z ddlmZ ddlmZ dZeed<   ddededed	efd
„Zy)zCRFC 7386 JSON Merge Patch (https://www.rfc-editor.org/rfc/rfc7386).é    )ÚFinal)Ú	JsonValueé@   Ú_MAX_MERGE_DEPTHÚtargetÚpatchÚ_depthÚreturnc                 ó|  — t        |t        «      s|S |t        k\  rt        dt        › �«      ‚t        | t        «      r| ni }|j	                  «       D ��ci c]  \  }}||vsŒ||“Œ }}}|j	                  «       D ��ci c]'  \  }}|� |t        |j                  |«      ||dz   «      “Œ) }}}i |¥|¥S c c}}w c c}}w )až  Apply an RFC 7386 JSON Merge Patch to ``target`` and return the result.

    - a key absent from ``patch`` keeps its value in ``target``
    - a key mapped to ``null`` in ``patch`` is removed from the result
    - any other value overwrites, recursing into nested objects

    ``target`` is never mutated; a new value is returned. Raises ``ValueError``
    if ``patch`` nests deeper than ``_MAX_MERGE_DEPTH``.
    z6JSON merge patch nesting exceeds the maximum depth of é   )Ú
isinstanceÚdictr   Ú
ValueErrorÚitemsÚapply_json_merge_patchÚget)r   r   r	   ÚbaseÚkeyÚvalueÚ	preservedÚapplieds           úp/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/proxy/common_utils/json_merge_patch.pyr   r      sÑ   € ô �eœTÔ"ØˆØÔ!Ò!ÜÐQÔRbÐQcÐdÓeÐeä& v¬tÔ4‘&¸"€DØ59·Z±Z³\×V¡z s¨EÀSÐPUÒEU˜˜U™
ÐV€IÑVð  Ÿ+™+›-÷áˆC�ØÐð 	Ô# D§H¡H¨S£M°5¸&À1¹*ÓEÑEð€Gñ ð
 $ˆiÐ#˜7Ð#Ð#ùó Wùós   ÁB2Á"B2Á=,B8N)r   )	Ú__doc__Útypingr   Úpydanticr   r   Ú__annotations__Úintr   © ó    r   ú<module>r       s=   ðÚ Iå å ð
 Ð �%Ó ñ$ 9ð $°Yð $Èð $ÐT]ô $r   