zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
U
Þ=®dÑã7@sÌ dZddlZddlZddlZddlZddlZddlmZddlm    Z    ddlm
Z
ddl m Z ddl m Z ddl mZd    d
lmZd    d lmZd    d lmZd    d lmZd    dlmZd    dlmZd    dlmZd    dlmZd    dlmZd    dlmZd    dlmZd    dlmZd    dlmZej rbddl!Z"d    dl#m$Z$d    dl%m&Z&d    dlm'Z'd    dl(m)Z)Gdd„de"j*ƒZ+ej,dej-dej.fdZ/e ,d ¡Z0e ,d!¡Z1e1e1d"œd#d$„Z2düd%ej3ej4e5e6fej3ej-ej.gej.fej3ej.ej-ej.gej.fd&œd'd(„Z7dýd%ej3ej4e5e6fej3ej-ej.gej.fej-ej.gej8ej.fd)œd*d+„Z9ej3ej4e5e6fej8ej4e5e6fd,œd-d.„Z:d/e d"œd0d1„Z;ej4e5ej<e5ej.fej=ej>e5ej.ffe5d"œd2d3„Z?edþd4e5e5e5ej3e6e5d5œd6d7„ƒZ@e5e5d8œd9d:„ZAe5e5d8œd;d<„ZBej4ej<e0e1fefejCej>e0e1fd"œd=d>„ZDedÿd4ej<e5ej.feEe5d@œdAdB„ƒZFe5e5d8œdCdD„ZGe HdE¡ZIe5e5d8œdFdG„ZJdej<e0e1feEdJeEej8ej>e0e1fdKœdLdM„ZKedd%dNeEeEej3ej4e5e6fdOdPœdQdR„ƒZLedd%dNeEej3ej4e5e6fdSdTœdUdV„ƒZMd%dNdWeEej3ej4e5e6fdXdYœdZd[„ZNedd%dNeEej3ej4e5e6fdXdTœd\d]„ƒZOedd%dNeEej3ej4e5e6fdXdTœd^d_„ƒZPde1e1eEe1daœdbdc„ZQedd4ej=e5ej3ej4e5e6fe5ddœdedf„ƒZReeRƒdd4ej4ejSej=fe5ej3ej4e5e6fe5ddœdgdh„ƒZTde5e6e5djœdkdl„ZUed%dNdXdmœdndo„ƒZVeeVƒd%dpdXdmœdqdr„ƒZWed%dsdXdmœdtdu„ƒZXedvdwdXdxœdydz„ƒZYd    ej4e5eZe6feEe5d{œd|d}„Z[ej.e5d"œd~d„Z\e Hd€¡Z]ed
d4e5ej3e6eEej3e5ej3e5ej3ej=e5e5dœd‚dƒ„ƒZ^d e5ej4e6e5feEeEe5d…œd†d‡„Z_ed d%e5e6eEe5ej3e6e5dŠœd‹dŒ„ƒZ`ed d%e5e6eEej3e5eEe5dŽœdd„ƒZae Hd‘¡Zbe5e6d8œd’d“„Zcdej.e6e6e6d•œd–d—„Zddej.eZeZd™œdšd›„Zee5ej.ej.e5dœœddž„Zfde5ej3e5e5dŸœd d¡„Zgd/e5d"œd¢d£„Zhdd¤e6d¥d¦d§œd¨d©„Zieeiƒddpe6ej3ej.d¦d§œdªd«„ƒZjddNe6d¥d¦d¬œd­d®„ZkdeZe6d°eZd±œd²d³„ZlGd´dµ„dµejmƒZnedd%dNej4e5e6fej3ej.eEd¶d·œd¸d¹„ƒZoeeoƒdd%dpej4e5e6fej3ej.eEd¶d·œdºd»„ƒZpedd%dNej3ej4e5e6fe1e1d¼œd½d¾„ƒZqeeqƒdd%dpej3ej4e5e6fe1e1d¼œd¿dÀ„ƒZrdNdOd"œdÁd„ZseesƒdpdOd"œdÃdĄƒZte5e d"œdÅdƄZue5e5d"œdÇdȄZvejwe5e5d"œdÉdʄƒZxejwdNdNd"œdËdʄƒZxej4e5ej=e1fej4e5ej=e1fd"œdÌdʄZxed%ej.e5ej4eej.fd͜dÎdτƒZyejwdvej=e5ej.ej.ej=dМdÑd҄ƒZzejwdddӜdvej=e5ej3ej.ej=dԜdÕd҄ƒZzedvej=ej.ej.ej=d֜d×d҄ƒZzejwdvej4ejSej=fe5ej.ej.ej=dМdØdلƒZ{ejwdddӜdvej4ejSej=fe5ej3ej.ej=dԜdÚdلƒZ{eezƒdvej4ejSej=fej.ej.ejSd֜dÛdلƒZ{edvdNej.ej.dSd֜dÜd݄ƒZ|ee|ƒdvdpej.ej.dÞd֜dßdà„ƒZ}edvdNej.ej.dSd֜dád℃Z~ee~ƒdvdpej.ej.dÞd֜dãd䄃ZedvdNej.ej.dSd֜dåd愃Z€ee€ƒdvdpej.ej.dÞd֜dçd脃ZedvdNej.ej.dSd֜dédꄃZ‚ee‚ƒdvdpej.ej.dÞd֜dëd섃Zƒedd4ej.ej3e6e díœdîdZ„dvej>ej…e5ej.fej-ej.gej.fdðœdñdò„Z†dvej>ej…e5ej.fej-ej.gej.feEej-ej.gej.fdóœdôdõ„Z‡dvdNej>ej…e5ej.fej-ej.gej.feEdSdöœd÷dø„Zˆdvdpej>ej…e5ej.fej-ej.gej.feEdÞdöœdùdú„Z‰eŠeyekeGeUe‹eQeQeKe e e[eWeee;efepe_edeTeXe‹eteBeDe{eOePe\eYeeƒe@exeleue}eejeLeehereJege`eMeAe?e^eceaeFe„dûœ6ZŒdS(z7Built-in template filters used with the ``|`` operator.éN)Úabc)Úchain)Úgroupby)Úescape©ÚMarkup)Úsoft_stré)Ú async_variant)Ú
auto_aiter)Ú
auto_await©Ú auto_to_list)ÚFilterArgumentError)Ú    Undefined)Úhtmlsafe_json_dumps)Ú pass_context)Úpass_environment)Úpass_eval_context©Úpformat©Ú    url_quote)Úurlize)Ú Environment)Ú EvalContext)ÚContext)ÚSandboxedEnvironmentc@seZdZedœdd„ZdS)ÚHasHTML©ÚreturncCsdS©N©©Úselfr"r"úEd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\jinja2/filters.pyÚ__html__%szHasHTML.__html__N)Ú__name__Ú
__module__Ú __qualname__Ústrr&r"r"r"r%r$srÚF.)ÚboundÚKÚV)Úvaluer cCst|tƒrt t| ¡¡S|S)zxFor use as a postprocessor for :func:`make_attrgetter`. Converts strings
    to lowercase and returns other types as-is.)Ú
