+
    ÁFñjù#  ã                   óä   € R t ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RIHtH	t	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ]'       d   ^ R
IHt ]
! R4      t ! R R]]]]3,          4      tR# )z4This module contains the CallbackQueryHandler class.N)ÚCallable)ÚMatchÚPattern)ÚTYPE_CHECKINGÚAnyÚTypeVarÚcast)ÚUpdate)ÚDEFAULT_TRUE)ÚDVType)ÚBaseHandler)ÚCCTÚHandlerCallback)ÚApplicationÚRTc                   ót   a a€ ] tR t^'t oRtR	tRR]3V3R lV 3R llltV3R lR ltV3R lR lt	R	t
VtV ;t# )
ÚCallbackQueryHandlera»  Handler class to handle Telegram
:attr:`callback queries <telegram.Update.callback_query>`. Optionally based on a regex.

Read the documentation of the :mod:`re` module for more information.

Note:
    * If your bot allows arbitrary objects as
      :paramref:`~telegram.InlineKeyboardButton.callback_data`, it may happen that the
      original :attr:`~telegram.InlineKeyboardButton.callback_data` for the incoming
      :class:`telegram.CallbackQuery` can not be found. This is the case when either a
      malicious client tempered with the :attr:`telegram.CallbackQuery.data` or the data was
      simply dropped from cache or not persisted. In these
      cases, an instance of :class:`telegram.ext.InvalidCallbackData` will be set as
      :attr:`telegram.CallbackQuery.data`.

      .. versionadded:: 13.6

    * If neither :paramref:`pattern` nor :paramref:`game_pattern` is set, `any`
      ``CallbackQuery`` will be handled. If only :paramref:`pattern` is set, queries with
      :attr:`~telegram.CallbackQuery.game_short_name` will `not` be considered and vice versa.
      If both patterns are set, queries with either :attr:
      `~telegram.CallbackQuery.game_short_name` or :attr:`~telegram.CallbackQuery.data`
      matching the defined pattern will be handled

      .. versionadded:: 21.5

Warning:
    When setting :paramref:`block` to :obj:`False`, you cannot rely on adding custom
    attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info.

Args:
    callback (:term:`coroutine function`): The callback function for this handler. Will be
        called when :meth:`check_update` has determined that an update should be processed by
        this handler. Callback signature::

            async def callback(update: Update, context: CallbackContext)

        The return value of the callback is usually ignored except for the special case of
        :class:`telegram.ext.ConversationHandler`.
    pattern (:obj:`str` | :func:`re.Pattern <re.compile>` | :obj:`callable` | :obj:`type`,             optional):
        Pattern to test :attr:`telegram.CallbackQuery.data` against. If a string or a regex
        pattern is passed, :func:`re.match` is used on :attr:`telegram.CallbackQuery.data` to
        determine if an update should be handled by this handler. If your bot allows arbitrary
        objects as :paramref:`~telegram.InlineKeyboardButton.callback_data`, non-strings will
        be accepted. To filter arbitrary objects you may pass:

        - a callable, accepting exactly one argument, namely the
          :attr:`telegram.CallbackQuery.data`. It must return :obj:`True` or
          :obj:`False`/:obj:`None` to indicate, whether the update should be handled.
        - a :obj:`type`. If :attr:`telegram.CallbackQuery.data` is an instance of that type
          (or a subclass), the update will be handled.

        If :attr:`telegram.CallbackQuery.data` is :obj:`None`, the
        :class:`telegram.CallbackQuery` update will not be handled.

        .. seealso:: :wiki:`Arbitrary callback_data <Arbitrary-callback_data>`

        .. versionchanged:: 13.6
           Added support for arbitrary callback data.
    game_pattern (:obj:`str` | :func:`re.Pattern <re.compile>` | optional)
        Pattern to test :attr:`telegram.CallbackQuery.game_short_name` against. If a string or
        a regex pattern is passed, :func:`re.match` is used on
        :attr:`telegram.CallbackQuery.game_short_name` to determine if an update should be
        handled by this handler.

        .. versionadded:: 21.5
    block (:obj:`bool`, optional): Determines whether the return value of the callback should
        be awaited before processing the next handler in
        :meth:`telegram.ext.Application.process_update`. Defaults to :obj:`True`.

        .. seealso:: :wiki:`Concurrency`

Attributes:
    callback (:term:`coroutine function`): The callback function for this handler.
    pattern (:func:`re.Pattern <re.compile>` | :obj:`callable` | :obj:`type`): Optional.
        Regex pattern, callback or type to test :attr:`telegram.CallbackQuery.data` against.

        .. versionchanged:: 13.6
           Added support for arbitrary callback data.
    game_pattern (:func:`re.Pattern <re.compile>`): Optional.
        Regex pattern to test :attr:`telegram.CallbackQuery.game_short_name`
    block (:obj:`bool`): Determines whether the return value of the callback should be
        awaited before processing the next handler in
        :meth:`telegram.ext.Application.process_update`.

