fBFddlZddlZddlmZmZmZmZmZmZm Z m Z d*de de dee fdZ e dZe dej Ze d Ze d Ze d Ze d Ze dZe dZe dZe dZe dZe dZe dZe dZe dZGddeZGddeZGddZ Gdde!Z"Gdd Z#d!ee de de fd"Z$d#e#dee fd$Z%d#e#de fd%Z&d#e#de fd&Z'd#e#defd'Z(d(ee deefd)Z)y)+N)IOIteratorMatch NamedTupleOptionalPatternSequenceTuplestring extra_flagsreturncPtj|tj|zSN)recompileUNICODE)r r s V/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/dotenv/parser.py make_regexrs ::fbjj;6 77z (\r\n|\n|\r)z\s*)r z [^\S\r\n]*z(?:export[^\S\r\n]+)?z '([^']+)'z ([^=\#\s]+)z (=[^\S\r\n]*)z'((?:\\'|[^'])*)'z"((?:\\"|[^"])*)"z ([^\r\n]*)z(?:[^\S\r\n]*#[^\r\n]*)?z[^\S\r\n]*(?:\r\n|\n|\r|$)z[^\r\n]*(?:\r|\n|\r\n)?z\\[\\'\"abfnrtv]z\\[\\']c"eZdZUeed<eed<y)Originalr lineN)__name__ __module__ __qualname__str__annotations__intrrrrs K IrrcBeZdZUeeed<eeed<eed<eed<y)BindingkeyvalueoriginalerrorN)rrrrrrrboolrrrr!r!!s! # C= Krr!cJeZdZdededdfdZed dZd dZdeddfd Z y) Positioncharsrr Nc ||_||_yrr)r)selfr)rs r__init__zPosition.__init__)s  rc|ddS)Nrr+r)clss rstartzPosition.start-s##rcH|j|_|j|_yrr+)r,others rsetz Position.set1s[[ JJ rr c|xjt|z c_|xjttjt |z c_yr)r)lenrrfindall_newline)r,r s radvancezPosition.advance5s2 c&k!  SHf566 r)r r()r3r(r N) rrrrr- classmethodr1r4rr9rrrr(r((sHc$$7c7d7rr(c eZdZy)ErrorN)rrrrrrr<r<:srr<c~eZdZdeeddfdZdefdZd dZde fdZ de defd Z de defd Z d eedeefd Zy)Readerstreamr Nc|j|_tj|_tj|_yr)readr r(r1positionmark)r,r?s rr-zReader.__init__?s+kkm  ( NN$ rcZ|jjt|jkSr)rBr)r6r r,s rhas_nextzReader.has_nextDs }}""S%555rcN|jj|jyr)rCr4rBrEs rset_markzReader.set_markGs dmm$rct|j|jj|jj|jj S)N)r r)rr rCr)rBrrEs r get_markedzReader.get_markedJs:;;tyyt}}/B/BC  rcountcv|j|jj|jj|zSr)r rBr))r,rKs rpeekz Reader.peekPs,{{4==..t}}/B/BU/JKKrc|j|jj|jj|z}t||kr t d|jj ||S)Nzread: End of string)r rBr)r6r<r9)r,rKresults rrAz Reader.readSsZT]]001D1Du1LM v; -. . f% rregexc$|j|j|jj}| t d|jj |j|j |j|jS)Nzread_regex: Pattern not found) matchr rBr)r<r9r1endgroups)r,rPrRs r read_regexzReader.read_regexZsf DKK)<)<= =78 8 dkk%++- DE||~r)r N)rrrrrr-r&rFrHrrJrrMrArr rUrrrr>r>>sz%r#w%4% 6$6% H L#L#L## #rr>rPcTdttdtfd}|j||S)NrRr cLtj|jddS)Nrzunicode-escape)codecsdecodegroup)rRs r decode_matchz$decode_escapes..decode_matchcs}}U[[^-=>>r)rrsub)rPr r[s rdecode_escapesr]bs,?E#J?3? 99\6 **rreaderc|jd}|dk(ry|dk(r|jt\}|S|jt\}|S)Nr/#')rMrU_single_quoted_key _unquoted_key)r^charr"s r parse_keyreisS ;;q>D s{ ""#56 J""=1 Jrcz|jt\}tjdd|j S)Nz\s+#.*)rU_unquoted_valuerr\rstrip)r^parts rparse_unquoted_valuerkts00GT 66)R & - - //rc|jd}|dk(r'|jt\}tt|S|dk(r'|jt \}tt |S|dvryt|S)Nr/ra")rg  rg)rMrU_single_quoted_valuer]_single_quote_escapes_double_quoted_value_double_quote_escapesrk)r^rdr#s r parse_valuertysv ;;q>D t|$$%9:3U;; $$%9:3U;; $ $#F++rc|j |jt|jst dd|j dS|jt t|}|jt|jddk(r!|jtt|}nd}|jt|jtt |||j dS#t$r5|jtt dd|j dcYSwxYw)NF)r"r#r$r%r/=T)rHrU_multiline_whitespacerFr!rJ_exportre _whitespacerM _equal_signrt_comment _end_of_liner< _rest_of_line)r^r"r#s r parse_bindingr~s  OO  /0 **,   '"+& ;;q>S   k *#.v#6EE(#,'&&(    -(&&(    sADB2D;EEr?c#Kt|}|jrt||jryywr)r>rFr~)r?r^s r parse_streamrs0 F^F // F## // s9>>)r)*rXrtypingrrrrrrr r rrrr8 MULTILINErwryrxrbrcrzrprrrhr{r|r}rsrqrr!r( Exceptionr<r>r]rerkrtr~rrrrrs ...8s88WS\8 o &"6r||D' - . ->* )* !"67!"67]+ 1 278 56 "#67":.z j77$ I !!H+'#,+++f#00C0 , ,3 ," &" W" J$C$Xg%6$r