isinstancer*ÚtÚcastr.Úlower©r/r"r"r%Ú ignore_case.s
r5r)Ú environmentÚ    attributeÚ postprocessÚdefaultr cs*t|ƒ‰tjtjdœ‡‡‡‡fdd„ }|S)zæReturns a callable that looks up the given attribute from a
    passed object with the rules of the environment.  Dots are allowed
    to access attributes of attributes.  Integer parts in paths are
    looked up as integers.
    ©Úitemr cs@ˆD]&}ˆ ||¡}ˆdk    rt|tƒrˆ}qˆdk    r<ˆ|ƒ}|Sr!)Úgetitemr0r)r;Úpart©r9r6Úpartsr8r"r%Ú
attrgetterDs z#make_attrgetter.<locals>.attrgetter)Ú_prepare_attribute_partsr1ÚAny)r6r7r8r9r@r"r>r%Úmake_attrgetter7s  rC)r6r7r8r csPt|tƒr| d¡}n|g}dd„|Dƒ‰tjtjtjdœ‡‡‡fdd„ }|S)a©Returns a callable that looks up the given comma separated
    attributes from a passed object with the rules of the environment.
    Dots are allowed to access attributes of each attribute.  Integer
    parts in paths are looked up as integers.
 
    The value returned by the returned callable is a list of extracted
    attribute values.
 
    Examples of attribute: "attr1,attr2", "attr1.inner1.0,attr2.inner2.0", etc.
    ú,cSsg|] }t|ƒ‘qSr")rA©Ú.0r;r"r"r%Ú
<listcomp>gsz)make_multi_attrgetter.<locals>.<listcomp>r:csVdgtˆƒ}tˆƒD]:\}}|}|D]}ˆ ||¡}q&ˆdk    rHˆ|ƒ}|||<q|Sr!)ÚlenÚ    enumerater<)r;ÚitemsÚiZattribute_partZitem_ir=©r6r?r8r"r%r@is
z)make_multi_attrgetter.<locals>.attrgetter)r0r*Úsplitr1rBÚList)r6r7r8rMr@r"rLr%Úmake_multi_attrgetterSs 
 "rO)Úattrr cCs0|dkr gSt|tƒr*dd„| d¡DƒS|gS)NcSs g|]}| ¡rt|ƒn|‘qSr")ÚisdigitÚint)rFÚxr"r"r%rGƒsz,_prepare_attribute_parts.<locals>.<listcomp>Ú.)r0r*rM)rPr"r"r%rA|s
 
rAzt.Union[str, HasHTML]cCs&t|dƒrt d|¡ ¡}tt|ƒƒS)zCEnforce HTML escaping.  This will probably double escape variables.r&r)Úhasattrr1r2r&rr*r4r"r"r%Údo_forceescapeˆs
rVcCsJt|tƒst|tjƒst|ƒSt|tƒr2| ¡}n|}d dd„|Dƒ¡S)a3Quote data for use in a URL path or query using UTF-8.
 
    Basic wrapper around :func:`urllib.parse.quote` when given a
    string, or :func:`urllib.parse.urlencode` for a dict or iterable.
 
    :param value: Data to quote. A string will be quoted directly. A
        dict or iterable of ``(key, value)`` pairs will be joined as a
        query string.
 
    When given a string, "/" is not quoted. HTTP servers treat "/" and
    "%2F" equivalently in paths. If you need quoted slashes, use the
    ``|replace("/", "%2F")`` filter.
 
    .. versionadded:: 2.7
    ú&css0|](\}}t|dd›dt|dd›VqdS)T)Zfor_qsú=Nr)rFÚkÚvr"r"r%Ú    <genexpr>ªszdo_urlencode.<locals>.<genexpr>)r0r*rÚIterablerÚdictrJÚjoin)r/rJr"r"r%Ú do_urlencodes
 
 
ÿr_r)Úeval_ctxÚsÚoldÚnewÚcountr cCsr|dkr d}|js,t|ƒ t|ƒt|ƒ|¡St|dƒsJt|dƒrTt|dƒsTt|ƒ}nt|ƒ}| t|ƒt|ƒ|¡S)aüReturn a copy of the value with all occurrences of a substring
    replaced with a new one. The first argument is the substring
    that should be replaced, the second is the replacement string.
    If the optional third argument ``count`` is given, only the first
    ``count`` occurrences are replaced:
 
    .. sourcecode:: jinja
 
        {{ "Hello World"|replace("Hello", "Goodbye") }}
            -> Goodbye World
 
        {{ "aaaaargh"|replace("a", "d'oh, ", 2) }}
            -> d'oh, d'oh, aaargh
    Néÿÿÿÿr&)Ú
