
    {i~                     ^   d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d dlmZ d d	lmZ d d
lmZ d dlmZ 	 d dlZn# e$ r dZY nw xY w	 d dlZn# e$ r dZY nw xY w eded           G d de	                      Z eded           G d de	                      ZdS )    )Any)FastAPIDeprecationWarning)EventSourceResponse)FileResponse)HTMLResponse)JSONResponse)PlainTextResponse)RedirectResponse)Response)StreamingResponse)
deprecatedNal  UJSONResponse is deprecated, FastAPI now serializes data directly to JSON bytes via Pydantic when a return type or response model is set, which is faster and doesn't need a custom response class. Read more in the FastAPI docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model and https://fastapi.tiangolo.com/tutorial/response-model/   )category
stacklevelc                   "    e Zd ZdZdedefdZdS )UJSONResponsea  JSON response using the ujson library to serialize data to JSON.

    **Deprecated**: `UJSONResponse` is deprecated. FastAPI now serializes data
    directly to JSON bytes via Pydantic when a return type or response model is
    set, which is faster and doesn't need a custom response class.

    Read more in the
    [FastAPI docs for Custom Response](https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model)
    and the
    [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).

    **Note**: `ujson` is not included with FastAPI and must be installed
    separately, e.g. `pip install ujson`.
    contentreturnc                 v    t           
J d            t          j        |d                              d          S )Nz,ujson must be installed to use UJSONResponseF)ensure_asciizutf-8)ujsondumpsencodeselfr   s     T/root/projects/openclaw-proxy/venv/lib/python3.11/site-packages/fastapi/responses.pyrenderzUJSONResponse.render3   s:      "P   {7777>>wGGG    N__name__
__module____qualname____doc__r   bytesr    r   r   r   r      sH         Hc He H H H H H Hr   r   am  ORJSONResponse is deprecated, FastAPI now serializes data directly to JSON bytes via Pydantic when a return type or response model is set, which is faster and doesn't need a custom response class. Read more in the FastAPI docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model and https://fastapi.tiangolo.com/tutorial/response-model/c                   "    e Zd ZdZdedefdZdS )ORJSONResponsea  JSON response using the orjson library to serialize data to JSON.

    **Deprecated**: `ORJSONResponse` is deprecated. FastAPI now serializes data
    directly to JSON bytes via Pydantic when a return type or response model is
    set, which is faster and doesn't need a custom response class.

    Read more in the
    [FastAPI docs for Custom Response](https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model)
    and the
    [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).

    **Note**: `orjson` is not included with FastAPI and must be installed
    separately, e.g. `pip install orjson`.
    r   r   c                 ~    t           
J d            t          j        |t           j        t           j        z            S )Nz.orjson must be installed to use ORJSONResponse)option)orjsonr   OPT_NON_STR_KEYSOPT_SERIALIZE_NUMPYr   s     r   r   zORJSONResponse.renderQ   s@    !!#S!!!|F3f6PP
 
 
 	
r   Nr   r%   r   r   r'   r'   8   s@         
c 
e 
 
 
 
 
 
r   r'   )typingr   fastapi.exceptionsr   fastapi.sser   starlette.responsesr   r   r   r	   r
   r   r   typing_extensionsr   r   ImportErrorr*   r   r'   r%   r   r   <module>r3      s         8 8 8 8 8 8 B B B B B B < < < < < < < < < < < < < < < < < < F F F F F F D D D D D D 4 4 4 4 4 4 F F F F F F ( ( ( ( ( (LLLL   EEEMMMM   FFF @
 '  H H H H HL H H H* @
 '  
 
 
 
 
\ 
 
 
 
 
s$   A	 	AAA A&%A&