+
    rpÐj|&  ã                   ó  € ^ RI Ht ^ RIHtHt ^ RIHtHt ^ RIH	t	 ]'       d   ^ RI
Ht ^ RIHt ^t ! R R]	4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )é    )Úabsolute_import)ÚTYPE_CHECKINGÚList)ÚImageÚ	ImageDraw)ÚQRModuleDrawer)ÚStyledPilImage)ÚActiveWithNeighborsc                   ó0   a € ] tR t^t o RtV 3R ltRtV tR# )ÚStyledPilQRModuleDrawerzå
A base class for StyledPilImage module drawers.

NOTE: the color that this draws in should be whatever is equivalent to
black in the color space, and the specified QRColorMask will handle adding
colors as necessary to the image
c                ó$   <€ V ^8„  d   Qh/ R;R&   # )é   r	   Úimg© )ÚformatÚ__classdict__s   "€ÚW/opt/hermes/.venv/lib/python3.14/site-packages/qrcode/image/styles/moduledrawers/pil.pyÚ__annotate__Ú$StyledPilQRModuleDrawer.__annotate__   s   ø‡ ‚ ð 
Ñò ó    r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s   ø‡ € ñ÷ ƒ r   r   c                   óH   a a€ ] tR t^t oRtV 3R ltV3R lR ltRtVtV ;t	# )ÚSquareModuleDrawerz%
Draws the modules as simple squares
c                ó†   <€ \         SV `  ! V/ VB  \        P                  ! V P                  P
                  4      V n        R # ©N)ÚsuperÚ
initializer   ÚDrawr   Ú_imgÚimgDraw©ÚselfÚargsÚkwargsÚ	__class__s   &*,€r   r$   ÚSquareModuleDrawer.initialize#   s-   ø€ Ü‰Ò˜DÐ+ FÒ+Ü —~’~ d§h¡h§m¡mÓ4ˆŽr   c                ó    <€ V ^8„  d   QhRS[ /# ©r   Ú	is_active©Úbool)r   r   s   "€r   r   ÚSquareModuleDrawer.__annotate__'   s   ø€ ÷ Cñ C¡tñ Cr   c                óz   € V'       d3   V P                   P                  WP                  P                  R 7       R# R# )©ÚfillN)r'   Ú	rectangler   Úpaint_color©r)   Úboxr0   s   &&&r   ÚdrawrectÚSquareModuleDrawer.drawrect'   s)   € ßØ�L‰L×"Ñ" 3¯X©X×-AÑ-AÐ"ÖBñ r   )r'   )
r   r   r   r   r   r$   r;   r   r   Ú__classcell__©r,   r   s   @@r   r    r       s!   ù‡ € ñõ5÷C÷ Cð Cr   r    c                   óR   a a€ ] tR t^,t oRtRR ltV 3R ltV3R lR ltRtVt	V ;t
# )ÚGappedSquareModuleDrawerz©
Draws the modules as simple squares that are not contiguous.

The size_ratio determines how wide the squares are relative to the width of
the space they are printed in
c                ó   € Wn         R # r"   )Ú
size_ratio)r)   rB   s   &&r   Ú__init__Ú!GappedSquareModuleDrawer.__init__4   s   € Ø$Žr   c                óú   <€ \         SV `  ! V/ VB  \        P                  ! V P                  P
                  4      V n        ^V P                  ,
          V P                  P                  ,          ^,          V n	        R# )é   N)