autoescaper*ÚreplacerUrr)r`rarbrcrdr"r"r%Ú
do_replace¯sÿþý
rh)rar cCs t|ƒ ¡S)zConvert a value to uppercase.)rÚupper©rar"r"r%Údo_upperÓsrkcCs t|ƒ ¡S)zConvert a value to lowercase.)rr3rjr"r"r%Údo_lowerØsrlccs4t|tƒrdSt|tjƒs"tdƒ‚| ¡EdHdS)aOReturn an iterator over the ``(key, value)`` items of a mapping.
 
    ``x|items`` is the same as ``x.items()``, except if ``x`` is
    undefined an empty iterator is returned.
 
    This filter is useful if you expect the template to be rendered with
    an implementation of Jinja in another programming language that does
    not have a ``.items()`` method on its mapping type.
 
    .. code-block:: html+jinja
 
        <dl>
        {% for key, value in my_dict|items %}
            <dt>{{ key }}
            <dd>{{ value }}
        {% endfor %}
        </dl>
 
    .. versionadded:: 3.1
    Nz'Can only get item pairs from a mapping.)r0rrÚMappingÚ    TypeErrorrJr4r"r"r%Údo_itemsÝs
 
 roT)r`ÚdÚ    autospacer cCs:d dd„| ¡Dƒ¡}|r(|r(d|}|jr6t|ƒ}|S)acCreate an SGML/XML attribute string based on the items in a dict.
    All values that are neither `none` nor `undefined` are automatically
    escaped:
 
    .. sourcecode:: html+jinja
 
        <ul{{ {'class': 'my_list', 'missing': none,
                'id': 'list-%d'|format(variable)}|xmlattr }}>
        ...
        </ul>
 
    Results in something like this:
 
    .. sourcecode:: html
 
        <ul class="my_list" id="list-42">
        ...
        </ul>
 
    As you can see it automatically prepends a space in front of the item
    if the filter returned something unless the second parameter is false.
    ú css<|]4\}}|dk    rt|tƒst|ƒ›dt|ƒ›dVqdS)Nz="ú")r0rr)rFÚkeyr/r"r"r%r[s
þzdo_xmlattr.<locals>.<genexpr>)r^rJrfr)r`rprqÚrvr"r"r%Ú
do_xmlattrûs
þrvcCs t|ƒ ¡S)zYCapitalize a value. The first character will be uppercase, all others
    lowercase.
    )rÚ
capitalizerjr"r"r%Ú do_capitalize$srxz ([-\s({\[<]+)cCsd dd„t t|ƒ¡Dƒ¡S)zˆReturn a titlecased version of the value. I.e. words will start with
    uppercase letters, all remaining characters are lowercase.
    ÚcSs,g|]$}|r|d ¡|dd… ¡‘qS)rr    N)rir3rEr"r"r%rG3sþzdo_title.<locals>.<listcomp>)r^Ú_word_beginning_split_rerMrrjr"r"r%Údo_title.s
 þÿr{Frtzte.Literal["key", "value"])r/Úcase_sensitiveÚbyÚreverser cs\|dkrd‰n|dkrd‰ntdƒ‚tjtjtjftjdœ‡‡fdd„ }t| ¡||d    S)
afSort a dict and yield (key, value) pairs. Python dicts may not
    be in the order you want to display them in, so sort them first.
 
    .. sourcecode:: jinja
 
        {% for key, value in mydict|dictsort %}
            sort the dict by key, case insensitive
 
        {% for key, value in mydict|dictsort(reverse=true) %}
            sort the dict by key, case insensitive, reverse order
 
        {% for key, value in mydict|dictsort(true) %}
            sort the dict by key, case sensitive
 
        {% for key, value in mydict|dictsort(false, 'value') %}
            sort the dict by value, case insensitive
    rtrr/r    z,You can only sort by either "key" or "value"r:cs|ˆ}ˆst|ƒ}|Sr!)r5)r;r/©r|Úposr"r%Ú    sort_funcYszdo_dictsort.<locals>.sort_func©rtr~)rr1ÚTuplerBÚsortedrJ)r/r|r}r~rr"rr%Ú do_dictsort;s&r…z t.Iterable[V]z    t.List[V])r6r/r~r|r7r cCs$t|||stndd}t|||dS)a-Sort an iterable using Python's :func:`sorted`.
 
    .. sourcecode:: jinja
 
        {% for city in cities|sort %}
            ...
        {% endfor %}
 
    :param reverse: Sort descending instead of ascending.
    :param case_sensitive: When sorting strings, sort upper and lower
        case separately.
    :param attribute: When sorting objects or dicts, an attribute or
        key to sort by. Can use dot notation like ``"address.city"``.
        Can be a list of attributes like ``"age,name"``.
 
    The sort is stable, it does not change the relative order of
    elements that compare equal. This makes it is possible to chain
    sorts on different attributes and ordering.
 
    .. sourcecode:: jinja
 
        {% for user in users|sort(attribute="name")
            |sort(reverse=true, attribute="age") %}
            ...
        {% endfor %}
 
    As a shortcut to chaining when the direction is the same for all
    attributes, pass a comma separate list of attributes.
 
    .. sourcecode:: jinja
 
        {% for user in users|sort(attribute="age,name") %}
            ...
        {% endfor %}
 
    .. versionchanged:: 2.11.0
        The ``attribute`` parameter can be a comma separated list of
        attributes, e.g. ``"age,name"``.
 
    .. versionchanged:: 2.6
       The ``attribute`` parameter was added.
    N©r8r‚)rOr5r„)r6r/r~r|r7Úkey_funcr"r"r%Údo_sortds 2
ÿrˆz t.Iterator[V])r6r/r|r7r ccsJt|||stndd}tƒ}|D]$}||ƒ}||kr | |¡|Vq dS)aÍReturns a list of unique items from the given iterable.
 
    .. sourcecode:: jinja
 
        {{ ['foo', 'bar', 'foobar', 'FooBar']|unique|list }}
            -> ['foo', 'bar', 'foobar']
 
    The unique items are yielded in the same order as their first occurrence in
    the iterable passed to the filter.
 
    :param case_sensitive: Treat upper and lower case strings as distinct.
    :param attribute: Filter objects with unique values for this attribute.
    Nr†)rCr5ÚsetÚadd)r6r/r|r7ÚgetterÚseenr;rtr"r"r%Ú    do_uniqueœs
ÿ
rzt.Callable[..., V]zt.Union[V, Undefined])r6r/Úfuncr|r7r cCs^t|ƒ}z t|ƒ}Wntk
r2| d¡YSXt|||sBtndd}|t|g|ƒ|dS)Nz'No aggregated item, sequence was empty.r†©rt)ÚiterÚnextÚ StopIterationÚ    undefinedrCr5r)r6r/rŽr|r7ÚitÚfirstr‡r"r"r%Ú _min_or_max½s 
ÿr–cCst||t||ƒS)aReturn the smallest item from the sequence.
 
    .. sourcecode:: jinja
 
        {{ [1, 2, 3]|min }}
            -> 1
 
    :param case_sensitive: Treat upper and lower case strings as distinct.
    :param attribute: Get the object with the min value of this attribute.
    )r–Úmin©r6r/r|r7r"r"r%Údo_minÑsr™cCst||t||ƒS)aReturn the largest item from the sequence.
 
    .. sourcecode:: jinja
 
        {{ [1, 2, 3]|max }}
            -> 3
 
    :param case_sensitive: Treat upper and lower case strings as distinct.
    :param attribute: Get the object with the max value of this attribute.
    )r–Úmaxr˜r"r"r%Údo_maxåsr›ry)r/Ú default_valueÚbooleanr cCst|tƒs|r|s|S|S)a`If the value is undefined it will return the passed default value,
    otherwise the value of the variable:
 
    .. sourcecode:: jinja
 
        {{ my_variable|default('my_variable is not defined') }}
 
    This will output the value of ``my_variable`` if the variable was
    defined, otherwise ``'my_variable is not defined'``. If you want
    to use default with variables that evaluate to false you have to
    set the second parameter to `true`:
 
    .. sourcecode:: jinja
 
        {{ ''|default('the string was empty', true) }}
 
    .. versionchanged:: 2.11
       It's now possible to configure the :class:`~jinja2.Environment` with
       :class:`~jinja2.ChainableUndefined` to make the `default` filter work
       on nested elements and attributes that may contain undefined values
       in the chain without getting an :exc:`~jinja2.UndefinedError`.
    )r0r)r/rœrr"r"r%Ú
