PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` giP .dZddlZddlZddlZddlmZddlmZ ddedee deede fd Z d e dee defd Z Gd d e Z e ZejZej ZejZej"Zej$Zej&Zy)zConcise UUID generation.N)List)Optionalnumberalphabetpaddingreturncd}t|}|rt||\}}|||z }|r|r#t|t|z d}||d|zz}|dddS)zw Convert a number to a string, using the given alphabet. The output has the most significant digit first. rN)lendivmodmax)rrroutput alpha_lendigit remainders ?/opt/nydus/tmp/pip-target-bkdi07qp/lib/python/shortuuid/main.py int_to_stringr ssFH I vy1 (5/! #f+-q1 (1+ 11 $B$<stringc\d}t|}|D]}||z|j|z}|S)z Convert a string to a number, using the given alphabet. The input is assumed to have the most significant digit first. r)r index)rrrrchars r string_to_intrs> FH I;)#hnnT&::; MrceZdZddeeddfdZedefdZdde jdeedefdZ dd ed e de jfd Z dd eedeedefd ZddeedefdZdefdZdeddfdZddedefdZy) ShortUUIDNrrc.|d}|j|y)N923456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz) set_alphabet)selfrs r__init__zShortUUID.__init__+s  UH (#rcttjtjddz|jS)zNReturn the necessary length to fit the entire UUID given the current alphabet.)intmathceillog _alpha_lenr s r_lengthzShortUUID._length1s+499TXXafdoo>?@@ruuid pad_lengthct|tjs td| |j}t |j |j|S)z Encode a UUID into a string (LSB first) according to the alphabet. If leftmost (MSB) bits are 0, the string might be shorter. z#Input `uuid` must be a UUID object.)r) isinstance_uuUUID ValueErrorr+rr% _alphabet)r r,r-s rencodezShortUUID.encode6sD $)BC C  JTXXt~~zJJrrlegacyct|ts td|r|ddd}tjt ||j S)aL Decode a string according to the current alphabet into a UUID. Raises ValueError when encountering illegal characters or a too-long string. If string too short, fills leftmost (MSB) bits with 0. Pass `legacy=True` if your UUID was encoded with a ShortUUID version prior to 1.0.0. zInput `string` must be a str.Nr )r%)r/strr2r0r1rr3)r rr5s rdecodezShortUUID.decodeBsD&#&<= = DbD\FxxM&$..ABBrnamec@| |j}|tj}nh|jj dr%tj tj |}n$tj tj|}|j||S)z Generate and return a UUID. If the name parameter is provided, set the namespace to the provided name and generate a UUID. )zhttp://zhttps://) r+r0uuid4lower startswithuuid5 NAMESPACE_URL NAMESPACE_DNSr4)r r9r-us rr,zShortUUID.uuidSsw  J < A ZZ\ $ $%< = #++T2A #++T2A{{1j))rlengthcf| j}djfdt|DS)zOGenerate and return a cryptographically secure short random string of `length`.r c3\K|]#}tjj%ywN)secretschoicer3).0_r s r z#ShortUUID.random..ksM!w~~dnn5Ms),)r+joinrange)r rBs` rrandomzShortUUID.randomfs* >\\FwwMuV}MMMrc8dj|jS)z/Return the current alphabet used for new UUIDs.r )rKr3r*s r get_alphabetzShortUUID.get_alphabetmswwt~~&&rcttt|}t|dkDr"||_t|j|_yt d)z*Set the alphabet to be used for new UUIDs.z4Alphabet with more than one unique symbols required.N)listsortedsetr r3r)r2)r r new_alphabets rrzShortUUID.set_alphabetqsGF3x=12 | q )DN!$..1DOVW Wr num_bytesctjdtj|jz }ttj||zS)z/Return the string length of the shortened UUID.)r&r(r)r%r')r rVfactors rencoded_lengthzShortUUID.encoded_length|s:#$//!::499Vi/011rrE)F)NN))__name__ __module__ __qualname__rr7r!propertyr%r+r0r1r4boolr8r,rMrOrrZrrrr*s$#$$$ AAA K388 K# K# KCSC$C388C"*#*8C=*TW*&NXc]NcN'c' XS XT X22S2rrrE)__doc__r&rFr,r0typingrrr%r7rrobjectr_global_instancer4r8rMrOrrarrrfs @D 9/7}& # c s U2U2r;      ,, ,, r