r#   r$   r   r%   r   r&   r'   rB   Úbox_sizeÚdeltar(   s   &*,€r   r$   Ú#GappedSquareModuleDrawer.initialize7   sQ   ø€ Ü‰Ò˜DÐ+ FÒ+Ü —~’~ d§h¡h§m¡mÓ4ˆŒØ˜$Ÿ/™/Õ)¨T¯X©X×->Ñ->Õ>ÀÕBˆŽ
r   c                ó    <€ V ^8„  d   QhRS[ /# r/   r1   )r   r   s   "€r   r   Ú%GappedSquareModuleDrawer.__annotate__<   s   ø€ ÷ Kñ K¡tñ Kr   c                ó~  € V'       dµ   V^ ,          ^ ,          V P                   ,           V^ ,          ^,          V P                   ,           V^,          ^ ,          V P                   ,
          V^,          ^,          V P                   ,
          3pV P                  P                  W0P                  P                  R7       R# R# ©r   r5   N)rH   r'   r7   r   r8   )r)   r:   r0   Úsmaller_boxs   &&& r   r;   Ú!GappedSquareModuleDrawer.drawrect<   s‚   € ßà�A•�q•	˜DŸJ™JÕ&Ø�A•�q•	˜DŸJ™JÕ&Ø�A•�q•	˜DŸJ™JÕ&Ø�A•�q•	˜DŸJ™JÕ&ð	ˆKð �L‰L×"Ñ" ;·X±X×5IÑ5IÐ"ÖJñ r   )rH   r'   rB   ©gš™™™™™é?)r   r   r   r   r   rC   r$   r;   r   r   r=   r>   s   @@r   r@   r@   ,   s'   ù‡ € ñô%õC÷
K÷ Kð Kr   r@   c                   óL   a a€ ] tR t^Gt oRtRtV 3R ltV3R lR ltRtVt	V ;t
# )ÚCircleModuleDrawerz
Draws the modules as circles
Nc                ó  <€ \         SV `  ! V/ VB  V P                  P                  pV\        ,          p\
        P                  ! V P                  P                  WD3V P                  P                  P                  4      V n
        \        P                  ! V P                  4      P                  ^ ^ WD3V P                  P                  R7       V P                  P                  W33\
        P                   P"                  4      V n
        R# rM   )r#   r$   r   rG   ÚANTIALIASING_FACTORr   ÚnewÚmodeÚ
color_maskÚ
back_colorÚcircler   r%   Úellipser8   ÚresizeÚ
ResamplingÚLANCZOS)r)   r*   r+   rG   Ú	fake_sizer,   s   &*,  €r   r$   ÚCircleModuleDrawer.initializeN   sÄ   ø€ Ü‰Ò˜DÐ+ FÒ+Ø—8‘8×$Ñ$ˆØÔ2Õ2ˆ	Ü—i’iØ�H‰H�M‰MØÐ"Ø�H‰H×Ñ×*Ñ*ó
ˆŒô
 	�Š�t—{‘{Ó#×+Ñ+Ø��9Ð(¨t¯x©x×/CÑ/Cð 	,ô 	
ð —k‘k×(Ñ(¨(Ð)=¼u×?OÑ?O×?WÑ?WÓXˆŽr   c                ó    <€ V ^8„  d   QhRS[ /# r/   r1   )r   r   s   "€r   r   ÚCircleModuleDrawer.__annotate__\   s   ø€ ÷ Eñ E¡tñ Er   c                ó¶   € V'       dQ   V P                   P                  P                  V P                  V^ ,          ^ ,          V^ ,          ^,          34       R# R# ©r   N)r   r&   ÚpasterY   r9   s   &&&r   r;   ÚCircleModuleDrawer.drawrect\   s;   € ßØ�H‰H�M‰M×Ñ §¡¨c°!­f°Q­i¸¸Q½À½Ð-CÖDñ r   )rY   )r   r   r   r   r   rY   r$   r;   r   r   r=   r>   s   @@r   rR   rR   G   s)   ù‡ € ñð €FõY÷E÷ Eð Er   rR   c                   ó\   a a€ ] tR t^at oRtRtR	R ltV 3R ltR tV3R lR lt	Rt
VtV ;t# )
ÚRoundedModuleDrawera8  
Draws the modules with all 90 degree corners replaced with rounded edges.

radius_ratio determines the radius of the rounded edges - a value of 1
means that an isolated module will be drawn as a circle, while a value of 0
means that the radius of the rounded edge will be 0 (and thus back to 90
degrees again).
Tc                ó   € Wn         R # r"   )Úradius_ratio)r)   ri   s   &&r   rC   ÚRoundedModuleDrawer.__init__m   s   € Ø(Ör   c                óž   <€ \         SV `  ! V/ VB  \        V P                  P                  ^,          4      V n        V P                  4        R# ©r   N)r#   r$   Úintr   rG   Úcorner_widthÚsetup_cornersr(   s   &*,€r   r$   ÚRoundedModuleDrawer.initializep   s=   ø€ Ü‰Ò˜DÐ+ FÒ+Ü §¡× 1Ñ 1°AÕ 5Ó6ˆÔØ×ÑÖr   c                ó$  € V P                   P                  pV P                   P                  P                  pV P                   P                  p\
        P                  ! WP                  V P                  3V4      V n        V P                  \        ,          pV P                  V,          pV^,          p\
        P                  ! WV3V4      p\        P                  ! V4      pVP                  ^ ^ Wf3VR7       VP                  V^ WD3VR7       VP                  ^ WTV3VR7       VP                  V P                  V P                  3\
        P                   P"                  4      V n        V P$                  P'                  \
        P(                  P*                  4      V n        V P$                  P'                  \
        P(                  P.                  4      V n        V P$                  P'                  \
        P(                  P2                  4      V n        R# ©r   r5   N)r   rV   rW   rX   r8   r   rU   rn   ÚSQUARErT   ri   r   r%   rZ   r7   r[   r\   r]   ÚNW_ROUNDÚ	transposeÚ	TransposeÚFLIP_TOP_BOTTOMÚSW_ROUNDÚ
