Ë
    ¦)jSW  ã                  ó¶  — d Z ddlmZ ddlZddlZddlmZmZmZ ddl	m
Z
 ddlmZ ddlmZ  ej                  e«      Z edd	g¬
«      Zdd„Z G d„ d«      Z e«       Zddœdd„Zddd„Zej1                  d«       ee«      fdd„«       Zej1                  d«       ee«      fdd„«       Zej7                  d«      d„ «       Zej1                  d«      dd„«       Zy) u®   
routers/tavus.py â€” Tavus CVI live video roleplay integration
Endpoint: POST /api/tavus/start-session

All credentials come from config.py / .env â€” never hardcoded here.
é    )ÚannotationsN)Ú	APIRouterÚDependsÚHTTPException)ÚJSONResponse)Úsettings)Úget_current_userz
/api/tavusÚtavus)ÚprefixÚtagsc                ó’   — | sy| j                  «       }t        |«      dk\  r%|d   |d   k(  r|d   dv r|dd j                  «       }|S )NÚ é   r   éÿÿÿÿ)Ú"Ú'é   )ÚstripÚlen)ÚrawÚss     úg/Users/priyanka/Documents/AI_Agent_Assessment/pepole_hub_candidate/people_hub_candidate/routes/tavus.pyÚ
_clean_envr       sO   € ÙØØ�	‰	‹€Aô ˆ1ƒv�‚{�q˜‘t˜q ™u’}¨¨1©°Ñ);Øˆa�ˆG�M‰M‹OˆØ€Hó    c                  óL   — e Zd Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zy)Ú_TavusSettingsc                ó4   — t        t        j                  «      S ©N)r   r   ÚTAVUS_API_KEY©Úselfs    r   Útavus_api_keyz_TavusSettings.tavus_api_key-   s   € Ü'1´(×2HÑ2HÓ'IÐ Ir   c                ó<   — t        t        j                  «      xs dS )Núhttps://tavusapi.com/v2)r   r   ÚTAVUS_BASE_URLr    s    r   Útavus_base_urlz_TavusSettings.tavus_base_url/   s   € Ü'1´(×2IÑ2IÓ'JÒ'gÐNgÐ gr   c                ó4   — t        t        j                  «      S r   )r   r   ÚTAVUS_REPLICA_IDr    s    r   Útavus_replica_idz_TavusSettings.tavus_replica_id1   ó   € Ü'1´(×2KÑ2KÓ'LÐ Lr   c                ó4   — t        t        j                  «      S r   )r   r   ÚTAVUS_PERSONA_IDr    s    r   Útavus_persona_idz_TavusSettings.tavus_persona_id3   r*   r   N)Ú__name__Ú
__module__Ú__qualname__Úpropertyr"   r&   r)   r-   © r   r   r   r   ,   s:   „ ØÙIó ØIØÙgó ØgØÙLó ØLØÙLó ÙLr   r   r   ©Údefaultc               óX   — |D ]$  }| j                  |«      }|dvsŒt        |«      c S  |S )uG  Read the first non-empty value from any of the given dict keys.

    The People Hub external roleplay API returns scenarios in a loose
    snake_case-or-camelCase shape â€” we accept both styles here so the
    Tavus persona prompt comes out the same regardless of which
    convention the upstream uses for a given field.
    )Nr   )ÚgetÚstr)r   r4   ÚkeysÚkÚvs        r   Ú_pickr;   9   s3   € ó ˆØ�G‰G�A‹JˆØ�JÒÜ�q“6ŠMð ð €Nr   c                ó–  — t        | dddddd¬«      }t        | dd	d
dd¬«      }t        | dddd¬«      }t        | ddddd¬«      }t        | ddd¬«      }t        | dddddd¬«      }t        | dd d!d"d#¬«      }t        | d$d%d&d'¬«      }	|xs d(j                  «       }
d(}|
rd)|
› d*|› d+|
› d,|› d-�	}d.|› d/|› |› d0|› d1|› d2|› d3|› d4|› d5|	› d6�S )7ul  Map an external roleplay scenario (raw dict from the People Hub
    API) directly into the Tavus persona system prompt.

    Everything we need lives on the dict already â€” we do NOT need a
    Pydantic Scenario object, and we do NOT need to look anything up
    in the local data/scenarios.json store. The same dict shape is
    what the lobby renders and what voice / video role play already
    consume, so passing it straight through guarantees the Live AI
    flow uses the same scenario the candidate actually picked.

    ``candidate_name`` is the candidate's display name (from the
    People Hub login envelope, stashed on the frontend). When
    provided, it is woven into the prompt so the AI opens with
    "Hi <name>, â€¦" instead of asking the candidate to type their
    name â€” that was the "the AI keeps asking who I am" bug we saw
    in user testing.
    Úai_characterÚaiCharacterÚ	characterÚpartnerÚnpczAI Characterr3   ÚcontextÚsceneÚ
