a P}Z__jinja_template__)sysexc_infotcast BaseExceptionr isinstancerZ translatedr with_tracebackfake_tracebackfilenamelinenotb_nexttb_framef_coder f_globalsgetZget_corresponding_lineno tb_linenoappendreversed) r _ exc_valuetbstacktemplaterZfake_tbrr"@/usr/lib/python3.9/site-packages/ansible/_vendor/jinja2/debug.pyrewrite_traceback_stacks8         r$)rrrrr c Cs|dur"t|jj}|ddni}|||d}td|dd|d}d}|dur|jjj}|d krnd }n|d rd |d d}tj dkr|j |d}n@t |j |j |j|j|j|j|j|j|j|j||j|j|j|j}zt|||Wn"tytdjYS0dS)a,Produce a new traceback object that looks like it came from the template source instead of the compiled code. The filename, line number, and location name will point to the template, and the local variables will be the current template context. :param exc_value: The original exception to be re-raised to create the new traceback. :param tb: The original traceback to get the local variables and code info from. :param filename: The template filename. :param lineno: The line number in the template source. N__jinja_exception__)__name____file__r% rzraise __jinja_exception__execr!rootztop-level template codeZblock_zblock ))co_name)get_template_localsrf_localspopcompilerr. startswithr version_inforeplacer co_argcountco_kwonlyargcount co_nlocals co_stacksizeco_flagsco_code co_constsco_names co_varnames co_filenameco_firstlineno co_lnotab co_freevars co_cellvarsr)rr r) rrrrlocalsglobalscodelocationfunctionr"r"r#rLsR    r) real_localsr c Cs|d}|dur |}ni}i}|D]v\}}|dr0|turLq0z|dd\}}}t|}WntyYq0Yn0||dd} | |kr0||f||<q0|D]*\}\}}|tur| |dq|||<q|S)zlBased on the runtime locals, get the context that would be available at that point in the template. contextNZl_rr/)r) rZget_allcopyitemsr4rsplitint ValueErrorr2) rJctxdataZlocal_overridesnamevaluerZ depth_strdepthZ cur_depthr"r"r#r0s*     r0)N)r typingr typesrr exceptionsrZutilsrr TYPE_CHECKINGZruntimerOptionalstrrr$rPrMappingAnyDictr0r"r"r"r#s      ? J