do_defaultùsrž)r`r/rpr7r cCs¬|dk    rtt|j|ƒ|ƒ}|js4t|ƒ tt|ƒ¡St|dƒs˜t|ƒ}d}t|ƒD]$\}}t|dƒrjd}qRt|ƒ||<qR|r†t    |ƒ}nt|ƒ}| |¡St
|ƒ tt
|ƒ¡S)a#Return a string which is the concatenation of the strings in the
    sequence. The separator between elements is an empty string per
    default, you can define it with the optional parameter:
 
    .. sourcecode:: jinja
 
        {{ [1, 2, 3]|join('|') }}
            -> 1|2|3
 
        {{ [1, 2, 3]|join }}
            -> 123
 
    It is also possible to join certain attributes of an object:
 
    .. sourcecode:: jinja
 
        {{ users|join(', ', attribute='username') }}
 
    .. versionadded:: 2.6
       The `attribute` parameter was added.
    Nr&FT) ÚmaprCr6rfr*r^rUÚlistrIrr)r`r/rpr7Z    do_escapeÚidxr;r"r"r%Ú sync_do_joins 
 
 
 
r¢cÃst|t|ƒIdH||ƒSr!)r¢r)r`r/rpr7r"r"r%Údo_joinTsr£éP)r/Úwidthr cCst|ƒ |¡S)z.Centers the value in a field of a given width.)rÚcenter)r/r¥r"r"r%Ú    do_center^sr§)r6Úseqr cCs2ztt|ƒƒWStk
r,| d¡YSXdS)z$Return the first item of a sequence.ú"No first item, sequence was empty.N)r‘rr’r“©r6r¨r"r"r%Ú sync_do_firstcsr«z*t.Union[t.AsyncIterable[V], t.Iterable[V]]cÃs8zt|ƒ ¡IdHWStk
r2| d¡YSXdS)Nr©)r Ú    __anext__ÚStopAsyncIterationr“rªr"r"r%Údo_firstnsr®zt.Reversible[V]cCs6zttt|ƒƒƒWStk
r0| d¡YSXdS)zèReturn the last item of a sequence.
 
    Note: Does not work with generators. You may want to explicitly
    convert it to a list:
 
    .. sourcecode:: jinja
 
        {{ data | selectattr('name', '==', 'Jinja') | list | last }}
    z!No last item, sequence was empty.N)r‘rÚreversedr’r“rªr"r"r%Údo_lastxs r°rz t.Sequence[V])Úcontextr¨r cCs2z t |¡WStk
r,|j d¡YSXdS)z'Return a random item from the sequence.z#No random item, sequence was empty.N)ÚrandomÚchoiceÚ
IndexErrorr6r“)r±r¨r"r"r%Ú    do_randomŽs rµ)r/Úbinaryr cCsèt|ƒ}|rdnd}|rdnd|r&dnd|r0dnd|r:d    nd
|rDd nd |rNd nd|rXdnd|rbdndg}|dkrtdS||krŠt|ƒ›dSt|ƒD]8\}}||d}||kr’|||d›d|›Sq’|||d›d|›SdS)zøFormat the value like a 'human-readable' file size (i.e. 13 kB,
    4.1 MB, 102 Bytes, etc).  Per default decimal prefixes are used (Mega,
    Giga, etc.), if the second parameter is set to `True` the binary
    prefixes are used (Mebi, Gibi).
    iièZKiBZkBZMiBZMBZGiBZGBZTiBZTBZPiBZPBZEiBZEBZZiBZZBZYiBZYBr    z1 Bytez Byteséz.1frrN)ÚfloatrRrI)r/r¶ÚbytesÚbaseÚprefixesrKÚprefixÚunitr"r"r%Údo_filesizeformat—s( 
 
 
 
 
 
 
 
ø  r¾cCst|ƒS)z.Pretty print a variable. Useful for debugging.rr4r"r"r%Ú    do_pprint¸sr¿z^([\w.+-]{2,}:(/){0,2})$)r`r/Útrim_url_limitÚnofollowÚtargetÚrelÚ extra_schemesr c Cs¼|jj}t|pd ¡ƒ}|r&| d¡| |dp4d ¡¡d t|ƒ¡pLd}|dkr^|d}|dkrr|dppd}|D] }    t     |    ¡dkrvt
|    ›d    ƒ‚qvt |||||d
}
|j r¸t |
ƒ}
|
S) a0Convert URLs in text into clickable links.
 
    This may not recognize links in some situations. Usually, a more
    comprehensive formatter, such as a Markdown library, is a better
    choice.
 
    Works on ``http://``, ``https://``, ``www.``, ``mailto:``, and email
    addresses. Links with trailing punctuation (periods, commas, closing
    parentheses) and leading punctuation (opening parentheses) are
    recognized excluding the punctuation. Email addresses that include
    header fields are not recognized (for example,
    ``mailto:address@example.com?cc=copy@example.com``).
 
    :param value: Original text containing URLs to link.
    :param trim_url_limit: Shorten displayed URL values to this length.
    :param nofollow: Add the ``rel=nofollow`` attribute to links.
    :param target: Add the ``target`` attribute to links.
    :param rel: Add the ``rel`` attribute to links.
    :param extra_schemes: Recognize URLs that start with these schemes
        in addition to the default behavior. Defaults to
        ``env.policies["urlize.extra_schemes"]``, which defaults to no
        extra schemes.
 
    .. versionchanged:: 3.0
        The ``extra_schemes`` parameter was added.
 
    .. versionchanged:: 3.0
        Generate ``https://`` links for URLs without a scheme.
 
    .. versionchanged:: 3.0
        The parsing rules were updated. Recognize email addresses with
        or without the ``mailto:`` scheme. Validate IP addresses. Ignore
        parentheses and brackets in more cases.
 
    .. versionchanged:: 2.8
       The ``target`` parameter was added.
    ryrÁz