ROTATE_180ÚSE_ROUNDÚFLIP_LEFT_RIGHTÚNE_ROUND)	r)   rV   rX   Úfront_colorÚ
fake_widthÚradiusÚdiameterÚbaseÚ	base_draws	   &        r   ro   Ú!RoundedModuleDrawer.setup_cornersu   s�  € Ø�x‰x�}‰}ˆØ—X‘X×(Ñ(×3Ñ3ˆ
Ø—h‘h×*Ñ*ˆÜ—i’iØ×$Ñ$ d×&7Ñ&7Ð8¸+ó
ˆŒð ×&Ñ&Ô)<Õ<ˆ
Ø×"Ñ" ZÕ/ˆØ˜A•:ˆÜ�yŠyØ˜zÐ*¨Jó
ˆô —N’N 4Ó(ˆ	Ø×Ñ˜1˜a Ð4¸;ÐÔGØ×Ñ˜V Q¨
Ð?ÀkÐÔRØ×Ñ˜Q °JÐ?ÀkÐÔRØŸ™Ø×Ñ × 1Ñ 1Ð2´E×4DÑ4D×4LÑ4Ló
ˆŒð Ÿ™×/Ñ/´·±×0OÑ0OÓPˆŒØŸ™×/Ñ/´·±×0JÑ0JÓKˆŒØŸ™×/Ñ/´·±×0OÑ0OÓPˆŽr   c                óD   <€ V ^8„  d   QhRS[ S[ S[,          ,          RR/# )r   r:   r0   r
   )r   rm   )r   r   s   "€r   r   Ú RoundedModuleDrawer.__annotate__Ž   s(   ø€ ÷ Lñ L™D¡¡c¥�Oð LÐ8Mñ Lr   c                ó
  € V'       g   R # VP                   '       * ;'       d    VP                  '       * pVP                  '       * ;'       d    VP                  '       * pVP                  '       * ;'       d    VP                  '       * pVP                  '       * ;'       d    VP                   '       * pV'       d   V P                  MV P
                  pV'       d   V P                  MV P
                  pV'       d   V P                  MV P
                  p	V'       d   V P                  MV P
                  p
V P                  P                  P                  Wq^ ,          ^ ,          V^ ,          ^,          34       V P                  P                  P                  W�^ ,          ^ ,          V P                  ,           V^ ,          ^,          34       V P                  P                  P                  W‘^ ,          ^ ,          V P                  ,           V^ ,          ^,          V P                  ,           34       V P                  P                  P                  W¡^ ,          ^ ,          V^ ,          ^,          V P                  ,           34       R # r"   )ÚWÚNÚEÚSrt   rs   r|   rz   rx   r   r&   rd   rn   )r)   r:   r0   Ú
nw_roundedÚ
ne_roundedÚ
se_roundedÚ
sw_roundedÚnwÚneÚseÚsws   &&&        r   r;   ÚRoundedModuleDrawer.drawrectŽ   s�  € ßÙà"Ÿ™”_×8Ð8¨Y¯[©[¬ˆ
Ø"Ÿ™”_×8Ð8¨Y¯[©[¬ˆ
Ø"Ÿ™”_×8Ð8¨Y¯[©[¬ˆ
Ø"Ÿ™”_×8Ð8¨Y¯[©[¬ˆ
ç(ˆT�]Š]¨d¯k©kˆß(ˆT�]Š]¨d¯k©kˆß(ˆT�]Š]¨d¯k©kˆß(ˆT�]Š]¨d¯k©kˆØ�‰�‰×Ñ˜B Q¥¨¥¨C°­F°1­IÐ 6Ô7Ø�‰�‰×Ñ˜B Q¥¨¥¨T×->Ñ->Õ!>ÀÀAÅÀqÅ	Ð JÔKØ�‰�‰×ÑØ�Q•˜•˜T×.Ñ.Õ.°°Aµ°qµ	¸D×<MÑ<MÕ0MÐNô	
ð 	�‰�‰×Ñ˜B Q¥¨¥¨C°­F°1­I¸×8IÑ8IÕ,IÐ JÖKr   )r|   rt   rz   rs   rx   rn   ri   )rF   )r   r   r   r   r   Úneeds_neighborsrC   r$   ro   r;   r   r   r=   r>   s   @@r   rg   rg   a   s3   ù‡ € ñð €Oô)õò
Q÷2L÷ Lð Lr   rg   c                   ó\   a a€ ] tR t^£t oRtRtR	R ltV 3R ltR tV3R lR lt	Rt
VtV ;t# )
ÚVerticalBarsDrawerz¼
Draws vertically contiguous groups of modules as long rounded rectangles,
with gaps between neighboring bands (the size of these gaps is inversely
proportional to the horizontal_shrink).
Tc                ó   € Wn         R # r"   )Úhorizontal_shrink)r)   r˜   s   &&r   rC   ÚVerticalBarsDrawer.__init__¬   s   € Ø!2Ör   c                ó  <€ \         SV `  ! V/ VB  \        V P                  P                  ^,          4      V n        \        ^V P                  ,
          V P
                  ,          4      V n        V P                  4        R# rl   )	r#   r$   rm   r   rG   Úhalf_heightr˜   rH   Úsetup_edgesr(   s   &*,€r   r$   ÚVerticalBarsDrawer.initialize¯   s_   ø€ Ü‰Ò˜DÐ+ FÒ+Ü˜tŸx™x×0Ñ0°1Õ4Ó5ˆÔÜ˜!˜d×4Ñ4Õ4¸×8HÑ8HÕHÓIˆŒ