backgroundÚdescriptionzHave a realistic conversation.Úai_personalityÚaiPersonalityÚpersonalityz6Be realistic and challenging. Stay fully in character.Úlearner_roleÚlearnerRoleÚ	user_roleÚuserRoleÚ	CandidateÚ
difficultyÚlevelÚIntermediateÚ	cat_labelÚcatLabelÚcategory_labelÚcategoryLabelÚcategoryÚGeneralÚlanguage_nameÚlanguageNameÚ	lang_nameÚlangNameÚEnglishÚturnsÚ	max_turnsÚmaxTurnsÚ8r   u>   

IMPORTANT â€” CANDIDATE IDENTITY:
- The candidate's name is z. They are the z..
- Greet them BY NAME at the start (e.g. "Hi uÄ   , ...").
- Do NOT ask the candidate to introduce themselves or to   state their name â€” you already know who they are.
- Do NOT ask what their role is â€” you already know they   are playing the z<.
- Jump straight into the scenario in your very first turn.zYou are z>, a character in a professional training roleplay.

SCENARIO:
z 

YOUR PERSONALITY & BEHAVIOUR:
z>

RULES:
- You are speaking with someone playing the role of: z
- Difficulty: z
- Category: z
- Language: ué   
- This is a training simulation â€” be realistic but constructive.
- Never break character. Never reveal you are an AI unless directly asked.
- Keep responses conversational and appropriately emotional for your character.
- Aim for z conversation exchanges total.)r;   r   )r   Úcandidate_namer=   rB   rF   rI   rN   rU   rW   r\   ÚnameÚidentity_blocks               r   Ú_build_system_promptrc   H   sm  € ô$ ˜3 °¸{ÈIÐW\ÐftÔu€LÜ˜3 	¨7°LÀ-ÐYyÔz€GÜ˜3Ð 0°/À=ð  [Sô  T€NÜ˜3 °¸{ÈJÐ`kÔl€LÜ˜3 ¨g¸~ÔN€JÜ˜3 ¨ZÐ9IÈ?Ð\fÐpyÔz€HÜ˜3 °ÀÈjÐbkÔl€MÜ˜3 ¨°jÈ#ÔN€Eð Ò ˜b×'Ñ'Ó)€DØ€NÙð)Ø)-¨¨o¸l¸^ð L<Ø<@¸6ð B!ð ". ð /IðJð 	ð �<�.ð !Ø�Y˜~Ð.ð /*Ø*8Ð)9ð :@à@L¸~ð NØ#˜ð %Ø�jð !Ø$�oð &ð �GÐ9ð	;ðr   z/start-sessionc              ƒ  óä  K  — t         j                  st        dd¬«      ‚| j                  d«      xs i }| j                  d«      xs dj	                  «       }| j                  d«      xs |xs i j                  d«      xs dj	                  «       }| j                  d«      xs |xs i j                  d	«      xs dj	                  «       }t        |t        «      r|st        d
d¬«      ‚t        |dd«      xs t         j                  }t        |dd«      xs t         j                  }t        |dd	d¬«      dd }|st        dd¬«      ‚|d|› �dœ}	|r||	d<   nt        ||«      dd |	d<   t        j                  d|r|dd dz   nd|xs t        |dd ¬«      ||xs d i |	¥d|	j                  dd«      dd! t        |	j                  dd«      «      d!kD  rdndz   i¥«       t         j                  xs d"j                  d#«      }
|
› d$�}	 t!        j"                  d%¬&«      4 ƒd{  –—† }|j%                  |t         j                  d'd(œ|	¬)«      ƒ d{  –—† }ddd«      ƒd{  –—†  j.                  d/vrˆ|j0                  r|j0                  dd0 nd1}t        j)                  d2|j.                  |||xs d |«       d}|j.                  }|d3k(  rd4}n|d5k(  rd6}n|d7k(  rd8}n|d9k(  rd:}t        d+d;|› d<|› d=|› �¬«      ‚	 |j3                  «       }|j                  d@d«      }|j                  dAd«      }|sbt        j)                  dB|«       t        d+dCt        |t        «      rt7        |j9                  «       «      nt;        |«      j,                  › �¬«      ‚t        j                  dD|«       t=        ||dEœ«      S 7 �Œ•7 �Œk7 �Œ^# 1 ƒd{  –—†7  sw Y   �ŒoxY w# t         j&                  $ rF}t        j)                  d*||«       t        d+d,|
› d-|j*                  j,                  › d.|› �¬«      ‚d}~ww xY w# t4        $ r1 t        j)                  d>|j0                  dd9 «       t        d+d?¬«      ‚w xY w­w)Fu§  
    Start a Tavus CVI live video session for a scenario.
    Returns { conversation_url, conversation_id } to embed in the frontend iframe.

    Source of truth for the scenario is the request body.

    Scenarios for the role-play lobby come from the People Hub external
    API (NOT from data/scenarios.json), so we accept the full scenario
    object inline â€” same shape the lobby renders and that voice / video
    role play already consume. We do NOT consult the local JSON store
    here; if the client sends the scenario, we use it. This avoids the
    earlier 404s where data/scenarios.json had different ids than what
    the lobby was actually showing.

    Body shape:
        {
          "scenario": { ...full roleplay dict from the People Hub API... },
          "access_key": "<candidate access key>",   # optional, for logging
          "scenario_id": "<id>"                     # optional, for logging
        }
    é÷  zoTavus CVI is not configured. Set TAVUS_API_KEY in your .env file. See /tavus-guide for full setup instructions.©ÚdetailÚscenarioÚscenario_idr   Ú
access_keyr`   ra   é¦  zdscenario object is required. Reload the lobby and pick a scenario again, then try Live AI Role Play.r)   ÚtavusReplicaIdr-   ÚtavusPersonaIdÚtitleÚRoleplayr3   Né<   z”Live AI Role Play is not fully configured: no Tavus replica id is set. Add TAVUS_REPLICA_ID to .env, or set tavus_replica_id on the scenario object.u   RolePilot Â· )Ú
replica_idÚconversation_nameÚ
persona_idi¬  Úconversational_contextzM[Tavus] starting session  ak=%s  scenario=%s  replica=%s  persona=%s  body=%sé   õ   â€¦z(none)Úidz(inline)éx   r$   Ú/z/conversationsç      4@©Útimeoutúapplication/json©ú	x-api-keyzContent-Type©ÚheadersÚjsonz'[Tavus] network error talking to %s: %séö  úCould not reach Tavus at zR. Check your network connection and the TAVUS_BASE_URL setting. Underlying error: ú: ©éÈ   éÉ   iX  ú(empty body)u<   [Tavus] API error %s at %s â€” replica=%s persona=%s body=%sé‘  z1 Likely cause: TAVUS_API_KEY is wrong or revoked.i’  z> Likely cause: your Tavus plan is out of conversation minutes.i”  zL Likely cause: replica_id or persona_id doesn't exist on this Tavus account.i�  uN    Likely cause: request shape rejected â€” check that the replica_id is active.zTavus API returned HTTP Ú.z Tavus response: z![Tavus] response was not JSON: %sz#Tavus returned a non-JSON response.Úconversation_urlÚconversation_idz+[Tavus] no conversation_url in response: %szQTavus accepted the request but did not return a conversation_url. Response keys: z+[Tavus] session started  conversation_id=%s)rŒ   r�   )Ú_sr"   r   r6   r   Ú
isinstanceÚdictr;   r)   r-   rc   ÚlogÚinfor   r&   ÚrstripÚhttpxÚAsyncClientÚpostÚRequestErrorÚerrorÚ	__class__r.   Ústatus_codeÚtextr‚   Ú	ExceptionÚlistr8   Útyper   )ÚbodyÚcurrent_userÚraw_scenariori   rj   r`   rq   rs   rn   ÚpayloadÚbaseÚurlÚclientÚrespÚexcÚbody_previewÚhintÚscÚdatarŒ   r�   s                        r   Ústart_tavus_sessionr¬   …   sø  è ø€ ô. ×ÒÜØð@ô
ð 	
ð —8‘8˜JÓ'Ò-¨2€LØ—H‘H˜]Ó+Ò1¨r×8Ñ8Ó:€Kà�‰�Óò 	ØÒ˜B×#Ñ# LÓ1ò	àß�eƒgð	 ð 	�‰Ð!Ó"ò 	ØÒ˜B×#Ñ# FÓ+ò	àß�eƒgð	 ô �l¤DÔ)±ô
 ØðEô
ð 	
ô 	ˆlÐ.Ð0@ÓAò 	Ü×Ñð ô
 	ˆlÐ.Ð0@ÓAò 	Ü×Ñð ô
 �, ¨¸ÔDÀSÀbÐI€Eñ ÜØð?ô
ð 	
ð$ (Ø,¨U¨GÐ4ñ€Gñ
 à *ˆ�Òô -AÀÈ~Ó,^Ð_dÐ`dÐ,eˆÐ(Ñ)ä‡H�HØWÙ$.ˆ�B�Qˆ˜%Ò	°HØÒD”u˜\¨4¸ÔDØ�JÒ, *ð 	iˆ7ð  	iÐ,¨g¯k©kÐ:RÐTVÓ.WÐX\ÐY\Ð.]ÔjmÐnu×nyÑnyð  {Sð  UWó  oXó  kYð  \_ò  k_Ñafð  egñ  /hñ  	iô	ô ×ÑÒ:Ð!:×BÑBÀ3ÓG€DØˆV�>Ð"€Cð
Ü×$Ñ$¨T×2Õ2°fØŸ™Øä$&×$4Ñ$4Ø$6ñð ð %ó ÷ ˆD÷ 3×2ð* ×Ñ˜zÑ)ð +/¯)ª)�t—y‘y  #‘¸ˆÜ�	‰	ØJØ×Ñ˜c :¨zÒ/G¸ZØô	
ð
 ˆØ×ÑˆØ�Š9ØF‰DØ�3ŠYØS‰DØ�3ŠYØa‰DØ�3ŠYØcˆDÜØà*¨2¨$¨a°¨vð 6#Ø#/ .ð2ô