urlize.relrrNz urlize.targetzurlize.extra_schemesr"z" is not a valid URI scheme prefix.)rÀrÃrÂrÄ)r6Úpoliciesr‰rMrŠÚupdater^r„Ú_uri_scheme_reÚ    fullmatchrrrfr) r`r/rÀrÁrÂrÃrÄrÅZ    rel_partsÚschemerur"r"r%Ú    do_urlizeÀs./
 ûrÊé)rar¥r•Úblankr csœt|tƒr|‰nd|‰d}t|tƒr6tˆƒ‰t|ƒ}||7}|rV|ˆ | ¡¡}n6| ¡}| d¡}|rŒ||| ‡fdd„|Dƒ¡7}|r˜ˆ|}|S)aúReturn a copy of the string with each line indented by 4 spaces. The
    first line and blank lines are not indented by default.
 
    :param width: Number of spaces, or a string, to indent by.
    :param first: Don't skip indenting the first line.
    :param blank: Don't skip indenting empty lines.
 
    .. versionchanged:: 3.0
        ``width`` can be a string.
 
    .. versionchanged:: 2.10
        Blank lines are not indented by default.
 
        Rename the ``indentfirst`` argument to ``first``.
    rrÚ
rc3s|]}|rˆ|n|VqdSr!r"©rFÚline©Z    indentionr"r%r[6szdo_indent.<locals>.<genexpr>)r0r*rr^Ú
splitlinesÚpop)rar¥r•rÌÚnewlineruÚlinesr"rÐr%Ú    do_indents&
 
 
ÿ rÕéÿú...)ÚenvraÚlengthÚ    killwordsÚendÚleewayr cCs¤|dkr|jd}|t|ƒks6tdt|ƒ›d|›ƒ‚|dksLtd|›ƒ‚t|ƒ||kr`|S|r||d|t|ƒ…|S|d|t|ƒ… dd¡d}||S)    aìReturn a truncated copy of the string. The length is specified
    with the first parameter which defaults to ``255``. If the second
    parameter is ``true`` the filter will cut the text at length. Otherwise
    it will discard the last word. If the text was in fact
    truncated it will append an ellipsis sign (``"..."``). If you want a
    different ellipsis sign than ``"..."`` you can specify it using the
    third parameter. Strings that only exceed the length by the tolerance
    margin given in the fourth parameter will not be truncated.
 
    .. sourcecode:: jinja
 
        {{ "foo bar baz qux"|truncate(9) }}
            -> "foo..."
        {{ "foo bar baz qux"|truncate(9, True) }}
            -> "foo ba..."
        {{ "foo bar baz qux"|truncate(11) }}
            -> "foo bar baz qux"
        {{ "foo bar baz qux"|truncate(11, False, '...', 0) }}
            -> "foo bar..."
 
    The default leeway on newer Jinja versions is 5 and was 0 before but
    can be reconfigured globally.
    Nztruncate.leewayzexpected length >= z, got rzexpected leeway >= 0, got rrr    )rÅrHÚAssertionErrorÚrsplit)rØrarÙrÚrÛrÜÚresultr"r"r%Ú do_truncate@s 
$ ràéO)r6rar¥Úbreak_long_wordsÚ
wrapstringÚbreak_on_hyphensr cs:ddl‰ˆdkr|j‰ˆ ‡‡‡‡‡fdd„| ¡Dƒ¡S)aúWrap a string to the given width. Existing newlines are treated
    as paragraphs to be wrapped separately.
 
    :param s: Original text to wrap.
    :param width: Maximum length of wrapped lines.
    :param break_long_words: If a word is longer than ``width``, break
        it across lines.
    :param break_on_hyphens: If a word contains hyphens, it may be split
        across lines.
    :param wrapstring: String to join each wrapped line. Defaults to
        :attr:`Environment.newline_sequence`.
 
    .. versionchanged:: 2.11
        Existing newlines are treated as paragraphs wrapped separately.
 
    .. versionchanged:: 2.11
        Added the ``break_on_hyphens`` parameter.
 
    .. versionchanged:: 2.7
        Added the ``wrapstring`` parameter.
    rNc s(g|] }ˆ ˆj|ˆddˆˆd¡‘qS)F)r¥Ú expand_tabsÚreplace_whitespacerârä)r^ÚwraprΩrâräÚtextwrapr¥rãr"r%rG˜s öúÿzdo_wordwrap.<locals>.<listcomp>)réZnewline_sequencer^rÑ)r6rar¥rârãrär"rèr%Ú do_wordwrapps õÿrêz\w+cCstt t|ƒ¡ƒS)zCount the words in that string.)rHÚ_word_reÚfindallrrjr"r"r%Ú do_wordcount«sríé
)r/r9rºr c Csrz t|tƒrt||ƒWSt|ƒWSttfk
rlztt|ƒƒWYSttfk
rf|YYSXYnXdS)aConvert the value into an integer. If the
    conversion doesn't work it will return ``0``. You can
    override this default using the first parameter. You
    can also override the default base (10) in the second
    parameter, which handles input with prefixes such as
    0b, 0o and 0x for bases 2, 8 and 16 respectively.
    The base is ignored for decimal numbers and non-string values.
    N)r0r*rRrnÚ
ValueErrorr¸)r/r9rºr"r"r%Údo_int°s    
 
rðç)r/r9r c    Cs,z
t|ƒWSttfk
r&|YSXdS)z¬Convert the value into a floating point number. If the
    conversion doesn't work it will return ``0.0``. You can
    override this default using the first parameter.
    N)r¸rnrï)r/r9r"r"r%Údo_floatÆs
rò)r/ÚargsÚkwargsr cOs |r|rtdƒ‚t|ƒ|p|S)aApply the given values to a `printf-style`_ format string, like
    ``string % values``.
 
    .. sourcecode:: jinja
 
        {{ "%s, %s!"|format(greeting, name) }}
        Hello, World!
 
    In most cases it should be more convenient and efficient to use the
    ``%`` operator or :meth:`str.format`.
 
    .. code-block:: text
 
        {{ "%s, %s!" % (greeting, name) }}
        {{ "{}, {}!".format(greeting, name) }}
 
    .. _printf-style: https://docs.python.org/library/stdtypes.html
        #printf-style-string-formatting
    z>can't handle positional and keyword arguments at the same time)rr)r/rórôr"r"r%Ú    do_formatÑs
ÿrõ)r/Úcharsr cCst|ƒ |¡S)z=Strip leading and trailing characters, by default whitespace.)rÚstrip)r/rör"r"r%Údo_trimísrøcCs*t|dƒrt d|¡ ¡}tt|ƒƒ ¡S)zAStrip SGML/XML tags and replace adjacent whitespace by one space.r&r)rUr1r2r&rr*Ú    striptagsr4r"r"r%Ú do_striptagsòs
rúzt.Collection[V]z t.Optional[V]zt.Iterator[t.List[V]])r/ÚslicesÚ    fill_withr c csŽt|ƒ}t|ƒ}||}||}d}t|ƒD]\}|||}    ||krL|d7}||d|}
||    |
…} |dk    r‚||kr‚|  |¡| Vq,dS)aFSlice an iterator and return a list of lists containing
    those items. Useful if you want to create a div containing
    three ul tags that represent columns:
 
    .. sourcecode:: html+jinja
 
        <div class="columnwrapper">
          {%- for column in items|slice(3) %}
            <ul class="column-{{ loop.index }}">
            {%- for item in column %}
              <li>{{ item }}</li>
            {%- endfor %}
            </ul>
          {%- endfor %}
        </div>
 
    If you pass it a second argument it's used to fill missing
    values on the last iteration.
    rr    N)r rHÚrangeÚappend) r/rûrür¨rÙZitems_per_sliceZslices_with_extraÚoffsetZ slice_numberÚstartrÛÚtmpr"r"r%Ú sync_do_sliceús   