Ø×ÑÖr   c                óÖ  € V P                   P                  pV P                   P                  P                  pV P                   P                  pV P
                  pV^,          p\        WPP                  ,          4      p\        P                  ! WV3V4      V n
        V\        ,          pV\        ,          p\        P                  ! WV3V4      p	\        P                  ! V	4      p
V
P                  ^ ^ Wx^,          3VR7       V	P                  Wd3\        P                   P"                  4      V n        V P$                  P'                  \        P(                  P*                  4      V n        R# rr   )r   rV   rW   rX   r8   r›   rm   r˜   r   rU   rs   rT   r   r%   rZ   r[   r\   r]   Ú	ROUND_TOPru   rv   rw   ÚROUND_BOTTOM)r)   rV   rX   r}   ÚheightÚwidthÚshrunken_widthr~   Úfake_heightr�   r‚   s   &          r   rœ   ÚVerticalBarsDrawer.setup_edgesµ   s  € Ø�x‰x�}‰}ˆØ—X‘X×(Ñ(×3Ñ3ˆ
Ø—h‘h×*Ñ*ˆà×!Ñ!ˆØ˜•
ˆÜ˜U×%;Ñ%;Õ;Ó<ˆÜ—i’i °vÐ&>ÀÓLˆŒàÔ0Õ0ˆ
ØÔ2Õ2ˆÜ�yŠyØ˜{Ð+¨Zó
ˆô —N’N 4Ó(ˆ	Ø×Ñ˜1˜a ¸1­_Ð=ÀKÐÔPàŸ™ nÐ%=¼u×?OÑ?O×?WÑ?WÓXˆŒØ ŸN™N×4Ñ4´U·_±_×5TÑ5TÓUˆÖr   c                ó   <€ V ^8„  d   QhRR/# ©r   r0   r
   r   )r   r   s   "€r   r   ÚVerticalBarsDrawer.__annotate__Ê   ó   ø€ ÷ ñ Ð'<ñ r   c                óR  € V'       Ed   VP                   '       * pVP                  '       * pV'       d   V P                  MV P                  pV'       d   V P                  MV P                  pV P
                  P                  P                  WQ^ ,          ^ ,          V P                  ,           V^ ,          ^,          34       V P
                  P                  P                  Wa^ ,          ^ ,          V P                  ,           V^ ,          ^,          V P                  ,           34       R# R# rc   )
rˆ   rŠ   rŸ   rs   r    r   r&   rd   rH   r›   )r)   r:   r0   Útop_roundedÚbottom_roundedÚtopÚbottoms   &&&    r   r;   ÚVerticalBarsDrawer.drawrectÊ   s¼   € ßˆ9à'Ÿk™kœ/ˆKØ!*§¡œ_ˆNç$/�$—.’.°T·[±[ˆCß*8�T×&Ò&¸d¿k¹kˆFØ�H‰H�M‰M×Ñ ¨!¥f¨Q¥i°$·*±*Õ&<¸cÀ!½fÀQ½iÐ%HÔIØ�H‰H�M‰M×ÑØ˜Q� � T§Z¡ZÕ/°°Qµ¸µ¸T×=MÑ=MÕ1MÐNöñ r   )r    rŸ   rs   rH   r›   r˜   rP   ©r   r   r   r   r   r”   rC   r$   rœ   r;   r   r   r=   r>   s   @@r   r–   r–   £   s0   ù‡ € ñð €Oô3õòV÷*÷ ð r   r–   c                   ó\   a a€ ] tR t^Øt oRtRtR	R ltV 3R ltR tV3R lR lt	Rt
VtV ;t# )
ÚHorizontalBarsDrawerz¼
Draws horizontally contiguous groups of modules as long rounded rectangles,
with gaps between neighboring bands (the size of these gaps is inversely
proportional to the vertical_shrink).
Tc                ó   € Wn         R # r"   )Úvertical_shrink)r)   r´   s   &&r   rC   ÚHorizontalBarsDrawer.__init__á   s   € Ø.Ör   c                ó  <€ \         SV `  ! V/ VB  \        V P                  P                  ^,          4      V n        \        ^V P                  ,
          V P
                  ,          4      V n        V P                  4        R# rl   )	r#   r$   rm   r   rG   Ú
