QfV ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z e jZ ddlZ ddlZgdZGddeZGddeZexZZdZdZdZdZd Zd Zd Zd Zd ZdZdZ dZ!dZ"dZ#ejHe"Z%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-d Z.dZ/dZ0dZ1ejHe0Z2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:d Z;dZd Z?dZ@d ZAdZBd ZCd!ZDd"ZEdZFdZGd ZHd#ZId$ZJd%ZKd&ZLd'ZMejHeLZNdZOdZPdZQdZRdZSdZTdZUdZVd ZWdZXdZYdZZd(Z[d)Z\ejHe[Z]d*Z^d+Z_ejHe^Z`dZadZbdZcdZddZedZfdZgdZhd ZidZjd,Zkejd-Zmd.Znd/Zod0Zpd1Zqd2Zrd3ZsGd4d5etZudavd6Zwd7ZxGd8d9ZyGd:d;Zzidd<dd=dd>dd>dd>dd>dd?dd@d dAddBdd?d dCd dDd"dEdFdGdHdIdJdKZ{dLZ|d]dMZ}dNZ~GdOdPZGdQdRZGdSdTejZGdUdVejZGdWdXZGdYdZeZd]d[Zdd\lmZmZy#e $rdZ ejZ Y$wxYw#e $rdZY-wxYw#e $rdZY6wxYw)^N) BadZipFile BadZipfileerror ZIP_STORED ZIP_DEFLATED ZIP_BZIP2ZIP_LZMA is_zipfileZipInfoZipFile PyZipFile LargeZipFilePathc eZdZy)rN__name__ __module__ __qualname__7/opt/alt/python312/lib64/python3.12/zipfile/__init__.pyrr'srrc eZdZy)rNrrrrrr+srri -.?s<4s4H2LHsPK z<4s4B4HL2L5H2LsPK  @iz <4s2B4HL2L2HsPKz<4sLQLsPKz <4sQ2H2L4QsPKiPK t|ry y#t$rYywxYw)NTF) _EndRecDataOSErrorfps r_check_zipfilerHs2 r?      s  c d} t|drt|}|St|d5}t|}ddd|S#1swY|SxYw#t$rY|SwxYw)NFreadrFrb)hasattrrHopenrE)filenameresultrGs rr r swF 8V $#x0F M h%'+& M & M   M s2A A AAA A A AAc  |j|tz d|jt}t |tk7r|St j t|\}}}}|tk7r|S|dk7s|dkDr td|j|tz tz d|jt}t |tk7r|St j t|\ }}} } } } } }}}|tk7r|S||t<| |t<| |t<| |t <||t"<||t$<||t&<|S#t$r|cYSwxYw)Nr"rr!z3zipfiles that span multiple disks are not supported)seeksizeEndCentDir64LocatorrErJr6structr5structEndArchive64LocatorstringEndArchive64LocatorrsizeEndCentDir64structEndArchive64stringEndArchive64_ECD_SIGNATURE_ECD_DISK_NUMBER_ECD_DISK_START_ECD_ENTRIES_THIS_DISK_ECD_ENTRIES_TOTAL _ECD_SIZE _ECD_OFFSET)fpinoffsetendrecdatasigdisknoreloffdisksszcreate_version read_versiondisk_numdisk_dirdircount dircount2dirsize diroffsets r _EndRecData64rqsc &22A6 99, -D 4y++ !'/H$!OC ''  {eaiNOO IIf..1AA1E 99% &D 4y$$   ($/0C^\8X)Wi    !F>'F &F?%-F !"!*F F9#F; ME  sD>> E  E c |jdd|j} |jt d|j }t |tk(rt|ddt k(rh|dddk(r`tjt|}t|}|jd|j|tz t|t |St|dz tz d}|j|d|j }|jt }|dk\r|||tz}t |tk7ryttjt|}|t}||tz|tz|z}|j||j||zt|||z|z |Sy#t$rYywxYw)Nrr"r$sri)rQtellsizeEndCentDirrErJr6stringEndArchiverSr5structEndArchivelistr7rqmaxrfind_ECD_COMMENT_SIZE) r`filesizercrbmaxCommentStartr=recData commentSizecomments rrDrDsM  IIaOyy{H  >/1% 99;D D ^# Qq %% RS [ /6F|  c h/0TN?F;;(g.?COIIoq! 99;D JJ' (E zuU>12 w<> )fmm$4g>?./ u^+E.,@,LM g o-.T?U#:X#E#% % W sF>> G  G c |jtd}|dk\r|d|}tjdk7r2tj|vr |j tjd}tj rEtj dk7r2tj |vr |j tj d}|S)Nr/)findchrossepreplacealtsep)rN null_bytes r_sanitize_filenamerUsK  c!f%IA~Ai( vv}8+##BFFC0 yyRYY#%"))x*?##BIIs3 OrcReZdZ dZd dZdZd dZdZdZe d dd d Z d Z y)r ) orig_filenamerN date_time compress_type_compresslevelrr9 create_systemriextract_versionreserved flag_bitsvolume internal_attr external_attr header_offsetCRC compress_size file_size _raw_time _end_offsetc||_t|}||_||_|ddkr t dt |_d|_d|_d|_ tjdk(rd|_ nd|_ t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_y)Nrz+ZIP does not support timestamps before 1980rwin32r#)rrrNr ValueErrorrrrrr9sysplatformrDEFAULT_VERSIONrirrrrrrrrr)selfrNrs r__init__zZipInfo.__init__s%&h/  " Q<$ JK K("  <<7 "!"D "#D -.  rcd|jjd|jg}|jtk7r<|j dt j|j|jz|jdz }|jdz}|r'|j dtj|z|r|j d|z|j}|r |jr|j d|jz|r |jrJ|jtk7s|j|jk7r|j d |jz|j d d j|S) N) __class__rrNrrr7compressor_namesgetrstatfilemodeis_dirrrr8)rrOhiloisdirs r__repr__zZipInfo.__repr__s;'+~~'>'> NO    + MM-*..t/A/A/3/A/ACC D  2 %   & ( MM.4==+<< = MM.3 4  MM/DNN: ;$,,   : - ^^t11 1 MM-0B0BB C cwwvrNc |j}|ddz dz|ddzz|dz}|ddz|d dzz|ddzz}|jtzrdx}x}}n$|j}|j}|j }|j }d} ||tkDxs |tkD}|r>d } |tj| dtj| d z ||z}d }d }t} |jtk(rtt| } n#|jt k(rtt"| } t| |j$|_t| |j&|_|j)\} } tjt*t,|j$|j.| |j|||||t1| t1| } | | z|zS) Nrrr(r!r%r"r#r*r$z>5 5./ /C /-)((C ..MI  = +J}{/JE CFKK()6??3+?+A9m]]E"I&M'K    *m[9K   8 +lK8K";0D0DE!+t/B/BC"779)-/?!114==)!//'3*I ]CJ 8  5((rc |jjd|jfS#t$r1|jjd|jtzfcYSwxYw)Nasciiutf-8)rNencoderUnicodeEncodeError_MASK_UTF_FILENAMErs rrzZipInfo._encodeFilenameFlagss[ V==''0$..@ @! V==''0$..CU2UU U Vs&)7A#"A#c|j}tj}t|dk\r2|d|dd\}}|dzt|kDrt d||fz|dk(r|d|dz} |j dvrd}|d|dd\|_|dd}|j d k(rd }|d|dd\|_|dd}|jd k(rd }|d|dd\|_ne|dk(r`|d|dz} |d|dd\}} |dk(rC| |k(r>|ddjd} | rt| |_ nddl } | jdd||dzd}t|dk\r1yy#tj$rt d d dwxYw#tj$r} t d| d} ~ wt$r} t d| d} ~ wwxYw)Nr$r2z"Corrupt extra field %04x (size=%d)r!)lrz File sizezCorrupt unicode path extra field (0x7075): invalid utf-8 bytes)r9rSr5r6rrrrrdecoderrNwarningswarnUnicodeDecodeError) r filename_crcr9r5tplnrcfield up_version up_name_crcup_unicode_nameres r _decodeExtrazZipInfo._decodeExtras %jAoE5!9-FB!tc%j  !ER!PQQV|Qr!t}F~~)MM +*0tBQx*@#ABx))[8 /.4T48.D+*#ABx))[8 /.4T48.D+*vQr!t} n.4UD!H.E+J !Q;,+F*.qr(//'*B*,>,ODM+$MM*S`aMb "Q$%LEO%jAo&||F$'B(-wk&;q#ABajRVVRYY//abkGajRVVRYY//  sNGGY'!zzF2r9 EO   4 '  !jjEO rc  |jjdrytjjrM|jjtjj tjjfSy)NrTF)rNendswithrrrrrs rrzZipInfo.is_dirGsT@ == ! !# & 77>>==))277;;*GH Hr)NoNamerN) rrr __slots__rrrrr classmethodrrrrrr r hsJHI0  J,.)`V +!Z#D##J rr cLtdD]}|dzr |dz dz }|dz}|S)Nrr!l q[)range)crcrAs r_gen_crcrYs5 1X 7!8z)C AIC  Jrcdddt"tttt datfdfd|D] }| fd}|S)NixV4igE#ixV4c( |dz ||z dzz S)Nrr)chrcrctables rcrc32z_ZipDecrypter..crc32ss#6qHcBh$%6777rc\|dzzdzdzdzdzdz y)Nrrir!r)cr key0key1key2s r update_keysz"_ZipDecrypter..update_keyswsEQ~t $ 2y 1$ 2TRZ&rc t}|j}|D](}dz}|||dz zdz dzz}|||*t|S)Nr"r!rr) bytearrayr7bytes)rcrOr7r krrs r decrypterz _ZipDecrypter..decrypters_%AqA 1!9"d* *A N 1I  V}r) _crctablerxmaprr) pwdprr r rrrrs @@@@@@r _ZipDecrypterris^ D D DXuSz23 H8'A  rc$eZdZdZdZdZdZy)LZMACompressorcd|_yr)_comprs rrzLZMACompressor.__init__s  rc.tjdtji}tjtjtj tj|g|_tjdddt||zS)Nidfiltersz?FE4##$E 100..t/@/@/3/?/?!e)/LNKDL##AIJ/D ((.<<## rN)rrrrr7rrrr1r1s  rr1storeshrinkreduceimplodetokenizedeflate deflate64bzip2r$terselz77awavpackbppmdc|tk(ry|tk(rts tdy|tk(rt s tdy|t k(rts tdytd)Nz.Compression requires the (missing) zlib modulez-Compression requires the (missing) bz2 modulez.Compression requires the (missing) lzma modulez(That compression method is not supported) rrzlib RuntimeErrorrbz2r r$NotImplementedError) compressions r_check_compressionrNsj   $@B B  !?A A  @B B""LMMrcX|tk(rZ|%tj|tjdStjtjtjdS|t k(r+|t j|St jS|tk(r tSy)N) rrI compressobjDEFLATEDZ_DEFAULT_COMPRESSIONrrK BZ2Compressorr r)r compresslevels r_get_compressorrVs $  $##M4==#F F : :DMM3OO ) #  $$$]3 3  "" ( "rc4t||tk(ry|tk(rtjdS|t k(rt jS|tk(r tStj|}|rtd||fztd|fz)NrPzcompression type %d (%s)zcompression type %d) rNrrrI decompressobjrrKBZ2Decompressorr r1rrrL)rdescrs r_get_decompressorr[s}% " , &!!#&& ) #""$$ ( "!! $$]3 %&@MSXCY&YZ Z%&;}>N&NO Orc.eZdZdZdZddZddZdZy) _SharedFilecl||_||_||_||_||_|j |_yr)_file_pos_close_lock_writingseekable)rfileposcloselockwritings rrz_SharedFile.__init__ s0       rc|jSr)r`rs rrtz_SharedFile.tells yyrc |j5|jr td|jj |||jj |_|j cdddS#1swYyxYw)Nz}Can't reposition in the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rbrcrr_rQrtr`)rrawhences rrQz_SharedFile.seeksc ZZ}} "JKK JJOOFF + )DI99  ZZs A"A99Bc>|j5|jr td|jj |j |jj |}|jj|_|cdddS#1swYyxYw)NyCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rbrcrr_rQr`rJrtrnrcs rrJz_SharedFile.read!ss ZZ}} "JKK JJOODII &::??1%D )DI  ZZs A$rY{wxYw) NFrrrTrrr zBad password for file %r)'_fileobj_pwd_close_fileobjr_compress_typer_compress_leftr_leftr[ _decompressor_eof _readbuffer_offsetnewlinesmoderNnamerLr _expected_crcr  _running_crc _seekablerdrt_orig_compress_start_orig_compress_size_orig_file_size_orig_start_crc _orig_crcAttributeError _decrypterrrr_init_decrypterrJr)rrrrzipinfor close_fileobj check_bytehs rrzZipExtFile.__init__Us  +%33%33&& .t/B/BC    $$ 7E "!(D  %c D !%D  !,3LLN)+2+@+@('.'8'8$'+'8'8$!%!3!3!%   #<<%//14< &kkR/47 $$&AJ"#=@U@U#UVV     sA0F44 G?Gct|j|_|jj d}|xj dzc_|j|dS)Nrr*)rrrrrJr)rrs rrzZipExtFile._init_decryptersM' 2 ##B' r!v&r**rcd|jjd|jjg}|js{|j d|j d|j |jtk7rN|j dtj|j|jzn|j d|j ddj|S) Nr.z name=z mode=r [closed]rr) rrrclosedr7rrrrrrr8rrOs rrzZipExtFile.__repr__s"nn77"nn99;<{{ MM 499E F""j0 1.2243F3F373F3FHHI MM+ & cwwvrc |dkrP|jjd|jdz}|dkDr"|j|j|}||_|Stjj ||S)Nr r!)rrrioBufferedIOBasereadline)rlimitr>lines rrzZipExtFile.readliness 19  %%eT\\:Q>A1u'' a8     ))$66rcz |t|j|jz kDrp|j|}t||jkDr)||j|jdz|_d|_n|xjt|zc_|j|j|jdzS)Nri)r6rrrJ)rrpchunks rpeekzZipExtFile.peeksD s4##$t||3 3IIaLE5zDLL(#(4+;+;DLLM+J#J    E *  dllS.@AArc2|jr tdy)NI/O operation on closed file.T)rrrs rreadablezZipExtFile.readables ;;<= =rc |jr td||dkr`|j|jd}d|_d|_|js+||j |j z }|js+|S||jz}|t|jkr"|j|j|}||_|S|t|jz }|j|jd}d|_d|_|dkDri|js]|j |}|t|kr||_||_||d|z } |S||z }|t|z}|dkDr |js]|S)Nzread from closed file.rr)rrrrr_read1MAX_Nr6)rrpbufendrcs rrJzZipExtFile.readsp  ;;56 6 9A""4<<=1C"D DLiit{{4::..iiJ$,, T%%& &""4<<4CDLJ #d&&' 't||}- !eDII;;q>D3t9}#'   tBQx  4KC TNA!eDII rc|jyt||j|_|jr2|j|jk7rt d|j zyy)NzBad CRC-32 for file %r)rr rrrr)rnewdatas r _update_crczZipExtFile._update_crcs]    % !'4+<+<= 99**d.@.@@5 AB BA9rc ||dkrg|j|jd}d|_d|_|js2|j|j}|r||z } |S|js2|S||jz}|t |jkr"|j|j|}||_|S|t |jz }|j|jd}d|_d|_|dkDr[|jsO|j|}|t |kr||_||_||d|z } |S|r||z } |S|jsO|SNrr)rrrrrr6)rrprrcrs rread1zZipExtFile.read1scE 9A""4<<=1C"D DLii{{4::.4KCJ ii J$,, T%%& &""4<<4CDLJ #d&&' 't||}- q5ii{{1~s4y='+D$#$DL48OC 4KC ii rc|js|dkry|jtk(rE|jj}|t |kDr2||j |t |z z }n|j |}|jtk(r|jdk|_n|jtk(rt||j}|jj||}|jjxs(|jdkxr|jj |_|jre||jjz }nG|jj|}|jjxs|jdk|_|d|j}|xjt |zc_|jdkrd|_|j||S)NrrT)rrrrunconsumed_tailr6_read2rrry MIN_READ_SIZEr7r5r/rrros rrzZipExtFile._read1s 99Q   , .%%55D3t9} AD M22;;q>D   * ,++q0DI  L 0At))*A%%00q9D++//@,,1@!//??? Iyy**0022%%006D**..J$2E2E2JDIKTZZ  c$i ::?DI  rc:|jdkryt||j}t||j}|jj |}|xjt |zc_|st|j|j|}|Sr) rryrminrrJr6EOFErrorrros rrzZipExtFile._read2:s   ! # 4%% & 4&& '}}!!!$ s4y(N ?? &??4(D rc |jr|jjt| y#t| wxYwr)rrrgsuper)rrs rrgzZipExtFile.closeJs4 "" ##% GMOEGMOs &8AcH|jr td|jSNr)rrrrs rrdzZipExtFile.seekableQs ;;<= =~~rcL|jr td|jstjd|j }|t jk(r|}nG|t jk(r||z}n.|t jk(r|j|z}n td||jkDr |j}|dkrd}||z }||jz}|dk\r#|t|jkr ||_ d}n[|jtk(r|j |dkDr|d|_|t|j|jz z}|j$j'|t j|xj(|zc_d}d|_ d|_ n|dkr|j$j'|j*|j,|_|j0|_|j2|_|j|_d|_ d|_ t7|j|_d|_|}|j |j=|dkDr2t?|j@|}|jC|||z}|dkDr2|j S)Nzseek on closed file.!underlying stream is not seekablezCwhence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)rrF)"rrrrUnsupportedOperationrtrSEEK_SETSEEK_CURSEEK_ENDrrr6rrrrrrrQrrrrrrrr[rrrr MAX_SEEK_READrJ)rrarlcurr_posnew_pos read_offset buff_offsetread_lens rrQzZipExtFile.seekVsR ;;34 4~~))*MN N99; R[[ G r{{ "'G r{{ "**V3GCD D T)) )**G Q;G( !DLL0 !  c$2B2B.C C&DLK  J .4??3J{]^!%D  3t//04<<? ?K MM  {BKK 8 JJ+ %JK"D DL 1_ MM  t88 9 $ 4 4D !%D "&":":D --DJ"D DL!243F3F!GD DI!K*$$&Ao4--{;H IIh  8 #KAo yy{rc|jr td|jstjd|j |j z t|jz |jz}|S)Nztell on closed file.r) rrrrrrrr6rr)rfileposs rrtzZipExtFile.tells` ;;34 4~~))*MN N&&3c$:J:J6KKdllZr)NFrsr!)rrrrrrrrrrrrrJrrrrrgrdrrrQrt __classcell__rs@rrrGs EMM37$1Wh + 7 B !FC#J"H  #%++=~rrc@eZdZdZedZdZdZfdZxZ S) _ZipWriteFilec||_||_||_t|j|j |_d|_d|_d|_ yrx) _zinfo_zip64_zipfilerVrr _compressor _file_size_compress_size_crc)rzfrrs rrz_ZipWriteFile.__init__sL   *5+>+>+0+?+?A rc.|jjSr)rrGrs rrz_ZipWriteFile._fileobjs}}rcy)NTrrs rwritablez_ZipWriteFile.writablesrc|jr tdt|ttfr t |}nt |}|j}|xj|z c_t||j|_ |jr9|jj|}|xjt |z c_ |jj||Sr)rrrrrr6 memoryviewnbytesrr rrr,rrr{)rrcrs rr{z_ZipWriteFile.writes ;;<= = dUI. /YFd#D[[F 6!$ *   ##,,T2D   3t9 ,  D! rc |jry t| |jro|jj }|xj t |z c_|jj||j |j_ n|j|j_ |j|j_ |j|j_|js<|jt kDr t#d|j t kDr t#d|jj$t&zr|jrdnd}|jjt)j*|t,|jj|jj|jj|jj/|j0_n|jj/|j0_|jj5|jj6|jj|jj9|j|jj5|j0j2|j0j:j=|j|j|j0j>|jj@<d|j0_!y#d|j0_!wxYw)Nz*File size too large, try using force_zip64z0Compressed size too large, try using force_zip64z ' +/--*<*<*> ' ""4;;#<#<= ##DKK$:$:4;;$GH ""4==#:#:; MM " " ) )$++ 6=A[[DMM $ $T[[%9%9 :%*DMM "UDMM "s LL88M ) rrrrpropertyrrr{rgrrs@rrrs0  &++++rrc eZdZ dZdZdeddfddddZdZdZdZ d Z d Z d Z d#d Z d ZdZdZedZej&dZd#dZd$dddZd%dZd&dZd'dZedZdZdZ d'dZ d&dZd(dZdZ d Z!d!Z"d"Z#y))r NrT)rmetadata_encodingc |dvr tdt|||_d|_d|_i|_g|_||_||_||_ d|_ d|_ ||_ ||_ |jr|dk7r tdt|tj rtj"|}t|t$r;d|_||_dd d d d d d d}||} t+j,|| |_n d|_||_t3|dd|_d|_t7j8|_d|_d|_ |dk(r|jAy|dvrNd|_ |j.jC|_" |j.jG|jDy|dk(r7 |jA|j.jG|jDytd#t0$r| |vr|| } Y1wxYw#tHt0f$r d|_YywxYw#tHt0f$r+tK|j.|_d|_"d|_YywxYw#tL$rE|j.jGddd|_|j.jC|_"YywxYw#|j.} d|_|jO| xYw)N)rwxaz+ZipFile requires mode 'r', 'w', 'x', or 'a'Frrrz5metadata_encoding is only supported for reading filesrKw+bx+br+bwbxb)rrrrrrrTr!r)rrrr"z"Mode must be 'r', 'w', 'x', or 'a')(rrN _allowZip64 _didModifydebugrrrMrUrr_comment_strict_timestampsrrrrrstr _filePassedrNrrMrGrEgetattr _fileRefCnt threadingRLockrbrrc_RealGetContentsrtrrQrrvr_fpclose) rrerrM allowZip64rUrrmodeDictrrGs rrzZipFile.__init__ s  + +JK K;'%  &*  "3!2  ! !dckGI I dBKK (99T?D dC  D  DM"U%$T$@H~H ggdH5DG  D DG#D&$7DM__&  ' s{%%'##' /%)WW\\^DN/ T^^4 4))+GGLL0!!EFFc8+#+H#5  @+G4/)./'0+'0DG%&DN%*DN+ "4GGLLA&'+DO%)WW\\^DN4 BDG MM"  s*HK+ K7H:%H=K5I79 KHHH74K6H77K:7I41K3I44K7A KKKK'K/c|Srrrs r __enter__zZipFile.__enter__ls rc$|jyrrg)rtypevalue tracebacks r__exit__zZipFile.__exit__os  rcd|jjd|jjg}|jt|jr|j d|jzn*|j |j d|j z|j d|jzn|j d|j ddj|S) Nrrz file=%rz filename=%rz mode=%rrrr) rrrrGrr7rNrr8rs rrzZipFile.__repr__rs"nn77"nn99;< 77  j47723* nt}}<= MM*tyy0 1 MM+ & cwwvrc  |j} t|}|s td|jdkDr t ||t }|t}|t|_ |t|z |z }|ttk(r|ttzz}|jdkDr||z}t d|||||z|_|jdkr td|j!|jd|j#|}t%j&|}d}||kr|j#t(} t+| t(k7r tdt-j.t0| } | t2t4k7r td|jdkDr t | |j#| t6} t9| } | t:} | t<zr| j?d } n| j?|j@xsd } tC| } |j#| tD| _#|j#| tH| _%| tL| _'| dd \ | _(| _)| _*| _+| _,| _-}}| _.| _/| _0| jTtbkDrted | jTd z z| dd\| _3| _4| _5|| _6|dz dz|dz dz|dz|dz |dz dz|dzdzf| _7| jq| | jN|z| _'|jrju| | |jv| jx<|t(z| t6z| tDz| tHz}|jdkDr t d|||kr|j}t{|jrddD]}||_>|jN}y#t$r tdwxYw)NzFile is not a zip filer!r"zgiven, inferred, offsetrz Bad offset for central directoryzTruncated central directoryz&Bad magic number for central directoryrcp437rzzip file version %.1fr)r,r/r(rr%rr*r totalc|jSr)r)rs rz*ZipFile._RealGetContents..s e.A.ArT)keyreverse)?rGrDrErrprintr^r_ _ECD_COMMENTr _ECD_LOCATIONrYrXrVrRrrQrJrBytesIOsizeCentralDirr6rSr5structCentralDir _CD_SIGNATUREstringCentralDir_CD_FILENAME_LENGTHr  _CD_FLAG_BITSrrrr _CD_EXTRA_FIELD_LENGTHr9_CD_COMMENT_LENGTHr_CD_LOCAL_HEADER_OFFSETrrirrrrrrrrMAX_EXTRACT_VERSIONrLrrrrrrrr7rrNsortedr)rrGrbsize_cd offset_cdconcatinferredrcrcentdirrNorig_filename_crcflagsrtd end_offsetrs rrzZipFile._RealGetContentss= WW 7 _F56 6 ::> &M#;' |,  &09< . !%7 7 '*AA BF ::> )H +Y& I"V+ >>A ?@ @ "www ZZ goggn-G7|~- !>??mm$4g>G}%)99 !IJJzzA~gwww':;AG(: ;AO5zr t=d|t@tBzr|jEd} n|jEjFxsd} | |jHk7rt'd|jHd|d|jJC|jM|jNz|jJkDrt'd|jHd|j8tPz} | rQ|s jR}|r1t|tTs!tWdtY|jZz|st]d|zd}t_||||dS#|jaxYw)N>rrzopen() requires mode "r" or "w"rz'pwd is only supported for reading filesz2Attempt to use ZIP archive that was already closedrMrnr!cjSr)rcrsrrzZipFile.open..Qs $--rzTruncated file headerz Bad magic number for file header)rlz$compressed patched data (flag bit 5)zstrong encryption (flag bit 6)rrzFile name in directory z and header z differ.zOverlapped entries: z (possible zip bomb)rFz6File %r is encrypted, password required for extractionT)1rrGrr rMrrUrrD_open_to_writercrr]rrrbrJsizeFileHeaderr6rrSr5r _FH_SIGNATUREr_FH_FILENAME_LENGTH_FH_EXTRA_FIELD_LENGTHrQr_MASK_COMPRESSED_PATCHrL_MASK_STRONG_ENCRYPTION_FH_GENERAL_PURPOSE_FLAG_BITSrrrrrrtr_MASK_ENCRYPTEDrrrGrrrJrrg) rrrrrNrzef_filefheaderfname fname_str is_encrypteds ` rrMz ZipFile.open"s   z !>? ? DCKFG GwwDF F dG $E S[DME"&"2"2E #'#5#5E LL&E 3;&&u+&F F ==FG G Atww(;(;#}}djj:OQ4 mmN3G7|~- !899mm$4g>G}%)99 !CDDMM'*=">?E-. g&<=a H!77)*PQQ!88)*JKK458JJ!LL1 !LL)?)?)J7K E/// **E344!!- %"5"558I8II #78K8K7NNb!cdd!??_> GGLL ("gglln   e&&u-. T5%00rc |tj}ntj|}|j|||Sr)rgetcwdr_extract_member)rmemberrrs rextractzZipFile.extracts; <99;D99T?D##FD#66rc ||j}|tj}ntj|}|D]}|j |||yr)r5rrdrre)rrmembersrrs r extractallzZipFile.extractallsR ?mmoG <99;D99T?DG  $ 4rc |j}|s+d}tj|dt|z}||_|j |}d|j |D}|j d|D}|S)Nz:<>|"?*_c3>K|]}|jdyw)z .N)rstrip.0rs r z1ZipFile._sanitize_windows_name..sB+Aa188D>+Asc3&K|] }|s| ywrrros rrqz1ZipFile._sanitize_windows_name..s7'QQq's)!_windows_illegal_name_trans_tabler maketransr6 translatesplitr8)rrpathseptableillegals r_sanitize_windows_namezZipFile._sanitize_windows_namesuI55GMM'3W+=>E49C 1##E*B7==+AB,,7'77rc t|ts|j|}|jj dt j j}t j jrB|j t j jt j j}t j j|d}dt j jt j jft j jjfd|jt j jD}t j jdk(r*|j|t j j}|s|js t!dt j j||}t j j#|}t j j%|}|r4t j j'|st j(||jr6t j j+|st j,||S|j/||5}t/|d5}t1j2||dddddd|S#1swYxYw#1swY|SxYw) Nrr!rc3*K|] }|vr| ywrr)rprinvalid_path_partss rrqz*ZipFile._extract_member..s##C.H&'/A&A$%.Hs\zEmpty filename.)rr)rr rDrNrrrrrrcurdirpardirr8rvrzrrrdirnameexistsmakedirsrmkdirrMshutil copyfileobj) rrf targetpathrr upperdirssourcetargetr}s @rrezZipFile._extract_members &'*\\&)F//))#rww{{; 77>>oobggnnbggkkBG''$$W-a0 "''.."''..A''++""#CgmmBGGKK.H#CC 77;;$ 11'277;;GGv}}./ /WW\\*g6 WW%%j1 GGOOJ/ RWW^^I6 KK " ==?77==,$  YYv3Y '6 *d #v   vv .$($ #(s$5 K7K+K7+K4 0K77Lc |j|jvr$ddl}|jd|jzd|jdvr t d|j s t dt|j|js]d}t|jtk\rd}n+|jtkDrd }n|jtkDrd }|rt!|d zyy) NrzDuplicate name: %rr#rrrrz&write() requires mode 'w', 'x', or 'a'z4Attempt to write ZIP archive that was already closed Files countFilesizez Zipfile size would require ZIP64 extensions)rNrrrrrrGrNrrr6rZIP_FILECOUNT_LIMITrrrr)rrrrequires_zip64s rrbzZipFile._writechecksD >>T__ ,  MM.?AM N 99O +EF FwwFH H5../!N4==!%88!.;.!+$${2!/">#D$EFF rc0 |js td|jr tdtj |||j }|j r d|_d|_|j|y|||_ n|j|_ |||_ n|j|_ t|d5}|j|d5}tj ||dddddddy#1swYxYw#1swYyxYw)N7Attempt to write to ZIP archive that was already closedz>Can't write to ZIP archive while an open writing handle existsrrrKri )rGrrcr rrrrrrrrMrrUrMrr)rrNrrrUrsrcdests rr{z ZipFile.write%s wwIK K ==P !!(G484K4K"M <<>"#E EI JJu (&3#&*&6&6#('4$'+'9'9$h%diis.Ct""3f5/D%%.C.C%%s$D D/D D D  Dc t|tr|jd}t|tst|t j t jdd}|j |_|j|_ |jjdrd|_ |xjdzc_ n d|_ n|}|js td|jr td |||_|||_ t!||_|j$5|j'|d 5}|j)|ddddddy#1swYxYw#1swYyxYw) Nrr&)rNrriAr-r`rz?Can't write to ZIP archive while an open writing handle exists.r)r)rrrr rrrMrrUrrNrrrGrrcr6rrbrMr{)rzinfo_or_arcnamercrrUrrs rwritestrzZipFile.writestrFs@ 0 dC ;;w'D*G4%5&*nnTYY[&A"1&EGE"&"2"2E #'#5#5E ~~&&s+&3###t+#&1#$EwwIK K ==Q   $"/E   $#0E d) ZZ5s+t 4 ,Z++Zs$(E+<EE+E( $E++E4c t|tr|}|jstdt|tr^|}|j ds|dz }t|}d|_d|_d|zdzdz|_d|_ |xjdzc_n td|j5|jr%|jj|j|jj!|_|j$t&k(r|xj(t*zc_|j-|d|_|j0j3|||j4|j6<|jj9|j;d |jj!|_dddy#1swYyxYw) Nz/The given ZipInfo does not describe a directoryrri@rr-zExpected type str or ZipInfoTF)rr rrrrrrrrrGrbrrGrQrrtrrr rrarbrrr7rrNr{r)rzinfo_or_directory_namerrdirectory_names rrz ZipFile.mkdirose9 -w 7+E<<> !RSS / 54N!**3/#%N+E"#E EI$+dNf#<"CE EO   4 ' :; ; ZZ~~ T^^,"&'',,.E ""h.#::   U #"DO MM  '.3DOOENN + GGMM%**51 2!WW\\^DNZZs 4DGGc& |jyrrrs r__del__zZipFile.__del__s@ rc |jy|jr td |jdvrb|jrV|j 5|j r%|jj|j|jddd|j}d|_|j|y#1swY.xYw#|j}d|_|j|wxYw)NzvCan't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.r) rGrcrrrrbrrQr_write_end_recordrrys rrgz ZipFile.closes  77?  ==PQ Q yyO+ZZ~~ T^^4**, BDG MM"  Z BDG MM" s$&C AB<C<CC&C.c |jD]}|j}|ddz dz|ddzz|dz}|ddz|d dzz|ddzz}g}|jtkDs|jtkDr;|j |j|j |jd }d }n|j}|j}|j tkDr|j |j d }n |j }|j} d} |rHt| d } tjd d t|zzddt|zg|| z} t} |jtk(rtt | } n#|jt"k(rtt$| } t| |j&} t| |j(} |j+\} }tjt,t.| |j0| |j2||j|||j4||t| t| t|j6d|j8|j:|}|j<j?||j<j?| |j<j?| |j<j?|j6|j<jA}t|j}||jBz }|jB}d}|tDkDrd}n|tkDrd}n |tkDrd}|r|jFstI|dztjtJtLddddd|||| }|j<j?|tjtNtPd|d}|j<j?|tS|d}tS|d }tS|d }tjtTtVdd||||t|jX }|j<j?||j<j?|jX|jZdk(r|j<j]|j<j_y)Nrrr(r!r%r"r#r*r$rrr2QrrzCentral directory offsetzCentral directory sizer,rrr)0rrrrrr7rr9rBrSrr6rrrryrr rrrirr r"rrrrrrrGr{rtrrrrrWrXrTrUrrwrvrrtruncater/)rrrrrr9rrr extra_datarrrirNrr.pos2 centDirCount centDirSize centDirOffsetr zip64endrec zip64locrecrbs rrzZipFile._write_end_records]]EB!ut|)BqEQJ6A>GerkBqEQJ."Q%1*=GE,%% 3 U__- U001& * !OO % 3 3 ""[0 U001 * % 3 3 JK)*d; #[[CE N*qU|-&+-/9: , ""i/!-= $$0!, < !+u/D/DEO e.B.BCN"'"<"<"> Hikk"2"2N"'"5"5"+U-@-@'7"'))]I"%h-Z#emmBT"#U%8%8%:M:M"/1G GGMM' " GGMM( # GGMM* % GGMM%-- (g#jww||~4==) T^^+   - -*N [ (7N ; &5N ##">#D$EFF ++"$6BAq, ],K GGMM+ & ++))1dA7K GGMM+ &|V4Lk:6K z:M-/?<(-T]]9KM  f  dmm$ 99  GG     rc|xjdzc_|js|js|jyyy)Nr!)rrrgrys rrzZipFile._fpclose s5 A(8(8 HHJ)9rr)rN)F)NN)NNN)i)$rrrrGrsrrr rrrr5r7r<r@rDrHrrsetterrJrMrQrgrjrrzrerbr{rrrrgrrrrrr r s , B(,%"%:$#^:>RV^@ T-l9 &  ^^   dEdL(1T 75$  +ZF.'+046D48'!R!,F,\|rr c,eZdZ deddfdZddZdZy) r rTrtcFtj|||||||_y)N)rrMr )r r _optimize)rrerrMr optimizes rrzPyZipFile.__init__s't$K$.  0!rNc tj|}|rI||sA|jr4tjj |rdnd}t |d|dytjj |\}}tjj |rtjj|d}tjj|r|r|d|}n|}|jrt d|d||j|d d |\}} |jr t d | |j|| ttj|} | jd| D]$} tjj|| } tjj| \} }tjj | rStjjtjj| ds|j| || |d k(s|r#|| s|jrt d| z|j| d d |\}} |jr t d | |j|| 'y|jr t d|ttj|D]} tjj|| } tjj| \} }|d k(sK|r#|| s|jrt d| zp|j| d d |\}} |jr t d | |j|| y|d dd k7r t!d|j|d d |\}} |jr t d| |j|| y)Nrre z skipped by filterfuncz __init__.pyrzAdding package inasrAdding) filterfunc.pyzfile %r skipped by filterfunczAdding files from directoryz.Files added with writepy() must end with ".py"z Adding file)rrrrrrrvr8isfile _get_codenamer{r)listdirremovesplitextwritepyrJ)rpathnamebasenamerlabeldirrinitnamer\rdirlistrNrrootexts rrzPyZipFile.writepys 99X& j2zz"$''--"9vuhGH GGMM(+ T 77== "ww||Hm>"'',,t]*KL LLx4>)@%j.>#zz %&E&L M$)-););D2J#zz %&E&L M$)-););D2J._compiless\ zzk4( ""4"I,, cgg s4A"AA"rz.pycr) optimizationr!r"rz"invalid value for 'optimize': {!r})rrrs) importlibutilcache_from_sourcerrrrrrrr0rformatrrv) rrrrfile_pyfile_pyc pycache_opt0 pycache_opt1 pycache_opt2rr\r archivenames ` rrzPyZipFile._get_codenamels e#f$ ~~77b7Q  ~~77a7P  ~~77a7P >>R x(''(#,,0@0I0II"**%''...'','00BGGG4D4M4MM%"''...'','00BGGG4D4M4MM%"''...'','00BGGG4D4M4MM%"G$yy))Q. ,++q0 , ,&G&--EG~~"$"">>Q&(E^^q((E>EEdnnUC$S/)GGNN5)GGEN++rwww/?/H/HH$..A&--EGggmmG,Q/ %-{;K{##r)rN)rrrrrrrrrrr r s!N"%: 2" P'dP$rr cddl}d}|j|}|jd}|jdddd |jd d d dd|jddddd|jdddd |jddd |j |}|j }|j [|j }t|d|5}|j}dddrtdj|tdy|j4|j}t|d|5}|jdddy|j8|j\}} t|d|5}|j| dddy|j|r0td t j"!t!j$d"|jj'd} |j} fd#t| d$5}| D]} t(j*j-| } | szShow listing of a zipfile)metavarhelpz-ez --extractr")rz zExtract zipfile into target dir)nargsrrz-cz--create+)zzzCreate zipfile from sourcesz-tz--testzTest if a zipfile is validz--metadata-encodingz z2Specify encoding of member names for -l, -e and -tr)rz.The following enclosed file is corrupted: {!r}z Done testingz/Non-conforming encodings not supported with -c.r:r!c tjj|r|j||tytjj |r~|r|j||t tj|D]H}|tjj||tjj||Jyyr) rrrr{rrr)rr8)rrzippathnmaddToZips rrzmain..addToZipsww~~d#w 5t$HHT7+ D!12BRWW\\$3RWW\\'25NP3%rrr)argparseArgumentParseradd_mutually_exclusive_group add_argument parse_argsrtestr r@rrrxr<rgrjcreaterstderrexitpoprrrrrr)argsrrparsergroupencodingrrbadfilerzip_namefilesrrrs @rmainrsGK  $ $ $ =F  / / / >E tX{79 t[<=? tZs39; tX{8: -|QS   T "D%%H yyii S# :bjjlG;  BII'R S n  ii S# :b KKM; :  !ll V S# :b MM& !; :   Czz # HHQK;;??1%  PXs #r''**40 gg..rwwt/DEGr299bii88 GT7+ $ #) !!; :; : ; :.$ #s1J4KK BK4J>K  KK")r CompleteDirsr)binasciiimportlib.utilrrrrrrSrrrrIr  ImportErrorrKr$__all__ ExceptionrrrrrrrKrrrr rrrrr(rwrvrrurYrZr[r\r]r^r_r{rrr r"rr!_CD_CREATE_VERSION_CD_CREATE_SYSTEM_CD_EXTRACT_VERSION_CD_EXTRACT_SYSTEMr$_CD_COMPRESS_TYPE_CD_TIME_CD_DATE_CD_CRC_CD_COMPRESSED_SIZE_CD_UNCOMPRESSED_SIZEr#r%r&_CD_DISK_NUMBER_START_CD_INTERNAL_FILE_ATTRIBUTES_CD_EXTERNAL_FILE_ATTRIBUTESr'rYrarrVrWrrrrRrS_FH_EXTRACT_VERSION_FH_EXTRACT_SYSTEMrX_FH_COMPRESSION_METHOD_FH_LAST_MOD_TIME_FH_LAST_MOD_DATE_FH_CRC_FH_COMPRESSED_SIZE_FH_UNCOMPRESSED_SIZErTrUrTrUrRrWrXrV_CD64_SIGNATURE_CD64_DIRECTORY_RECSIZE_CD64_CREATE_VERSION_CD64_EXTRACT_VERSION_CD64_DISK_NUMBER_CD64_DISK_NUMBER_START_CD64_NUMBER_ENTRIES_THIS_DISK_CD64_NUMBER_ENTRIES_TOTAL_CD64_DIRECTORY_SIZE_CD64_OFFSET_START_CENTDIRrStructr4rBrHr rqrDrobjectr rrrrr1rrNrVr[r]rvrrrr r r_pathrrrrrr!s    JJE     9    #        !12    $  !12     !!  #   "  !12  ! %))&//*CD"""6??#56!" #fmmE** (V:x&ivi`   #L"".8wxxx  x  x yzy{   !"#(N&  P$%!%!P(T""Tn P+B%%P+h\ \ ~k$k$\C,LcG D NNE  C  Ds4I I#I1 I I #I.-I.1I<;I<