ó
    ych  ã                   óN   • S r SSKrSSKrSSKJr  SSKrSSKJr  S rS r	SS jr
g)	ae  Module that contains the command line app.

Why does this file exist, and why not put this in __main__?
  You might be tempted to import things from __main__ later, but that will
  cause problems: the code will get executed twice:
  - When you run `python -m sqlparse` python will execute
    ``__main__.py`` as a script. That means there won't be any
    ``sqlparse.__main__`` in ``sys.modules``.
  - When you import __main__ it will get executed again (as a module) because
    there's no ``sqlparse.__main__`` in ``sys.modules``.
  Also see (1) from http://click.pocoo.org/5/setuptools/#setuptools-integration
é    N)ÚTextIOWrapper)ÚSQLParseErrorc                  ó´  • / SQn [         R                  " SSSS9nUR                  S5        UR                  SSS	S
SS9  UR                  SS[        R                  S9  UR                  S5      nUR                  SSSSU SR                  SR                  S U  5       5      5      S9  UR                  SSSSU SR                  SR                  S U  5       5      5      S9  UR                  SSS S!S"S#/S$S9  UR                  S%S&S'S(S)S*9  UR                  S+S,S-S'S(S.S*9  UR                  S/S0S1[        S2S39  UR                  S4S5S'S(S6S*9  UR                  S7S8S'S(S9S*9  UR                  S:S;S'S(S<S=9  UR                  S>S?S'S(S@S=9  UR                  SASBSC[        SDS39  UR                  SESFS([        SGS39  UR                  SHSIS([        SJS39  UR                  SKSLSMSNSO9  U$ )PN)ÚupperÚlowerÚ
capitalizeÚ	sqlformatzEFormat FILE according to OPTIONS. Use "-" as FILE to read from stdin.z%(prog)s  [OPTIONS] FILE, ...)ÚprogÚdescriptionÚusageÚfilenamez-oz	--outfileÚoutfileÚFILEz)write output to FILE (defaults to stdout))ÚdestÚmetavarÚhelpz	--versionÚversion)Úactionr   zFormatting Optionsz-kz
--keywordsÚCHOICEÚkeyword_casez,change case of keywords, CHOICE is one of {}z, c              3   óD   #   • U  H  nS R                  U5      v •  M     g7f©z"{}"N©Úformat©Ú.0Úxs     ÚU/var/www/djangovue.mamus.xyz/django/venv/lib/python3.13/site-packages/sqlparse/cli.pyÚ	<genexpr>Ú create_parser.<locals>.<genexpr>?   ó   é € Ð>²¨1�f—m‘m A×&Ð&²ùó   ‚ )r   r   Úchoicesr   z-iz--identifiersÚidentifier_casez/change case of identifiers, CHOICE is one of {}c              3   óD   #   • U  H  nS R                  U5      v •  M     g7fr   r   r   s     r   r   r    G   r!   r"   z-lz
--languageÚLANGÚoutput_formatÚpythonÚphpzJoutput a snippet in programming language LANG, choices are "python", "php"z--strip-commentsÚstrip_commentsÚ
store_trueFzremove comments)r   r   Údefaultr   z-rz
--reindentÚreindentzreindent statementsz--indent_widthÚindent_widthé   z(indentation width (defaults to 2 spaces))r   r,   Útyper   z--indent_after_firstÚindent_after_firstz2indent after first line of statement (e.g. SELECT)z--indent_columnsÚindent_columnsz<indent all columns by indent_width instead of keyword lengthz-az--reindent_alignedz%reindent statements to aligned format)r   r,   r   z-sz--use_space_around_operatorsz*place spaces around mathematical operatorsz--wrap_afterÚ
wrap_afterr   z*Column after which lists should be wrappedz--comma_firstÚcomma_firstz-Insert linebreak before comma (default False)z	--compactÚcompactz2Try to produce more compact output (default False)z
--encodingÚencodingzutf-8z*Specify the input encoding (default utf-8))r   r,   r   )
ÚargparseÚArgumentParserÚadd_argumentÚsqlparseÚ__version__Úadd_argument_groupr   ÚjoinÚintÚbool)Ú_CASE_CHOICESÚparserÚgroups      r   Úcreate_parserrC       sÔ  € Ú4€Mä×$Ò$Øð*à-ñ	€Fð ×Ñ˜
Ô#à
×ÑØˆkØØØ8ð	 ñ :ð ×ÑØØÜ×$Ñ$ð ñ &ð
 ×%Ñ%Ð&:Ó;€Eà	×ÑØˆlØØØØ;×BÑBØ�I‰IÑ>±Ó>Ó>ó@ð ñ Að 