half_widthr´   rH   rœ   r(   s   &*,€r   r$   ÚHorizontalBarsDrawer.initializeä   s\   ø€ Ü‰Ò˜DÐ+ FÒ+Ü˜dŸh™h×/Ñ/°!Õ3Ó4ˆŒÜ˜!˜d×2Ñ2Õ2°d·o±oÕEÓFˆŒ
Ø×ÑÖr   c                óØ  € V P                   P                  pV P                   P                  P                  pV P                   P                  pV P
                  pV^,          p\        WPP                  ,          4      p\        P                  ! WV3V4      V n
        V\        ,          pV\        ,          p\        P                  ! WV3V4      p	\        P                  ! V	4      p
V
P                  ^ ^ V^,          V3VR7       V	P                  WF3\        P                   P"                  4      V n        V P$                  P'                  \        P(                  P*                  4      V n        R# rr   )r   rV   rW   rX   r8   r·   rm   r´   r   rU   rs   rT   r   r%   rZ   r[   r\   r]   Ú
ROUND_LEFTru   rv   r{   ÚROUND_RIGHT)r)   rV   rX   r}   r¢   r¡   Úshrunken_heightr~   r¤   r�   r‚   s   &          r   rœ   Ú HorizontalBarsDrawer.setup_edgesê   s  € Ø�x‰x�}‰}ˆØ—X‘X×(Ñ(×3Ñ3ˆ
Ø—h‘h×*Ñ*ˆà—‘ˆØ˜•ˆÜ˜f×';Ñ';Õ;Ó<ˆÜ—i’i ¨oÐ&>ÀÓLˆŒàÔ0Õ0ˆ
ØÔ2Õ2ˆÜ�yŠyØ˜{Ð+¨Zó
ˆô —N’N 4Ó(ˆ	Ø×Ñ˜1˜a ¨a¥°Ð=ÀKÐÔPàŸ+™+ uÐ&>Ä×@PÑ@P×@XÑ@XÓYˆŒØŸ?™?×4Ñ4´U·_±_×5TÑ5TÓUˆÖr   c                ó   <€ V ^8„  d   QhRR/# r§   r   )r   r   s   "€r   r   Ú!HorizontalBarsDrawer.__annotate__ÿ   r©   r   c                óR  € V'       Ed   VP                   '       * pVP                  '       * pV'       d   V P                  MV P                  pV'       d   V P                  MV P                  pV P
                  P                  P                  WQ^ ,          ^ ,          V^ ,          ^,          V P                  ,           34       V P
                  P                  P                  Wa^ ,          ^ ,          V P                  ,           V^ ,          ^,          V P                  ,           34       R# R# rc   )
r‡   r‰   rº   rs   r»   r   r&   rd   rH   r·   )r)   r:   r0   Úleft_roundedÚright_roundedÚleftÚrights   &&&    r   r;   ÚHorizontalBarsDrawer.drawrectÿ   sº   € ßˆ9à(Ÿ{™{œ?ˆLØ )§¡œOˆMç&2�4—?’?¸¿¹ˆDß(5�D×$Ò$¸4¿;¹;ˆEØ�H‰H�M‰M×Ñ ¨1¥v¨a¥y°#°aµ&¸µ)¸d¿j¹jÕ2HÐ&IÔJØ�H‰H�M‰M×ÑØ˜A�˜q�	 D§O¡OÕ3°S¸µV¸AµYÀÇÁÕ5KÐLöñ r   )rº   r»   rs   rH   r·   r´   rP   r°   r>   s   @@r   r²   r²   Ø   s0   ù‡ € ñð €Oô/õòV÷*÷ ð r   r²   N)Ú
__future__r   Útypingr   r   Úqrcode.compat.pilr   r   Ú&qrcode.image.styles.moduledrawers.baser   Úqrcode.image.styledpilr	   Úqrcode.mainr
   rT   r   r    r@   rR   rg   r–   r²   r   r   r   Ú<module>rÌ      s†   ðå &ç &ç .Ý AçÝ5Ý/ð Ð ô	˜nô 	ôCÐ0ô CôKÐ6ô Kô6EÐ0ô Eô4?LÐ1ô ?LôD2Ð0ô 2ôj2Ð2ö 2r   