L i >dZddlmZmZddlmZddlmZddlm Z ddl m Z ddl m Z Gdd e ZGd d e ZGd d e ZGddeZGddeZGddeZGddeZGddeZGdde Zy)z8This module contains objects that represent story areas.)FinalOptional) constants) ReactionType)TelegramObject)enum)JSONDictcTeZdZdZdZdddedededed ed ed eed dffd ZxZ S)StoryAreaPositiona|Describes the position of a clickable area within a story. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if all of their attributes are equal. .. versionadded:: 22.1 Args: x_percentage (:obj:`float`): The abscissa of the area's center, as a percentage of the media width. y_percentage (:obj:`float`): The ordinate of the area's center, as a percentage of the media height. width_percentage (:obj:`float`): The width of the area's rectangle, as a percentage of the media width. height_percentage (:obj:`float`): The height of the area's rectangle, as a percentage of the media height. rotation_angle (:obj:`float`): The clockwise rotation angle of the rectangle, in degrees; 0-:tg-const:`~telegram.constants.StoryAreaPositionLimit.MAX_ROTATION_ANGLE`. corner_radius_percentage (:obj:`float`): The radius of the rectangle corner rounding, as a percentage of the media width. Attributes: x_percentage (:obj:`float`): The abscissa of the area's center, as a percentage of the media width. y_percentage (:obj:`float`): The ordinate of the area's center, as a percentage of the media height. width_percentage (:obj:`float`): The width of the area's rectangle, as a percentage of the media width. height_percentage (:obj:`float`): The height of the area's rectangle, as a percentage of the media height. rotation_angle (:obj:`float`): The clockwise rotation angle of the rectangle, in degrees; 0-:tg-const:`~telegram.constants.StoryAreaPositionLimit.MAX_ROTATION_ANGLE`. corner_radius_percentage (:obj:`float`): The radius of the rectangle corner rounding, as a percentage of the media width. )corner_radius_percentageheight_percentagerotation_anglewidth_percentage x_percentage y_percentageN api_kwargsrrrr rr rreturnc,t||||_||_||_||_||_||_|j|j|j|j |j |jf|_|jyNr) super__init__rrrr rr _id_attrs_freeze) selfrrrr rr r __class__s Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_storyarea.pyrzStoryAreaPosition.__init__Ms J/#/#/'7(9%3/G%        ! !  " "     ) )   ) __name__ __module__ __qualname____doc__ __slots__floatrr r __classcell__rs@rr r sr#JI$*.  !   #(X& rr cfeZdZdZdZ d dddedeedeedeed eed df fd ZxZ S) LocationAddressaDescribes the physical address of a location. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`country_code`, :attr:`state`, :attr:`city` and :attr:`street` are equal. .. versionadded:: 22.1 Args: country_code (:obj:`str`): The two-letter ``ISO 3166-1 alpha-2`` country code of the country where the location is located. state (:obj:`str`, optional): State of the location. city (:obj:`str`, optional): City of the location. street (:obj:`str`, optional): Street address of the location. Attributes: country_code (:obj:`str`): The two-letter ``ISO 3166-1 alpha-2`` country code of the country where the location is located. state (:obj:`str`): Optional. State of the location. city (:obj:`str`): Optional. City of the location. street (:obj:`str`): Optional. Street address of the location. )city country_codestatestreetNrr*r+r)r,rrct||||_||_||_||_|j|j|j|j f|_|jyr)rrr*r+r)r,rr)rr*r+r)r,rrs rrzLocationAddress.__init__s] J/!-$) #' %+ ++TZZDKKP r)NNN rr r!r"r#strrr rr%r&s@rr(r(ksy0rrct|tj||j 5||_||_||_|j|j |j f|_ dddy#1swYyxYwN)r2r) rrr1r3 _unfrozenr?r@r>r2r)rr?r@r>rrs rrzStoryAreaTypeLocation.__init__so m44L ^^  H#+DM$-DN6=DL"iiGDN  H H Hs >A88B)N) rr r!r"r#r$rr(r rr%r&s@rr=r=sj*5I .2 H *. HHH/* H X& H HHrr=c ZeZdZdZdZ d dddedeedeedeed df fd Z xZ S) StoryAreaTypeSuggestedReactiona Describes a story area pointing to a suggested reaction. Currently, a story can have up to :tg-const:`~telegram.constants.StoryAreaTypeLimit.MAX_SUGGESTED_REACTION_AREAS` suggested reaction areas. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`reaction_type`, :attr:`is_dark` and :attr:`is_flipped` are equal. .. versionadded:: 22.1 Args: reaction_type (:class:`ReactionType`): Type of the reaction. is_dark (:obj:`bool`, optional): Pass :obj:`True` if the reaction area has a dark background. is_flipped (:obj:`bool`, optional): Pass :obj:`True` if reaction area corner is flipped. Attributes: type (:obj:`str`): Type of the area, always :tg-const:`~telegram.StoryAreaType.SUGGESTED_REACTION`. reaction_type (:class:`ReactionType`): Type of the reaction. is_dark (:obj:`bool`): Optional. Pass :obj:`True` if the reaction area has a dark background. is_flipped (:obj:`bool`): Optional. Pass :obj:`True` if reaction area corner is flipped. )is_dark is_flipped reaction_typeNrrHrFrGrrct|tj||j 5||_||_||_|j|j |j |jf|_ dddy#1swYyxYwrB) rrr1r4rCrHrFrGr2r)rrHrFrGrrs rrz'StoryAreaTypeSuggestedReaction.__init__sx m>>:V ^^  \/rgs&?"+3 *JJZ+n+\-N-`'HM'HT-\]-\`3 3D*^=*^Z!4m!4H  r