rcÃstt|ƒIdH||ƒSr!)rr)r/rûrür"r"r%Údo_slice%sr)r/Ú    linecountrür ccsfg}|D]$}t|ƒ|kr"|Vg}| |¡q|rb|dk    r\t|ƒ|kr\||g|t|ƒ7}|VdS)a 
    A filter that batches items. It works pretty much like `slice`
    just the other way round. It returns a list of lists with the
    given number of items. If you provide a second parameter this
    is used to fill up missing items. See this example:
 
    .. sourcecode:: html+jinja
 
        <table>
        {%- for row in items|batch(3, '&nbsp;') %}
          <tr>
          {%- for column in row %}
            <td>{{ column }}</td>
          {%- endfor %}
          </tr>
        {%- endfor %}
        </table>
    N)rHrþ)r/rrürr;r"r"r%Údo_batch.s  rÚcommonz%te.Literal["common", "ceil", "floor"])r/Ú    precisionÚmethodr cCsL|dkrtdƒ‚|dkr"t||ƒStt|ƒ}t t||d|ƒd|¡S)aŒRound the number to a given precision. The first
    parameter specifies the precision (default is ``0``), the
    second the rounding method:
 
    - ``'common'`` rounds either up or down
    - ``'ceil'`` always rounds up
    - ``'floor'`` always rounds down
 
    If you don't specify a method ``'common'`` is used.
 
    .. sourcecode:: jinja
 
        {{ 42.55|round }}
            -> 43.0
        {{ 42.55|round(1, 'floor') }}
            -> 42.5
 
    Note that even if rounded to 0 precision, a float is returned.  If
    you need a real integer, pipe it through `int`:
 
    .. sourcecode:: jinja
 
        {{ 42.55|round|int }}
            -> 43
    >ÚfloorÚceilrz$method must be common, ceil or floorrrî)rÚroundÚgetattrÚmathr1r2r¸)r/rrrŽr"r"r%Údo_roundSs 
 
rc@s>eZdZUejed<ejed<edœdd„Zedœdd„Z    dS)    Ú _GroupTupleZgrouperr rcCs
t |¡Sr!)ÚtupleÚ__repr__r#r"r"r%rsz_GroupTuple.__repr__cCs
t |¡Sr!)rÚ__str__r#r"r"r%r„sz_GroupTuple.__str__N)
r'r(r)r1rBÚ__annotations__rNr*rrr"r"r"r%r{s
 
 
rzt.List[_GroupTuple])r6r/r7r9r|r cs\t|||stnd|d}dd„tt||d|ƒDƒ}|sXt|||d‰‡fdd„|Dƒ}|S)aqGroup a sequence of objects by an attribute using Python's
    :func:`itertools.groupby`. The attribute can use dot notation for
    nested access, like ``"address.city"``. Unlike Python's ``groupby``,
    the values are sorted first so only one group is returned for each
    unique value.
 
    For example, a list of ``User`` objects with a ``city`` attribute
    can be rendered in groups. In this example, ``grouper`` refers to
    the ``city`` value of the group.
 
    .. sourcecode:: html+jinja
 
        <ul>{% for city, items in users|groupby("city") %}
          <li>{{ city }}
            <ul>{% for user in items %}
              <li>{{ user.name }}
            {% endfor %}</ul>
          </li>
        {% endfor %}</ul>
 
    ``groupby`` yields namedtuples of ``(grouper, list)``, which
    can be used instead of the tuple unpacking above. ``grouper`` is the
    value of the attribute, and ``list`` is the items with that value.
 
    .. sourcecode:: html+jinja
 
        <ul>{% for group in users|groupby("city") %}
          <li>{{ group.grouper }}: {{ group.list|join(", ") }}
        {% endfor %}</ul>
 
    You can specify a ``default`` value to use if an object in the list
    does not have the given attribute.
 
    .. sourcecode:: jinja
 
        <ul>{% for city, items in users|groupby("city", default="NY") %}
          <li>{{ city }}: {{ items|map(attribute="name")|join(", ") }}</li>
        {% endfor %}</ul>
 
    Like the :func:`~jinja-filters.sort` filter, sorting and grouping is
    case-insensitive by default. The ``key`` for each group will have
    the case of the first item in that group of values. For example, if
    a list of users has cities ``["CA", "NY", "ca"]``, the "CA" group
    will have two values. This can be disabled by passing
    ``case_sensitive=True``.
 
    .. versionchanged:: 3.1
        Added the ``case_sensitive`` parameter. Sorting and grouping is
        case-insensitive by default, matching other filters that do
        comparisons.
 
    .. versionchanged:: 3.0
        Added the ``default`` parameter.
 
    .. versionchanged:: 2.6
        The attribute supports dot notation for nested access.
    N©r8r9cSsg|]\}}t|t|ƒƒ‘qSr")rr ©rFrtÚvaluesr"r"r%rGÏsÿz#sync_do_groupby.<locals>.<listcomp>r©r9cs"g|]\}}tˆ|dƒ|ƒ‘qS©r©r©rFÚ_r©Z output_exprr"r%rG×s)rCr5rr„©r6r/r7r9r|ÚexprÚoutr"rr%Úsync_do_groupbyˆsA
