Ë
    D<TfÃ  ã                   ó„  — d Z ddlZddlZddlZddlmZmZmZmZm	Z	m
Z
 ddlZddlmZmZ ej                  j!                  d«      rddlZ ej$                  «        dddd	d
ddœZej(                  ej*                  ej,                  ej.                  dœZdd„Zdede
e   fd„Zdefd„Zddee   defd„Zedk(  r e«        yy)zÑ
qr - Convert stdin (or the first argument) to a QR Code.

When stdout is a tty the QR Code is printed to the terminal and when stdout is
a pipe to a file an image is written. The default image format is PNG.
é    N)ÚDictÚIterableÚNoReturnÚOptionalÚSetÚType)Ú	BaseImageÚDrawerAliases)ÚwinÚcygwinzqrcode.image.pil.PilImagezqrcode.image.pure.PyPNGImagezqrcode.image.svg.SvgImagez!qrcode.image.svg.SvgFragmentImagezqrcode.image.svg.SvgPathImagezqrcode.image.pure.PymagingImage)ÚpilÚpngÚsvgzsvg-fragmentzsvg-pathÚpymaging)ÚLÚMÚQÚHc                 ó¢  ‡— | €t         j                  dd  } ddlm}  |d«      j                  }t        j                  t        xs dj                  «       |¬«      Šdt        dt        fˆfd	„}‰j                  d
dt        t        «      › d�¬«       ‰j                  ddt        «       › d�¬«       ‰j                  dt        d¬«       ‰j                  ddt!        t"        j%                  «       «      dd¬«       ‰j                  ddd¬«       ‰j                  dd¬«       ‰j'                  | «      \  }} |j(                  r7t        j+                  |j(                  |j(                  «      }	 t-        |«      }nd }t1        j2                  t"        |j"                     ¬«      }| r| d   }	|	j5                  d¬ «      }	n(t         j6                  j8                  j;                  «       }	|j<                  €|j?                  |	«       n|j?                  |	|j<                  ¬!«       |j@                  rA|jC                  «       }
tE        |j@                  d"«      5 }|
jG                  |«       d d d «       y |€[tI        jJ                  t         jL                  jO                  «       «      s|jP                  r|jS                  |jP                   ¬#«       y i }tU        |jV                  d$d «      }|jX                  rU|s |d%«       |jX                  |vr  ||jX                  › d&t        |«      › �«       ||jX                     \  }} |d(i |¤Ž|d'<    |jB                  d(i |¤Ž}
t         jL                  j[                  «        |
jG                  t         jL                  j8                  «       y # t.        $ r} |t        |«      «       Y d }~�ŒCd }~ww xY w# 1 sw Y   y xY w))Né   r   )Úget_distributionÚqrcodeÚ )ÚusageÚversionÚmsgÚreturnc                 ó(   •— ‰j                  | «       ‚ ©N)Úerror)r   Úparsers    €úUC:\Users\user\Documents\project_loop\venv\Lib\site-packages\qrcode/console_scripts.pyÚraise_errorzmain.<locals>.raise_error1   s   ø€ Ø�‰�SÔØó    z	--factoryz‘Full python path to the image factory class to create the image with. You can use the following shortcuts to the built-in image factory classes: ú.)Úhelpz--factory-drawerzUse an alternate drawer. z
--optimizezŸOptimize the data by looking for chunks of at least this many characters that could use a more efficient encoding method. Use 0 to turn off chunk optimization.)Útyper&   z--error-correctionÚchoicer   z^The error correction level to use. Choices are L (7%), M (15%, default), Q (25%), and H (30%).)r'   ÚchoicesÚdefaultr&   z--asciiz'Print as ascii even if stdout is piped.Ú
store_true)r&   Úactionz--outputzLThe output file. If not specified, the image is sent to the standard output.)Úerror_correctionÚimage_factoryÚsurrogateescape)Úerrors)ÚoptimizeÚwb)ÚttyÚdrawer_aliasesz+The selected factory has no drawer aliases.z$ factory drawer not found. Expected Úmodule_drawer© ).ÚsysÚargvÚpkg_resourcesr   r   ÚoptparseÚOptionParserÚ__doc__ÚstripÚstrr   Ú
add_optionÚcommasÚdefault_factoriesÚget_drawer_helpÚintÚsortedr-   ÚkeysÚ
parse_argsÚfactoryÚgetÚget_factoryÚ
ValueErrorr   ÚQRCodeÚencodeÚstdinÚbufferÚreadr1   Úadd_dataÚoutputÚ
make_imageÚopenÚsaveÚosÚisattyÚstdoutÚfilenoÚasciiÚprint_asciiÚgetattrr.   Úfactory_drawerÚflush)Úargsr   r   r#   ÚoptsÚmoduler.   ÚeÚqrÚdataÚimgÚoutÚkwargsÚaliasesÚ
drawer_clsÚdrawer_kwargsr!   s                   @r"   Úmainrj   (   s„  ø€ Ø€|Ü�x‰x˜˜ˆ|ˆÝ.á˜xÓ(×0Ñ0€GÜ×"Ñ"¬'ª-°R×)>Ñ)>Ó)@È'ÔR€Fðœð ¤õ ð ×ÑØð+ä+1Ô2CÓ+DÐ*EÀQðHð ô ð ×ÑØØ(¬Ó):Ð(;¸1Ð=ð ô ð ×ÑØÜðAð ô ð ×ÑØØÜÔ'×,Ñ,Ó.Ó/Øð2ð ô ð ×ÑØÐAÈ,ð ô ð ×ÑØðð ô ð ×"Ñ" 4Ó(�J€Dˆ$à‡|‚|Ü"×&Ñ& t§|¡|°T·\±\ÓBˆð	 Ü'¨Ó/‰Mð ˆä	�‰Ü)¨$×*?Ñ*?Ñ@Ø#ô
€Bñ
 Ø�A‰wˆØ�{‰{Ð"3ˆ{Ó4‰ä�y‰y×Ñ×$Ñ$Ó&ˆØ‡}�}ÐØ
�‰�DÕà
�‰�D 4§=¡=ˆÔ1à‡{‚{Ø�m‰m‹oˆÜ�$—+‘+˜tÓ$ð 	¨Ø�H‰H�SŒM÷	ð 	ð Ð ¤b§i¡i´·
±
×0AÑ0AÓ0CÔ&DÈÏ
Ê
Ø�N‰N 4§:¡:˜~ˆNÔ.ØàˆÜ+2Ø×ÑÐ.°ó,
ˆð ×ÒÙÙÐIÔJØ×"Ñ"¨'Ñ1ÙØ×*Ñ*Ð+ð ,!Ü!'¨£Ð 1ð3ôð )0°×0CÑ0CÑ(DÑ%ˆJ˜Ù&0Ñ&A°=Ñ&AˆF�?Ñ#Øˆb�m‰mÑ%˜fÑ%ˆä�
‰
×ÑÔØ�‰”—‘×"Ñ"Õ#øô] ò 	 Ùœ˜A›×Òûð	 ú÷,	ð 	ús$   Å,N ÉOÎ	OÎ&N=Î=OÏOr`   r   c                 ó€   — d| vrt        d«      ‚| j                  dd«      \  } }t        | i i |g«      }t        ||«      S )Nr%   z+The image factory is not a full python pathr   )rJ   ÚrsplitÚ
__import__r[   )r`   ÚnameÚimps      r"   rI   rI   Ž   sI   € Ø
�&ÑÜÐFÓGÐGØ—=‘=  aÓ(�L€FˆDÜ
�V˜R  d VÓ
,€CÜ�3˜ÓÐr$   c                  óH  — i } t         j                  «       D ]U  \  }}	 t        |«      }t	        |dd «      }|sŒ"| j                  t        |«      t        «       «      }|j                  |«       ŒW dj                  d„ | j                  «       D «       «      S # t        $ r Y Œ‰w xY w)Nr4   z. c              3   óF   K  — | ]  \  }}d t        |d«      › d|› �–— Œ y­w)zFor Úandz, use: N)r@   )Ú.0rg   Ú	factoriess      r"   ú	<genexpr>z"get_drawer_help.<locals>.<genexpr>£   s1   è ø€ ò áˆG�Yð Œv�i Ó'Ð(¨°¨yÔ9ñùs   ‚!)
rA   ÚitemsrI   ÚImportErrorr[   Ú
setdefaultr@   ÚsetÚaddÚjoin)r&   Úaliasr`   Úimagerg   rt   s         r"   rB   rB   –   s¥   € Ø€DÜ*×0Ñ0Ó2ò 	‰ˆˆvð	Ü Ó'ˆEô ,3°5Ð:JÈDÓ+QˆÙØØ—O‘O¤F¨7£O´S³UÓ;ˆ	Ø�‰�eÕð	ð �9‰9ñ à"&§*¡*£,ôó ð øô ò 	Ùð	ús   žBÂ	B!Â B!rv   c                 ó‚   — t        | «      } | syt        | «      dk(  r| d   S dj                  | d d «      › d|› d| d   › �S )Nr   r   r   z, éÿÿÿÿú )ÚtupleÚlenr{   )rv   Újoiners     r"   r@   r@   ©   sP   € Ü�%‹L€EÙØÜ
ˆ5ƒz�Q‚Ø�Q‰xˆØ�i‰i˜˜c˜r˜
Ó#Ð$ A f X¨Q¨u°R©y¨kÐ:Ð:r$   Ú__main__r   )Úor)r<   r:   rU   r7   Útypingr   r   r   r   r   r   r   Úqrcode.image.baser	   r
   ÚplatformÚ
startswithÚcoloramaÚinitrA   ÚERROR_CORRECT_LÚERROR_CORRECT_MÚERROR_CORRECT_QÚERROR_CORRECT_Hr-   rj   r>   rI   rB   r@   Ú__name__r6   r$   r"   ú<module>r‘      sã   ðñó Û 	Û 
ß @× @ã ß 6ð ‡<�<×ÑÐ,Ô-Ûà€H‡M�M„Oð 'Ø)Ø&Ø7Ø/à1ñÐ ð 
×	Ñ	Ø	×	Ñ	Ø	×	Ñ	Ø	×	Ñ	ñ	Ð óc$ðL˜ð   Y¡ó ð˜ó ñ&;�(˜3‘-ð ;°ó ;ð ˆzÒÙ…Fð r$   