L iBdZddlZddlZddlmZddlmZmZm Z m Z m Z m Z m Z mZddlmZddlmZmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd l m!Z!ddl"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1m2Z2m3Z3er ddl4m5Z5m6Z6m7Z7e8e9e3e!ee1e9fe9fZ:ee;dZGdde!ee1e9fZ?y)z-This module contains the ConversationHandler.N) dataclass) TYPE_CHECKINGAnyFinalGenericNoReturnOptionalUnioncast)Update) DEFAULT_TRUE DefaultValue) get_logger)build_repr_with_selected_attrs)DVType)warn)ApplicationHandlerStop)ExtBot) BaseHandler)CallbackQueryHandler)ChosenInlineResultHandler)InlineQueryHandler)StringCommandHandler)StringRegexHandler) TypeHandler) TrackingDict)CCTConversationDictConversationKey) ApplicationJobJobQueueConversationHandler) class_namec>eZdZUdZdZeed<eed<ded<eed<y) _ConversationTimeoutContextzUsed as a datastore for conversation timeouts. Passed in the :paramref:`JobQueue.run_once.data` parameter. See :meth:`_trigger_timeout`. ) applicationcallback_contextconversation_keyupdater)r*.Application[Any, CCT, Any, Any, Any, JobQueue]r'r(N) __name__ __module__ __qualname____doc__ __slots__r__annotations__r rp/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/ext/_handlers/conversationhandler.pyr&r&3s&RI%% NAAr3r&cVeZdZUdZdZej ed<eed<de fdZ defdZ y) PendingStatea Thin wrapper around :class:`asyncio.Task` to handle block=False handlers. Note that this is a public class of this module, since :meth:`Application.update_persistence` needs to access it. It's still hidden from users, since this module itself is private.  old_statetaskr9r8returnc6|jjSN)r9doneselfs r4r=zPendingState.doneMsyy~~r3cp|jjs td|jj}|r,tjd|j |j S|jj }||j tj}|S| |j S|S)aReturns the new state of the :class:`ConversationHandler` if available. If there was an exception during the task execution, then return the old state. If both the new and old state are :obj:`None`, return `CH.END`. If only the new state is :obj:`None`, return the old state. Raises: :exc:`RuntimeError`: If the current task has not yet finished. zNew state is not yet availablez> !ii  ;4>>1%))C  [>> ! r3N) r,r-r.r/r0asyncioTaskr1objectboolr=rHr2r3r4r6r6As6 &I ,, d r3r6ceZdZUdZdZdZeeed< dZ eeed< dZ eeed< d d d d d d d d e f d d de e eeefdeee e eeeffde e eeefdededededeeeej.fdeededeeeefdeefdZdefdZede e eeeffdZej<dedefdZedeee e eeefffd Z e j<dedefd!Z ede e eeeffd"Z!e!j<dedefd#Z!edefd$Z"e"j<dedefd%Z"edefd&Z#e#j<dedefd'Z#edefd(Z$e$j<dedefd)Z$edefd*Z%e%j<dedefd+Z%edeeeej.ffd,Z&e&j<dedefd-Z&edeefd.Z'e'j<dedefd/Z'edefd0Z(e(j<dedefd1Z(edeeeeffd2Z)e)j<dedefd3Z)d4d5deee*e+efffd6Z,d7ede+fd8Z-d9e.j^d4d:d7ed;edZ1d7edee2efd?Z3d7ed4d@dAe2ed;edeef dBZ4 dGd9edCe+dDee dd fdEZ5d;edd fdFZ6y )Hr#a# A handler to hold a conversation with a single or multiple users through Telegram updates by managing three collections of other handlers. Warning: :class:`ConversationHandler` heavily relies on incoming updates being processed one by one. When using this handler, :attr:`telegram.ext.ApplicationBuilder.concurrent_updates` should be set to :obj:`False`. Note: :class:`ConversationHandler` will only accept updates that are (subclass-)instances of :class:`telegram.Update`. This is, because depending on the :attr:`per_user` and :attr:`per_chat`, :class:`ConversationHandler` relies on :attr:`telegram.Update.effective_user` and/or :attr:`telegram.Update.effective_chat` in order to determine which conversation an update should belong to. For :attr:`per_message=True `, :class:`ConversationHandler` uses :attr:`update.callback_query.message.message_id ` when :attr:`per_chat=True ` and :attr:`update.callback_query.inline_message_id <.CallbackQuery.inline_message_id>` when :attr:`per_chat=False `. For a more detailed explanation, please see our `FAQ`_. Finally, :class:`ConversationHandler`, does *not* handle (edited) channel posts. .. _`FAQ`: https://github.com/python-telegram-bot/python-telegram-bot/wiki /Frequently-Asked-Questions#what-do-the-per_-settings-in-conversation handler-do The first collection, a :obj:`list` named :attr:`entry_points`, is used to initiate the conversation, for example with a :class:`telegram.ext.CommandHandler` or :class:`telegram.ext.MessageHandler`. The second collection, a :obj:`dict` named :attr:`states`, contains the different conversation steps and one or more associated handlers that should be used if the user sends a message when the conversation with them is currently in that state. Here you can also define a state for :attr:`TIMEOUT` to define the behavior when :attr:`conversation_timeout` is exceeded, and a state for :attr:`WAITING` to define behavior when a new update is received while the previous :attr:`block=False ` handler is not finished. The third collection, a :obj:`list` named :attr:`fallbacks`, is used if the user is currently in a conversation but the state has either no associated handler or the handler that is associated to the state is inappropriate for the update, for example if the update contains a command, but a regular text message is expected. You could use this for a ``/cancel`` command or to let the user know their message was not recognized. To change the state of conversation, the callback function of a handler must return the new state after responding to the user. If it does not return anything (returning :obj:`None` by default), the state will not change. If an entry point callback function returns :obj:`None`, the conversation ends immediately after the execution of this callback function. To end the conversation, the callback function must return :attr:`END` or ``-1``. To handle the conversation timeout, use handler :attr:`TIMEOUT` or ``-2``. Finally, :class:`telegram.ext.ApplicationHandlerStop` can be used in conversations as described in its documentation. Note: In each of the described collections of handlers, a handler may in turn be a :class:`ConversationHandler`. In that case, the child :class:`ConversationHandler` should have the attribute :attr:`map_to_parent` which allows returning to the parent conversation at specified states within the child conversation. Note that the keys in :attr:`map_to_parent` must not appear as keys in :attr:`states` attribute or else the latter will be ignored. You may map :attr:`END` to one of the parents states to continue the parent conversation after the child conversation has ended or even map a state to :attr:`END` to end the *parent* conversation from within the child conversation. For an example on nested :class:`ConversationHandler` s, see :any:`examples.nestedconversationbot`. Examples: * :any:`Conversation Bot ` * :any:`Conversation Bot 2 ` * :any:`Nested Conversation Bot ` * :any:`Persistent Conversation Bot ` Args: entry_points (list[:class:`telegram.ext.BaseHandler`]): A list of :obj:`BaseHandler` objects that can trigger the start of the conversation. The first handler whose :meth:`check_update` method returns :obj:`True` will be used. If all return :obj:`False`, the update is not handled. states (dict[:obj:`object`, list[:class:`telegram.ext.BaseHandler`]]): A :obj:`dict` that defines the different states of conversation a user can be in and one or more associated :obj:`BaseHandler` objects that should be used in that state. The first handler whose :meth:`check_update` method returns :obj:`True` will be used. fallbacks (list[:class:`telegram.ext.BaseHandler`]): A list of handlers that might be used if the user is in a conversation, but every handler for their current state returned :obj:`False` on :meth:`check_update`. The first handler which :meth:`check_update` method returns :obj:`True` will be used. If all return :obj:`False`, the update is not handled. allow_reentry (:obj:`bool`, optional): If set to :obj:`True`, a user that is currently in a conversation can restart the conversation by triggering one of the entry points. Default is :obj:`False`. per_chat (:obj:`bool`, optional): If the conversation key should contain the Chat's ID. Default is :obj:`True`. per_user (:obj:`bool`, optional): If the conversation key should contain the User's ID. Default is :obj:`True`. per_message (:obj:`bool`, optional): If the conversation key should contain the Message's ID. Default is :obj:`False`. conversation_timeout (:obj:`float` | :obj:`datetime.timedelta`, optional): When this handler is inactive more than this timeout (in seconds), it will be automatically ended. If this value is ``0`` or :obj:`None` (default), there will be no timeout. The last received update and the corresponding :class:`context <.CallbackContext>` will be handled by *ALL* the handler's whose :meth:`check_update` method returns :obj:`True` that are in the state :attr:`ConversationHandler.TIMEOUT`. Caution: * This feature relies on the :attr:`telegram.ext.Application.job_queue` being set and hence requires that the dependencies that :class:`telegram.ext.JobQueue` relies on are installed. * Using :paramref:`conversation_timeout` with nested conversations is currently not supported. You can still try to use it, but it will likely behave differently from what you expect. name (:obj:`str`, optional): The name for this conversation handler. Required for persistence. persistent (:obj:`bool`, optional): If the conversation's dict for this handler should be saved. :paramref:`name` is required and persistence has to be set in :attr:`Application <.Application.persistence>`. .. versionchanged:: 20.0 Was previously named as ``persistence``. map_to_parent (dict[:obj:`object`, :obj:`object`], optional): A :obj:`dict` that can be used to instruct a child conversation handler to transition into a mapped state on its parent conversation handler in place of a specified nested state. block (:obj:`bool`, optional): Pass :obj:`False` or :obj:`True` to set a default value for the :attr:`BaseHandler.block` setting of all handlers (in :attr:`entry_points`, :attr:`states` and :attr:`fallbacks`). The resolution order for checking if a handler should be run non-blocking is: 1. :attr:`telegram.ext.BaseHandler.block` (if set) 2. the value passed to this parameter (if any) 3. :attr:`telegram.ext.Defaults.block` (if defaults are used) .. seealso:: :wiki:`Concurrency` .. versionchanged:: 20.0 No longer overrides the handlers settings. Resolution order was changed. Raises: :exc:`ValueError`: If :paramref:`persistent` is used but :paramref:`name` was not set, or when :attr:`per_message`, :attr:`per_chat`, :attr:`per_user` are all :obj:`False`. Attributes: block (:obj:`bool`): Determines whether the callback will run in a blocking way. Always :obj:`True` since conversation handlers handle any non-blocking callbacks internally. )_allow_reentry_block_child_conversations_conversation_timeout_conversations _entry_points _fallbacks_map_to_parent_name _per_chat _per_message _per_user _persistent_states_timeout_jobs_lock timeout_jobsrETIMEOUTWAITINGFTNr?zConversationHandler[CCT] entry_pointsstates fallbacks allow_reentryper_chatper_user per_messageconversation_timeoutname persistent map_to_parentblockc ddlm} m}m}m}d|_| |_||_||_||_ ||_ ||_ ||_ ||_ ||_| |_| |_i|_t%j&|_i|_t-|_| r|j0s t3d| |_t7|j8|j:|j<fs t3d|j<r|j:s t?ddg}|jA||jA||jCD]}|jA||j.jEd |Dd }|D]}tG|tHtJfr't?d |jLjNd dntG|tPr@tS|jTtVs&t?d |jTjNddntG||rt?ddn|j:rAtG||tXtZ|| fr(t?d|jLjNd|dnY|j<r!tG|t\st?d|dn,|j<s tG|t\rt?d|d|j^s_tG||jLswt?ddy)Nr)PollAnswerHandler PollHandlerPreCheckoutQueryHandlerShippingQueryHandlerTz:Conversations can't be persistent when handler is unnamed.z='per_user', 'per_chat' and 'per_message' can't all be 'False'znIf 'per_message=True' is used, 'per_chat=True' should also be used, since message IDs are not globally unique. stacklevelc3BK|]}t|ts|ywr<) isinstancer#).0handlers r4 z/ConversationHandler.__init__..cs) :gGZ3[G) sz Read this FAQ entry to learn more about the per_* settings: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Frequently-Asked-Questions#what-do-the-per_-settings-in-conversationhandler-do.zJThe `ConversationHandler` only handles updates of type `telegram.Update`. z handles updates of type `str`.zkThe `ConversationHandler` only handles updates of type `telegram.Update`. The TypeHandler is set to handle .zPollHandler will never trigger in a conversation since it has no information about the chat or the user who voted in it. Do you mean the `PollAnswerHandler`?zUpdates handled by zb only have information about the user, so this handler won't ever be triggered if `per_chat=True`.zIf 'per_message=True', all entry points, state handlers, and fallbacks must be 'CallbackQueryHandler', since no other handlers have a message context.zUIf 'per_message=False', 'CallbackQueryHandler' will not be tracked for every message.zUsing `conversation_timeout` with nested conversations is currently not supported. You can still try to use it, but it will likely behave differently from what you expect.)0 telegram.extrprqrrrsrnrOrSr[rTrNrYrWrXrQrVrUr]rILockr\rRsetrPrk ValueErrorrZanyrhrgrirextendvaluesr*rxrr __class__r,r issubclasstyper rrrrj)r?rcrdrerfrgrhrirjrkrlrmrnrprqrrrs all_handlersstate_handlers per_faq_linkrzs r4__init__zConversationHandler.__init__s   $( $) EQMS BK$1''"-L`"$( >K>@"),,.02>Ae! diiYZ Z!+DMM4==$2B2BCD\] ]   DMM =  @B L)I&$mmo 0N    / 0 !!(() #/)   _ $< G'$8:L#MN`((1122QS  G[1*W\\SY:Z99@9N9N8OqR  G[1+ ! ,*1/)  )'*;*;*D*D)EF\#n& ! !!*W>R*S..:^= !  %%*W>R*S11=@  ((Z-P8 ! o< r3r:cd}tt|jjd|}t |}t |j|kDr|dddz}t ||j|S)aGive a string representation of the ConversationHandler in the form ``ConversationHandler[name=..., states={...}]``. If there are more than 3 states, only the first 3 states are listed. As this class doesn't implement :meth:`object.__str__`, the default implementation will be used, which is equivalent to :meth:`__repr__`. Returns: :obj:`str` Nr^z, ...})rkrd)dictlistrditemsstrlenrrk)r?truncation_thresholdrd states_strings r4__repr__zConversationHandler.__repr__su !d4;;,,./0E1EFGF t{{ 2 2)#2.9M-    r3c|jS)zlist[:class:`telegram.ext.BaseHandler`]: A list of :obj:`BaseHandler` objects that can trigger the start of the conversation. )rSr>s r4rcz ConversationHandler.entry_pointss !!!r3_ctd)NzDYou can not assign a new value to entry_points after initialization.AttributeErrorr?rs r4rcz ConversationHandler.entry_pointss R  r3c|jS)adict[:obj:`object`, list[:class:`telegram.ext.BaseHandler`]]: A :obj:`dict` that defines the different states of conversation a user can be in and one or more associated :obj:`BaseHandler` objects that should be used in that state. )r[r>s r4rdzConversationHandler.statess ||r3ctd)Nz>You can not assign a new value to states after initialization.rrs r4rdzConversationHandler.statess]^^r3c|jS)zlist[:class:`telegram.ext.BaseHandler`]: A list of handlers that might be used if the user is in a conversation, but every handler for their current state returned :obj:`False` on :meth:`check_update`. )rTr>s r4rezConversationHandler.fallbackss r3ctd)NzAYou can not assign a new value to fallbacks after initialization.rrs r4rezConversationHandler.fallbackss`aar3c|jS)zQ:obj:`bool`: Determines if a user can restart a conversation with an entry point.)rNr>s r4rfz!ConversationHandler.allow_reentrys"""r3ctd)NzEYou can not assign a new value to allow_reentry after initialization.rrs r4rfz!ConversationHandler.allow_reentry S  r3c|jS)zB:obj:`bool`: If the conversation key should contain the User's ID.)rYr>s r4rhzConversationHandler.per_user~~r3ctd)Nz@You can not assign a new value to per_user after initialization.rrs r4rhzConversationHandler.per_user_``r3c|jS)zB:obj:`bool`: If the conversation key should contain the Chat's ID.)rWr>s r4rgzConversationHandler.per_chatrr3ctd)Nz@You can not assign a new value to per_chat after initialization.rrs r4rgzConversationHandler.per_chatrr3c|jS)zE:obj:`bool`: If the conversation key should contain the message's ID.)rXr>s r4rizConversationHandler.per_messages   r3ctd)NzCYou can not assign a new value to per_message after initialization.rrs r4rizConversationHandler.per_message sbccr3c|jS)z:obj:`float` | :obj:`datetime.timedelta`: Optional. When this handler is inactive more than this timeout (in seconds), it will be automatically ended. )rQr>s r4rjz(ConversationHandler.conversation_timeouts)))r3ctd)NzLYou can not assign a new value to conversation_timeout after initialization.rrs r4rjz(ConversationHandler.conversation_timeouts Z  r3c|jS)zE:obj:`str`: Optional. The name for this :class:`ConversationHandler`.)rVr>s r4rkzConversationHandler.name!szzr3ctd)Nz`. )rZr>s r4rlzConversationHandler.persistent*s r3ctd)NzBYou can not assign a new value to persistent after initialization.rrs r4rlzConversationHandler.persistent2sabbr3c|jS)a dict[:obj:`object`, :obj:`object`]: Optional. A :obj:`dict` that can be used to instruct a nested :class:`ConversationHandler` to transition into a mapped state on its parent :class:`ConversationHandler` in place of a specified nested state. )rUr>s r4rmz!ConversationHandler.map_to_parent6s """r3ctd)NzEYou can not assign a new value to map_to_parent after initialization.rrs r4rmz!ConversationHandler.map_to_parent>rr3r'r cK|jr|jr |js td|j}t dt |_|jj||jj|jd{}|jj||jD]2\}}||jk(s|j|j|4|j|ji}|jD]+}|j|j|d{-|S77w)aInitializes the persistence for this handler and its child conversations. While this method is marked as protected, we expect it to be called by the Application/parent conversations. It's just protected to hide it from users. Args: application (:class:`telegram.ext.Application`): The application. Returns: A dict {conversation.name -> TrackingDict}, which contains all dict of this conversation and possible child conversations. zRThis handler is not persistent, has no name or the application has no persistence!z%TrackingDict[ConversationKey, object]N) new_statekey)r')rlrk persistencerArRr rr*get_conversationsupdate_no_trackrrE _update_staterP_initialize_persistence)r?r'current_conversations stored_datarstateoutrzs r4rz+ConversationHandler._initialize_persistenceDsDDII+2I2I  !% 3 3" 3 N  ""#89(33EEdiiPP  ++K8 &++- @JC ""TXX3"? @yy$--.00 G JJ55 +6   )Qs,BEEAE A&EE  EEr*cL|j}|j}g}|jr(| td|j |j |j r(| td|j |j |jr|j td|jjr0|j |jjt|S|j |jjjt|S)z7Builds the conversation key associated with the update.z2Can't build key for update without effective chat!z2Can't build key for update without effective user!z1Can't build key for update without CallbackQuery!) effective_chateffective_userrgrAappendidrhricallback_queryinline_message_idmessage message_idtuple)r?r*chatuserrs r4_get_keyzConversationHandler._get_keyxs$$$$%' ==|"#WXX JJtww  ==|"#WXX JJtww    $$,"#VWW$$66 600BBCSz 60088CCDSzr3rr+contextr)cK |d{}|j|||||S7#t$r!}tjd|Yd}~yd}~wwxYww)NzTNon-blocking handler callback raised exception. Not scheduling conversation timeout.exc_info)rr'r*rr)) ExceptionrCdebug _schedule_job)r?rr'r*rr)effective_new_staterFs r4_schedule_job_delayedz)ConversationHandler._schedule_job_delayedsn (1/ !!)#- "  #2  MM     s6A&$&A& AA A AAc ||jk(ry |j}|j|j|jt |||||j |<y#t$r!}tjd|Yd}~yd}~wwxYw)zRSchedules a job which executes :meth:`_trigger_timeout` upon conversation timeout.N)datazFailed to schedule timeout.r) rE job_queuerun_once_trigger_timeoutrjr&r]rrCrB)r?rr'r*rr)j_queuerFs r4rz!ConversationHandler._schedule_jobs   K!++G292B2B%%))01A6;X_`3C3D  . /  K   ;c  J J KsA A B )BB ct|tsy|js |jry|jr |j sy|j r |jsy|jr |jsy|jr#|jr|jjsy|j|}|jj|}d}t|trtj!d|j#r|j%}|j&9|j(j+r|jj-|dd}n|j/|||jj|}nX|j0j|j2g}|D],}|j5|}||dus|j2|||fcSytj!dt7|t7|d}| |j8r0|j:D]} | j5|}||dus| }n|y|m|k|j0j|gD]} | j5|}||dus| }n/|j<D]} | j5|}||dus| }ny||||fS)a( Determines whether an update should be handled by this conversation handler, and if so in which state the conversation currently is. Args: update (:class:`telegram.Update` | :obj:`object`): Incoming update. Returns: :obj:`bool` Nz&Waiting for asyncio Task to finish ...Fz'Selecting conversation %s with state %s)rxr channel_postedited_channel_postrgrrhrrirrrrRgetr6rCrr=rHr8r9rBpoprrdrb check_updaterrfrcre) r?r*rrcheckrGhandlershandler_rz entry_point candidatefallbacks r4rz ConversationHandler.check_updates&&)   &"<"< ==!6!6 ==!6!6   F$9$9  T]]6;P;P;X;XmmF###'',"& e\ * MMB Czz|mmo??*uzz/C/C/E''++C6 E&&sC0 //33C8E ;;??4<<< (BH$11&9E(U%-?#||S(EAAB ?S3u:V)- =D..#00 #008$e);)G  =  ![[__UB7 !..v6$e);'G  !% H$11&9E(U%-?"*   c7E))r3z)Application[Any, CCT, Any, Any, Any, Any] check_resultc K|\}}}}d} |j4d{|jj|d} | | jdddd{|jt ur |j} n|j t ur |j } npt|jtr7|jj!|jjj} ntj|j} | r|j||||d{} n4|j|j|||||d|jd} |j4d{|j$r|j&t)dd n|j&j*j,st)d d net| t.j0r6|j|j3| |||||d|jd  n|j5| ||||dddd{t|j6t8rl| |j6vr^|j;|j<||| r$t!|j6j?| |j6j?| S||j@k7r|j;| ||| rt y77#1d{7swYxYw7#t $r} | j"} d} Yd} ~ d} ~ wwxYw77#1d{7swY xYww) aLSend the update to the callback for the current state and BaseHandler Args: check_result: The result from :meth:`check_update`. For this handler it's a tuple of the conversation state, key, handler, and the handler's check result. update (:class:`telegram.Update`): Incoming telegram update. application (:class:`telegram.ext.Application`): Application that originated the update. context (:class:`telegram.ext.CallbackContext`): The context as provided by the application. FNzConversationHandler:z:handle_update:non_blocking_cb) coroutiner*rkTzHIgnoring `conversation_timeout` because the Application has no JobQueue.ruzQIgnoring `conversation_timeout` because the Applications JobQueue is not running.z:handle_update:timeout_job)r*rk)!r\r]rschedule_removalrnr rOrxbotrdefaultsr get_value handle_update create_task update_idrrrjrr schedulerrunningrIrJrrrmrrrErrb)r?r*r'rr current_stater)rzhandler_check_resultraise_dp_handler_stop timeout_jobrnrrBs r4rz!ConversationHandler.handle_updates#&JVF '2F %** / /++//0@$GK&,,.  / / == ,MME [[ ,KKE   0[__5M5M5YOO,,22E **7==9E )*1*?*?K)=w+% (33%33 -A7"/0@0@/AA_` 4 ** b b((((0b#$%..88@@'#$  7<<8 ++22%{FGEU &3F4D4D3EE_` ,&&y+vwP`a1 b b4 d(($ /IASAS4S   txx)97 C$,T-?-?-C-CI-NOO%%)))4 4 DLL (   y*:G D ) (Y / / / / /,%& )!I$( ! ) b b b b bsMK0M/K6 MK3B2ML'L (9L!M1L42M5B:L9/ M:L7;B6M3M6L <K? =L M L L1L,&M,L11M7M9M ?M M Mrrzc||jk(r||jvr|j|=yyt|tjr4t |jj |||j|<y|p||jvrRt|t|jjndd|d|jd|jznddd ||j|<yy) Nr7rz returned state z, which is unknown to the ConversationHandler r|rtru) rErRrxrIrJr6rrdrreprcallbackr,rk)r?rrrzs r4rz!ConversationHandler._update_states  d)))'',* 7<< 0'3--11#6Y(D   $ " +:A:MtG,,556S`ab&&/[1*=AYY=R# /XZ)[[\^ !  (1D   $#r3clKtd|j}td|j}tj d|j |j }|j4d{|jj|j }||ur dddd{y|j|j =dddd{|jj|jg}|D]V}|j|j}|!|dus& |j|j|j||d{X|j%|j&|j y777#1d{7swYxYw7I#t $rt#ddYwxYww) zThis is run whenever a conversation has timed out. Also makes sure that all handlers which are in the :attr:`TIMEOUT` state and whose :meth:`BaseHandler.check_update` returns :obj:`True` is handled. r!r&z7Conversation timeout was triggered for conversation %s!NFzWApplicationHandlerStop in TIMEOUT state of ConversationHandler has no effect. Ignoring.rtru)r jobrrCrr)r(r\r]rrdr`rr*rr'rrrrE) r?rrctxtr( found_jobrrzrs r4rz$ConversationHandler._trigger_timeouts 5'++&1388< EtG\G\  00** 9 9))--d.C.CDI#  9 9 9 !!$"7"78  9 9;;??4<<4 G((5E U%%7 !// T%5%5u>N  488T%:%:;/ 9 9 9 9 9 9.G#$sA)F4+E:,F4/+F F4%E=&F4+F F4 E?A F4F4!+F F F*F4=F4?F4FF FF4FF1.F40F11F4r<)7r,r-r.r/r0rErintr1r`rbr rrr rrKrrLr r floatdtm timedeltarrrrpropertyrcsetterrrdrerfrhrgrirjrkrlrmrrrrrIrJrr_CheckUpdateTyperrrrr2r3r4r#r#ns9ObI&CsPGU3ZGU3Z?$!FJ" 8<*N(N;vsF':;<NVT+fc6.A"BCCDN FC$789 N  N  NNN'uUCMM-A'BCNsmNN VV^ 45Nd|N` # 0"d;vsF/B#CD""  f   VT+fc66I*J%KKL ]]__8__4 FC,? @Ab6bhbb#t## v (  $__a&aXaa$__a&aXaa!T!!dVddd* %s}},- .**   f  ! hsm [[]f]]] D  cFcxcc#xVV^(<=## v (  2(2 c< 788 92hv/6 << F     *    2KKFK K  K * K K0Y*6Y*h7G7L.MY*vbbAb's+ b  b &  bJY]11&51@H@U1 1.%rs&4!VVVC.?()<':LVHLH:9LL77+fc6>Q2RTZZ[ X*? @  '#,    )) )XQ <+fc6&9:Q