üþr cƒslt|||stnd|d}dd„ttt|ƒIdH|d|ƒDƒIdH}|sht|||d‰‡fdd„|Dƒ}|S)NrcÓs$g|]\}}t|t|ƒIdHƒ‘qSr!)rrrr"r"r%rGêsÿzdo_groupby.<locals>.<listcomp>rrcs"g|]\}}tˆ|dƒ|ƒ‘qSrrrrr"r%rGòs)rCr5rr„rrr"rr%Ú
do_groupbyÜs
üþ r!)r6Úiterabler7rr cCs"|dk    rtt||ƒ|ƒ}t||ƒS)a×Returns the sum of a sequence of numbers plus the value of parameter
    'start' (which defaults to 0).  When the sequence is empty it returns
    start.
 
    It is also possible to sum up only certain attributes:
 
    .. sourcecode:: jinja
 
        Total: {{ items|sum(attribute='price') }}
 
    .. versionchanged:: 2.6
       The ``attribute`` parameter was added to allow summing up over
       attributes.  Also the ``start`` parameter was moved on to the right.
    N)rŸrCÚsum)r6r"r7rr"r"r%Ú sync_do_sum÷sr$cÃsP|}|dk    rt||ƒ}nttdœdd„}t|ƒ2z3dHW}|||ƒ7}q06|S)N©rSr cSs|Sr!r"©rSr"r"r%rŽszdo_sum.<locals>.func)rCr.r )r6r"r7rrurŽr;r"r"r%Údo_sums r'cCst|ƒS)zkConvert the value into a list.  If it was a string the returned list
    will be a list of characters.
    )r r4r"r"r%Ú sync_do_list(sr(cÃst|ƒIdHSr!r r4r"r"r%Údo_list/sr)cCst|ƒS)z…Mark the value as safe which means that in an environment with automatic
    escaping enabled this variable will not be escaped.
    rr4r"r"r%Ú do_mark_safe4sr*cCst|ƒS)zHMark a value as unsafe.  This is the reverse operation for :func:`safe`.)r*r4r"r"r%Údo_mark_unsafe;sr+cCsdSr!r"r4r"r"r%Ú
do_reverse@sr,cCsdSr!r"r4r"r"r%r,Esc Cs„t|tƒr|ddd…Sz
t|ƒWStk
r~zt|ƒ}| ¡|WYStk
rx}ztdƒ|‚W5d}~XYnXYnXdS)z\Reverse the object or return an iterator that iterates over it the other
    way round.
    Nrezargument must be iterable)r0r*r¯rnr r~r)r/ruÚer"r"r%r,Js
 
 
)r6ÚobjÚnamer cCs„z t|ƒ}Wntk
r YnVXzt||ƒ}Wntk
rDYn2X|jrrt d|¡}| |||¡sr| ||¡S|S|j    ||dS)zðGet an attribute of an object.  ``foo|attr("bar")`` works like
    ``foo.bar`` just that always an attribute is returned and items are not
    looked up.
 
    See :ref:`Notes on subscriptions <notes-on-subscriptions>` for more details.
    r)r.r/)
r*Ú UnicodeErrorr ÚAttributeErrorZ    sandboxedr1r2Zis_safe_attributeZunsafe_undefinedr“)r6r.r/r/r"r"r%Údo_attr\s
   r2)r±r/r/rórôr cOsdSr!r"©r±r/r/rórôr"r"r%Ú sync_do_map{sr4)r7r9)r±r/r7r9r cCsdSr!r"©r±r/r7r9r"r"r%r4‚s)r±r/rórôr cos(|r$t|||ƒ}|D]}||ƒVqdS)aéApplies a filter on a sequence of objects or looks up an attribute.
    This is useful when dealing with lists of objects but you are really
    only interested in a certain value of it.
 
    The basic usage is mapping on an attribute.  Imagine you have a list
    of users but you are only interested in a list of usernames:
 
    .. sourcecode:: jinja
 
        Users on this page: {{ users|map(attribute='username')|join(', ') }}
 
    You can specify a ``default`` value to use if an object in the list
    does not have the given attribute.
 
    .. sourcecode:: jinja
 
        {{ users|map(attribute="username", default="Anonymous")|join(", ") }}
 
    Alternatively you can let it invoke a filter by passing the name of the
    filter and the arguments afterwards.  A good example would be applying a
    text conversion filter on a sequence:
 
    .. sourcecode:: jinja
 
        Users on this page: {{ titles|map('lower')|join(', ') }}
 
    Similar to a generator comprehension such as:
 
    .. code-block:: python
 
        (u.username for u in users)
        (getattr(u, "username", "Anonymous") for u in users)
        (do_lower(x) for x in titles)
 
    .. versionchanged:: 2.11.0
        Added the ``default`` parameter.
 
    .. versionadded:: 2.7
    N)Ú prepare_map©r±r/rórôrŽr;r"r"r%r4s+ cOsdSr!r"r3r"r"r%Údo_map¿sr8cCsdSr!r"r5r"r"r%r8ÊscOs@|r<t|||ƒ}t|ƒ2z 3dHW}t||ƒƒIdHVq6dSr!)r6r r r7r"r"r%r8Õs cOst||||dd„dƒS)a¢Filters a sequence of objects by applying a test to each object,
    and only selecting the objects with the test succeeding.
 
    If no test is specified, each object will be evaluated as a boolean.
 
    Example usage:
 
    .. sourcecode:: jinja
 
        {{ numbers|select("odd") }}
        {{ numbers|select("odd") }}
        {{ numbers|select("divisibleby", 3) }}
        {{ numbers|select("lessthan", 42) }}
        {{ strings|select("equalto", "mystring") }}
 
    Similar to a generator comprehension such as:
 
    .. code-block:: python
 
        (n for n in numbers if test_odd(n))
        (n for n in numbers if test_divisibleby(n, 3))
 
    .. versionadded:: 2.7
    cSs|Sr!r"r&r"r"r%Ú<lambda>ÿóz sync_do_select.<locals>.<lambda>F©Úselect_or_reject©r±r/rórôr"r"r%Úsync_do_selectãsr>zt.AsyncIterator[V]cÏst||||dd„dƒS)NcSs|Sr!r"r&r"r"r%r9    r:zdo_select.<locals>.<lambda>F©Úasync_select_or_rejectr=r"r"r%Ú    do_selectsrAcOst||||dd„dƒS)a¶Filters a sequence of objects by applying a test to each object,
    and rejecting the objects with the test succeeding.
 
    If no test is specified, each object will be evaluated as a boolean.
 
    Example usage:
 
    .. sourcecode:: jinja
 
        {{ numbers|reject("odd") }}
 
    Similar to a generator comprehension such as:
 
    .. code-block:: python
 
        (n for n in numbers if not test_odd(n))
 
    .. versionadded:: 2.7
    cSs| Sr!r"r&r"r"r%r9#r:z sync_do_reject.<locals>.<lambda>Fr;r=r"r"r%Úsync_do_reject srBcÏst||||dd„dƒS)NcSs| Sr!r"r&r"r"r%r9-r:zdo_reject.<locals>.<lambda>Fr?r=r"r"r%Ú    do_reject&srCcOst||||dd„dƒS)aWFilters a sequence of objects by applying a test to the specified
    attribute of each object, and only selecting the objects with the
    test succeeding.
 
    If no test is specified, the attribute's value will be evaluated as
    a boolean.
 
    Example usage:
 
    .. sourcecode:: jinja
 
        {{ users|selectattr("is_active") }}
        {{ users|selectattr("email", "none") }}
 
    Similar to a generator comprehension such as:
 
    .. code-block:: python
 
        (u for user in users if user.is_active)
        (u for user in users if test_none(user.email))
 
    .. versionadded:: 2.7
    cSs|Sr!r"r&r"r"r%r9Kr:z$sync_do_selectattr.<locals>.<lambda>Tr;r=r"r"r%Úsync_do_selectattr0srDcÏst||||dd„dƒS)NcSs|Sr!r"r&r"r"r%r9Ur:zdo_selectattr.<locals>.<lambda>Tr?r=r"r"r%Ú do_selectattrNsrEcOst||||dd„dƒS)aFFilters a sequence of objects by applying a test to the specified
    attribute of each object, and rejecting the objects with the test
    succeeding.
 
    If no test is specified, the attribute's value will be evaluated as
    a boolean.
 
    .. sourcecode:: jinja
 
        {{ users|rejectattr("is_active") }}
        {{ users|rejectattr("email", "none") }}
 
    Similar to a generator comprehension such as:
 
    .. code-block:: python
 
        (u for user in users if not user.is_active)
        (u for user in users if not test_none(user.email))
 
    .. versionadded:: 2.7
    cSs| Sr!r"r&r"r"r%r9qr:z$sync_do_rejectattr.<locals>.<lambda>Tr;r=r"r"r%Úsync_do_rejectattrXsrFcÏst||||dd„dƒS)NcSs| Sr!r"r&r"r"r%r9{r:zdo_rejectattr.<locals>.<lambda>Tr?r=r"r"r%Ú do_rejectattrtsrG)r`r/Úindentr cCsD|jj}|d}|d}|dk    r0| ¡}||d<t|fd|i|—ŽS)aSerialize an object to a string of JSON, and mark it safe to
    render in HTML. This filter is only for use in HTML documents.
 
    The returned string is safe to render in HTML documents and
    ``<script>`` tags. The exception is in HTML attributes that are
    double quoted; either use single quotes or the ``|forceescape``
    filter.
 
    :param value: The object to serialize to JSON.
    :param indent: The ``indent`` parameter passed to ``dumps``, for
        pretty-printing the value.
 
    .. versionadded:: 2.9
    zjson.dumps_functionzjson.dumps_kwargsNrHÚdumps)r6rÅÚcopyr)r`r/rHrÅrIrôr"r"r%Ú    do_tojson~srK)r±rórôr cs¨ˆsNdˆkrNˆ d¡}ˆ dd¡}ˆr<tdttˆƒƒ›ƒ‚tˆj||d}nVzˆd‰ˆdd…‰Wntk