×ÑØˆoØØØØ>×EÑEØ�I‰IÑ>±Ó>Ó>ó@ð ñ Að 
×ÑØˆlØØØ˜5Ð!ð+ð ñ ,ð 
×ÑØØØØØð ñ  ð 
×ÑØˆlØØØØ"ð ñ $ð 
×ÑØØØÜØ7ð ñ 9ð 
×ÑØØ!ØØØAð ñ Cð 
×ÑØØØØØKð ñ Mð 
×ÑØÐ"ØØØ4ð	 ñ 6ð 
×ÑØÐ,ØØØ9ð	 ñ ;ð 
×ÑØØØÜØ9ð ñ ;ð 
×ÑØØØÜØ<ð ñ >ð 
×ÑØØØÜØAð ñ Cð 
×ÑØØØØ9ð	 ñ ;ð €Mó    c                 ó`   • [         R                  R                  SR                  U 5      5        g)z5Print msg and optionally exit with return code exit_.z[ERROR] {}
é   )ÚsysÚstderrÚwriter   )Úmsgs    r   Ú_errorrK   ž   s"   € ä‡J�J×Ñ�^×*Ñ*¨3Ó/Ô0ØrD   c                 ó¢  • [        5       nUR                  U 5      n U R                  S:X  aN  [        [        R
                  R                  U R                  S9n UR                  5       nUR                  5         OG [        U R                  U R                  S9 nSR                  UR                  5       5      nS S S 5        SnU R                   (       a#   [        U R                   SU R                  S9nSnO[        R"                  n[%        U 5      n [&        R(                  R+                  U5      n[&        R                  " W40 UD6n	UR/                  U	5        UR1                  5         U(       a  UR3                  5         g
! UR                  5         f = f! , (       d  f       Nä= f! [         a/  n[        SR                  U R                  U5      5      s S nA$ S nAff = f! [         a/  n[        SR                  U R                   U5      5      s S nA$ S nAff = f! [,         a$  n[        S	R                  U5      5      s S nA$ S nAff = f)NÚ-)r6   Ú zFailed to read {}: {}FÚwTzFailed to open {}: {}zInvalid options: {}r   )rC   Ú
parse_argsr   r   rG   ÚstdinÚbufferr6   ÚreadÚdetachÚopenr=   Ú	readlinesÚOSErrorrK   r   r   ÚstdoutÚvarsr:   Ú	formatterÚvalidate_optionsr   rI   ÚflushÚclose)
ÚargsrA   ÚwrapperÚdataÚfÚeÚclose_streamÚstreamÚformatter_optsÚss
             r   Úmainrg   ¤   sÅ  € Ü‹_€FØ×Ñ˜TÓ"€Dà‡}�}˜ÓÜ¤§	¡	× 0Ñ 0¸4¿=¹=ÑIˆð	Ø—<‘<“>ˆDà�N‰NÕð	BÜ�d—m‘m¨d¯m©mÒ<ÀØ—w‘w˜qŸ{™{›}Ó-�÷ =ð €LØ‡|‡|ð	KÜ˜$Ÿ,™,¨°d·m±mÑDˆFØ‰Lô —‘ˆä˜$“Z€Nð7Ü!×+Ñ+×<Ñ<¸^ÓLˆô 	�Š˜Ñ/ Ñ/€AØ
‡L�L�„OØ
‡L�L„NÞØ�‰ŒØøð= �N‰NÕú÷ =Õ<ûäó 	BÜØ'×.Ñ.¨t¯}©}¸aÓ@óBõ Bûð	Bûô ó 	KÜÐ1×8Ñ8¸¿¹ÀqÓIÓJÕJûð	Kûô ó 7ÜÐ+×2Ñ2°1Ó5Ó6Õ6ûð7ús„   ÁF Á;F( Â FÂ9F( Ã!G$ ÄH  ÆFÆ
F%Æ!F( Æ%F( Æ(
G!Æ2$GÇG!ÇG!Ç$
HÇ.$HÈHÈHÈ 
IÈ*I	ÉIÉ	I)N)Ú__doc__r7   rG   Úior   r:   Úsqlparse.exceptionsr   rC   rK   rg   © rD   r   Ú<module>rl      s,   ðñó Û 
Ý ã Ý -ò
{ò|õ'rD   