Nc                óô   <€ V ^8„  d   QhRRRS[ S[S[S[3,          RS[S[S[,          ,          S[,          S[S[.S[	3,          ,          R,          RS[S[S[,          ,          R,          RS[
S[	,          /# )é   ÚselfzCallbackQueryHandler[CCT, RT]ÚcallbackÚpatternNÚgame_patternÚblock)r   r	   r   r   Ústrr   Útyper   ÚobjectÚboolr   )ÚformatÚ__classdict__s   "€Úa/opt/hermes-site/venv/lib/python3.14/site-packages/telegram/ext/_handlers/callbackqueryhandler.pyÚ__annotate__Ú!CallbackQueryHandler.__annotate__‚   s‚   ø€ ÷ Dñ DØ-ðDá!¡&©#©r /Õ2ðDñ ‘w™s•|Õ#¡dÕ*©X±v°hÁ°nÕ-EÕEÈÕLðDñ ™G¡C�LÕ(¨4Õ/ð	Dñ
 ‘d�|ñDó    c                ó`  <€ \         SV `  WR 7       \        V4      '       d(   \        P                  ! V4      '       d   \        R4      h\        V\        4      '       d   \        P                  ! V4      p\        V\        4      '       d   \        P                  ! V4      pW n
        W0n        R# ))r   zQThe `pattern` must not be a coroutine function! Use an ordinary function instead.N)ÚsuperÚ__init__ÚcallableÚasyncioÚiscoroutinefunctionÚ	TypeErrorÚ
isinstancer   ÚreÚcompiler   r   )r   r   r   r   r   Ú	__class__s   &&&&&€r    r&   ÚCallbackQueryHandler.__init__‚   sƒ   ø€ ô 	‰Ñ˜ÐÔ/ä�G×Ò¤×!<Ò!<¸W×!EÒ!EÜØcóð ô �gœs×#Ò#Ü—j’j Ó)ˆGä�l¤C×(Ò(ÜŸ:š: lÓ3ˆLØT[ŒØ7CÖr#   c                óD   <€ V ^8„  d   QhRS[ RS[S[ ,          R,          /# )r   ÚupdateÚreturnN)r   r   )r   r   s   "€r    r!   r"   —   s$   ø€ ÷ )ñ )¡6ð )©d±V­m¸dÕ.Bñ )r#   c                ó  € \        V\        4      '       d   VP                  '       g   R# VP                  P                  pVP                  P                  p\        V P                  V P                  .4      '       g   R# V'       d¼   V P                  '       g   R# \        V P                  \        4      '       d   \        W P                  4      # \        V P                  4      '       d   V P                  V4      # \        V\        4      '       g   R# \        P                  ! V P                  V4      ;p'       d   V#  R# V'       dC   V P                  '       g   R# \        P                  ! V P                  V4      ;p'       d   V#  R# R# )z¼Determines whether an update should be passed to this handler's :attr:`callback`.

Args:
    update (:class:`telegram.Update` | :obj:`object`): Incoming update.

Returns:
    :obj:`bool`

NTF)r+   r	   Úcallback_queryÚdataÚgame_short_nameÚanyr   r   r   r'   r   r,   Úmatch)r   r1   Úcallback_datar6   r8   s   &&   r    Úcheck_updateÚ!CallbackQueryHandler.check_update—   s+  € ô ˜6¤6×*Ò*¨v×/D×/DÐ/DÙà×-Ñ-×2Ñ2ˆØ ×/Ñ/×?Ñ?ˆä�D—L‘L $×"3Ñ"3Ð4×5Ò5Ù÷ Ø—<—<�<ÙÜ˜$Ÿ,™,¬×-Ò-Ü! -·±Ó>Ð>Ü˜Ÿ™×%Ò%Ø—|‘| MÓ2Ð2Ü˜m¬S×1Ò1ÙÜŸš §¡¨}Ó=Ð=ˆuÖ=Ø�ð >ñ ÷ Ø×$×$Ð$ÙÜŸš ×!2Ñ!2°OÓDÐDˆuÖDØ�ð Eñ ñ r#   c          
      óT   <€ V ^8„  d   QhRS[ RS[RRRS[S[S[,          ,          RR/# )r   Úcontextr1   Úapplicationz)Application[Any, CCT, Any, Any, Any, Any]Úcheck_resultr2   N)r   r	   r   r   r   )r   r   s   "€r    r!   r"   Â   sG   ø€ ÷ -ñ -áð-ñ ð-ð Að	-ñ
 ™U¡3�ZÕ'ð-ð 
ñ-r#   c                óV   € V P                   '       d   \        RV4      pV.Vn        R# R# )z�Add the result of ``re.match(pattern, update.callback_query.data)`` to
:attr:`CallbackContext.matches` as list with one element.
r   N)r   r   Úmatches)r   r=   r1   r>   r?   s   &&&&&r    Úcollect_additional_contextÚ/CallbackQueryHandler.collect_additional_contextÂ   s'   € ð �<�<ˆ<Ü ¨Ó6ˆLØ+˜nˆGŽOñ r#   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r
   r&   r:   rB   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r.   r   s   @@r    r   r   '   sF   ù‡ € ñVðp ,€Ið
 PTØ26Ø*÷Dõ D÷*)ð )÷V-÷ -ð -r#   r   )rH   r(   r,   Úcollections.abcr   r   r   Útypingr   r   r   r   Útelegramr	   Útelegram._utils.defaultvaluer
   Útelegram._utils.typesr   Ú"telegram.ext._handlers.basehandlerr   Útelegram.ext._utils.typesr   r   Útelegram.extr   r   r   © r#   r    Ú<module>rV      sS   ðñ& ;ã Û 	Ý $ß ß 4Ó 4å Ý 5Ý (Ý :ß :çÝ(áˆTƒ]€ôg-˜; v¨s°B Õ7ö g-r#   