r„tdƒd‚YnXtjtjdœ‡‡‡‡fd    d
„ }|S) Nr7r9zUnexpected keyword argument rrr    zmap requires a filter argumentr:csˆjjˆ|ˆˆˆdS)N)r±)r6Z call_filter©r;©rór±rôr/r"r%rޝsÿzprepare_map.<locals>.func)    rÒrr‘rrCr6Ú LookupErrorr1rB)r±rórôr7r9rŽr"rMr%r6›s 
 ÿr6)r±rórôÚmodfuncÚ lookup_attrr csº|rBz ˆd}Wntk
r.tdƒd‚YnXtˆj|ƒ‰d}nd}ttdœdd„‰z:ˆ|‰ˆd|d…‰tjtjdœ‡‡‡‡fdd    „ ‰Wntk
r¨t‰YnX‡‡‡fd
d „S) Nrz$Missing parameter for attribute namer    r%cSs|Sr!r"r&r"r"r%Ú    transfuncÉsz+prepare_select_or_reject.<locals>.transfuncr:csˆj ˆ|ˆˆ¡Sr!)r6Z    call_testrLrMr"r%rŽÐsz&prepare_select_or_reject.<locals>.funccsˆˆˆ|ƒƒƒSr!r"rL)rŽrOrQr"r%r9Ör:z*prepare_select_or_reject.<locals>.<lambda>)rNrrCr6r.r1rBÚbool)r±rórôrOrPrPÚoffr")rór±rŽrôrOr/rQr%Úprepare_select_or_reject·s   "
rT)r±r/rórôrOrPr ccs0|r,t|||||ƒ}|D]}||ƒr|VqdSr!)rT©r±r/rórôrOrPrŽr;r"r"r%r<Ùs
r<cCs>|r:t|||||ƒ}t|ƒ2z3dHW}||ƒr|Vq6dSr!)rTr rUr"r"r%r@és
r@)6ÚabsrPÚbatchrwr¦rdrpr9Zdictsortr-rZfilesizeformatr•r¸Z forceescapeÚformatrrHrRr^ÚlastrÙr r3rJrŸr—ršÚpprintr²ÚrejectZ
rejectattrrgr~r ÚsafeÚselectZ
selectattrÚsliceÚsortÚstringrùr#ÚtitleZtrimÚtruncateÚuniqueriÚ    urlencoderZ    wordcountZwordwrapZxmlattrZtojson)NN)N)N)T)FrtF)FFN)FN)FN)FN)ryF)ryN)ryN)r¤)F)NFNNN)rËFF)rÖFr×N)ráTNT)rrî)rñ)N)N)N)N)rr)NF)NF)Nr)Nr)N)Ú__doc__r r²ÚreÚtypingr1Ú collectionsrÚ    itertoolsrrZ
markupsaferrrZ async_utilsr
r r rÚ
exceptionsrZruntimerÚutilsrrrrrrrÚ TYPE_CHECKINGZtyping_extensionsÚter6rZnodesrrZsandboxrÚProtocolrÚTypeVarÚCallablerBr+r-r.r5ÚOptionalÚUnionr*rRrCrNrOrArVrmr\rƒr_rhrkrlÚIteratorrorRrvrxÚcompilerzr{r…rˆrr–r™r›ržr¢Ú AsyncIterabler£r§r«r®r°rµr¸r¾r¿rÇrÊrÕràrêrërírðròrõrørúrrrrÚ
NamedTuplerr r!r$r'r(r)r*r+Úoverloadr,r2r4r8r>rArBrCrDrErFrGrKÚDictr6rTr<r@rVrHZFILTERSr"r"r"r%Ú<module>s2                       
 
 ü
û ýü *þ     ,þ ÿþ#4ÿþ(
ü û )ûú7üû!ú üûüûýü !üû9üû    þ
þ    þ"!
ùøPÿ þ 0úù/úù7
     ÿþ +ý
ü    ÿþ 'ýü ( û 
úSû 
úüûüû0þþû
ú
þ1ú
û
ú
û þû    þû    þû    þû    ÿþþ ú #ù ù Ê