ð 	
ðOØ�y‰y‹{ˆð
 —x‘xÐ 2°BÓ7ÐØ—x‘xÐ 1°2Ó6€OáÜ�	‰	Ð?ÀÔFÜØð4ä(2°4¼Ô(>”4˜Ÿ	™	›Ô$ÄDÈÃJ×DWÑDWÐXðZô
ð 	
ô ‡H�HÐ:¸OÔLÜÐ-=ÐRaÑbÓcÐcðU 3ùðùð 3ù×2×2Ò2ûô ×Ñò 

ä�	‰	Ð;¸SÀ#ÔFÜØà+¨D¨6ð 2.à.1¯m©m×.DÑ.DÐ-EÀRÈÀuðNô
ð 	
ûð

ûô\ ò OÜ�	‰	Ð5°t·y±yÀÀ#°ÔGÜ˜CÐ(MÔNÐNðOüsŸ   ‚HQ0È	O È#N8È$O È')OÉN;ÉOÉO É N>É!O É%BQ0Ë<P3 ÌB,Q0Î8O Î;OÎ>O ÏOÏO
ÏOÏO ÏP0Ï*AP+Ð+P0Ð0Q0Ð3:Q-Ñ-Q0z/create-personac           	   ƒ  ó:  K  — t         j                  st        dd¬«      ‚| j                  d«      xs i }| j                  d«      xs dj	                  «       }t        |t        «      r|st        dd¬«      ‚t        |«      }t        |d	d
d¬«      dd }t        j                  d¬«      4 ƒd{  –—† }|j                  t         j                  › d�t         j                  ddœ||ddœ¬«      ƒ d{  –—† }ddd«      ƒd{  –—†  j                  dvr*t        dd|j                  › d|j                  dd › �¬«      ‚|j                  «       j                  dd«      }|rt         j#                  d||xs |«       |||dœS 7 ŒÑ7 Œ‘7 Œƒ# 1 ƒd{  –—†7  sw Y   Œ“xY w­w)u   
    Pre-create a Tavus persona for a scenario.
    Call this from the admin panel when publishing a scenario to speed up
    future video session starts (persona carries the system prompt).

    Accepts the scenario inline in the request body â€” same shape as
    /start-session â€” so admins paste the People Hub scenario JSON and
    don't depend on the local data/scenarios.json being up-to-date.
    A legacy scenario_id is also accepted; when given it is logged
    only (no lookup) so the persona_name reflects what the admin sees.
    re   zTAVUS_API_KEY not configuredrf   rh   ri   r   rk   zscenario object is requiredrn   ra   ro   r3   NéP   rz   r{   z	/personasr}   r~   Úfull)Úpersona_nameÚsystem_promptÚpipeline_moder€   r†   rƒ   z$Tavus persona creation failed: HTTP u    â€” r‡   rs   z3[Tavus] persona created  persona_id=%s  scenario=%s)rs   ri   r°   )rŽ   r"   r   r6   r   r�   r�   rc   r;   r”   r•   r–   r&   rš   r›   r‚   r‘   r’   )	rŸ   Ú_r¡   ri   r±   r°   r¥   r¦   rs   s	            r   Úcreate_tavus_personar´   W  s�  è ø€ ô ×ÒÜ˜CÐ(FÔGÐGà—8‘8˜JÓ'Ò-¨2€LØ—H‘H˜]Ó+Ò1¨r×8Ñ8Ó:€Kä�l¤DÔ)±Ü˜CÐ(EÔFÐFä(¨Ó6€MÜ˜,¨°ÀÔLÈSÈbÐQ€Lä× Ñ ¨×.Õ.°&Ø—[‘[Ü× Ñ Ð! Ð+ä×-Ñ-Ø 2ñð
 !-Ø!.Ø!'ñð !ó 
÷ 
ˆ÷ /×.ð ×Ñ˜zÑ)ÜØØ9¸$×:JÑ:JÐ9KÈ5ÐQU×QZÑQZÐ[_Ð\_ÐQ`ÐPaÐbô
ð 	
ð
 —‘“—‘ ¨rÓ2€JÙô 	�‰ØAØ˜Ò3 |ô	
ð "Ø"Ø$ñð ðA /øð
øð /ø×.×.Ñ.üs[   ‚B,FÂ.F Â/FÂ2>FÃ0FÃ1FÃ5FÄ FÄB FÆFÆFÆFÆFÆFÆFz/healthc               ƒ  ór  K  — t         j                  } t         j                  xs dj                  d«      }| st	        ddd|dœ¬«      S t        | «      dk\  r| d	d
 › d| dd	 › dt        | «      › d�}ndt        | «      › d�}	 t        j                  d¬«      4 ƒd	{  –—† }|j                  |› d�d| i¬«      ƒ d	{  –—† }d	d	d	«      ƒd	{  –—†  j                  }|j                  r|j                  d	d nd}|dk(  r‘g }	 |j                  «       }	t        |	t         «      r%t        |	j                  d«      t"        «      r|	d   }nt        |	t"        «      r|	}dd||t        |«      t         j&                  xs d t         j(                  xs d d!œS d"}
|d#k(  rd$}
n|d%k(  rd&}
t	        ddd'|› |
› d(|› �||dœ¬«      S 7 �Œ7 �Œ7 Œô# 1 ƒd	{  –—†7  sw Y   �ŒxY w# t        j                  $ r9}t	        ddd|› d|j                  j                  › d|› �||dœ¬«      cY d	}~S d	}~ww xY w# t$        $ r Y ŒÚw xY w­w))uý  Diagnostic endpoint â€” verifies the configured TAVUS_API_KEY is
    accepted by Tavus, without starting a (billable) conversation.
    Returns a JSON status so an operator can curl this from the box:

        curl http://localhost:8000/api/tavus/health

    Status meanings:
      â€¢ ok=true  â†’ key is valid, replicas list reachable
      â€¢ ok=false â†’ field `detail` explains what went wrong

    Intentionally public (no auth dep) because the whole point is to
    let operators debug misconfiguration before any user can log in.
    The response NEVER leaks the API key itself â€” only its length and
    first/last few characters are echoed so the operator can confirm
    the .env value matches the Tavus dashboard without a copy-paste
    mistake.
    r$   ry   re   Fz>TAVUS_API_KEY is empty. Set it in .env and restart the server.)Úokrg   r£   )rš   Úcontenté   Né   rv   éüÿÿÿz (len=Ú)z(len=z, too short to redact safely)g      $@r{   z	/replicasr   )r�   rƒ   r„   r…   )r¶   rg   Úkey_fpr£   i,  r‰   r‡   r«   TzTAVUS_API_KEY is valid.z	(not set))r¶   rg   r¼   r£   Úreplica_countÚconfigured_replica_idÚconfigured_persona_idr   rŠ   uä    â€” Tavus rejected this exact key. Double-check the value in .env against the Tavus dashboard, ensure there are no surrounding quotes / whitespace, and RESTART the server after editing .env (Python doesn't hot-reload env vars).i“  uY    â€” the key is recognised but lacks permission for /replicas. Check the Tavus plan tier.zTavus returned HTTP z Body: )rŽ   r"   r&   r“   r   r   r”   r•   r6   r—   r™   r.   rš   r›   r‚   r�   r�   r�   rœ   r)   r-   )Úkeyr£   r¼   r¥   r¦   r§   rª   r¨   Úreplicasr«   r©   s              r   Útavus_healthrÂ   —  sv  è ø€ ô& ×
Ñ
€CÜ×ÑÒ:Ð!:×BÑBÀ3ÓG€DáÜØàØZØñô
ð 	
ô ˆ3ƒx�1‚}Ø˜˜�G�9˜C  B C ˜z¨´°C³¨z¸Ð;‰àœ˜S›˜
Ð"?Ð@ˆð
Ü×$Ñ$¨T×2Õ2°fð
  Ÿ™Ø�&˜	Ð"Ø$ cÐ*ð $ó ÷ ˆD÷ 3×2ð( 
×	Ñ	€BØ&*§i¢i�4—9‘9˜T˜c‘?°^€Là	ˆS‚yð ˆð	Ø—9‘9“;ˆDÜ˜$¤Ô%¬*°T·X±X¸fÓ5EÄtÔ*LØ ™<‘Ü˜D¤$Ô'Ø�ð #Ø7Ø$Ø"Ü! (›mÜ%'×%8Ñ%8Ò%G¸KÜ%'×%8Ñ%8Ò%G¸Kñ
ð 	
ð €DØ	ˆS‚yðGñ 	ð 
ˆsŠØjˆäØàØ,¨R¨D°°°g¸l¸^ÐLØØñ	
ôð ðq 3ùð
ùð 3ø×2×2Ò2ûô ×Ñò 	
ÜØàØ5°d°V¸2¸c¿m¹m×>TÑ>TÐ=UÐUWÐX[ÐW\Ð]Ø Øñ	ô
õ 	
ûð	
ûô0 ò 	Ùð	üs¶   ‚A?H7ÂG ÂF;ÂG Â GÂ<F>Â=GÃG ÃGÃG Ã0H7ÄAH( ÅA"H7Æ;G Æ>GÇG ÇGÇ	GÇ
GÇG ÇH%Ç,.H ÈH%ÈH7È H%È%H7È(	H4È1H7È3H4È4H7z/webhookc              ƒ  ó  K  — | j                  dd«      }| j                  dd«      }t        j                  d||«       |dk(  rD| j                  dg «      }| j                  dd«      }t        j                  d	t        |«      |«       d
diS ­w)z²
    Receive Tavus webhook events (conversation.ended, transcript_ready).
    Register this URL in your Tavus dashboard:
      POST https://your-domain.com/api/tavus/webhook
    Úeventr   r�   z-[Tavus] webhook  event=%s  conversation_id=%szconversation.endedÚ
transcriptÚduration_secondsr   z-[Tavus] session ended  turns=%d  duration=%dsr¶   T)r6   r‘   r’   r   )r¢   rÄ   r�   rÅ   Údurations        r   Útavus_webhookrÈ     sˆ   è ø€ ð —k‘k '¨2Ó.€EØ—k‘kÐ"3°RÓ8€OÜ‡H�HÐ<¸eÀ_ÔUàÐ$Ò$Ø—[‘[ ¨rÓ2ˆ
Ø—[‘[Ð!3°QÓ7ˆÜ�‰Ø;Ü�
‹O˜Xô	
ð �$ˆ<Ðùs   ‚B	B)r   r7   Úreturnr7   )r   r�   r8   r7   r4   r7   rÉ   r7   )r   )r   r�   r`   r7   rÉ   r7   )rŸ   r�   )r¢   r�   )Ú__doc__Ú
__future__r   Úloggingr”   Úfastapir   r   r   Úfastapi.responsesr   Úconfigr   Úservices.authr	   Ú	getLoggerr.   r‘   Úrouterr   r   rŽ   r;   rc   r–   r¬   r´   r6   rÂ   rÈ   r2   r   r   Ú<module>rÓ      s  ðñõ #Û ã ß 5Ñ 5Ý *å Ý *ð €g×Ñ˜Ó!€Ù	˜,¨g¨YÔ	7€ó	÷Mñ Mñ Ó€ð 13õ ô:ðz ‡�ÐÓÙ7>Ð?OÓ7Pó Ndó ðNdðb ‡�ÐÓÙ-4Ð5EÓ-Fó <ó  ð<ð~ ‡�ˆIÓñió ðiðX ‡�ˆZÓòó ñr   