+
    TjLS                         ^ RI Ht ^ RIHtHt ^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHtHtHt ^ RIHt ^ RIHt ^ R	IHt RtRtRtRtRtRtRt^ tRt ! R R]4      t ! R R
]4      t ] ^RRRRRRRRR3R lt!R t"R# )    )ValidationError)BooleanFieldIntegerField)Form)get_default_renderer)	ErrorListRenderableFormMixin)CheckboxInputHiddenInputNumberInput)cached_property)gettext_lazy)ngettext_lazyBaseFormSetTOTAL_FORMSINITIAL_FORMSMIN_NUM_FORMSMAX_NUM_FORMSORDERDELETEi  c                      a a ] tR t^t oRt]! ]R7      t]! ]R7      t]! R]R7      t	]! R]R7      t
V 3R ltRtVtV ;t# )ManagementFormz
Keep track of how many form instances are displayed on the page. If adding
new forms via JavaScript, you should increment the count field of this form
as well.
)widgetF)requiredr   c                |   < \         SV `  4       pVP                  \        ^ 4       VP                  \        ^ 4       V# r   )superclean
setdefaultTOTAL_FORM_COUNTINITIAL_FORM_COUNT)selfcleaned_data	__class__s   & J/var/www/idalgo/venv/lib/python3.14/site-packages/django/forms/formsets.pyr   ManagementForm.clean+   s8    w} 	 0!4 2A6     )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   r   r   __static_attributes____classdictcell____classcell__)r$   __classdict__s   @@r%   r   r      sD      k2K 4M !%DM %DM r'   r   c            
         a  ] tR t^4t o Rt]t]tR]	! R4      R]
! RRR4      R]
! R	R
R4      /tRtRtRtRtRRRRR]RR3R ltR tR tR tR tR t]R 4       tR tR t]R 4       tR tR t]R 4       t]R 4       t ]R 4       t!]R  4       t"]R! 4       t#]R" 4       t$]%R# 4       t&]%R$ 4       t']%R% 4       t(R& t)]R' 4       t*R( t+R) t,R* t-R+ t.R, t/R- t0R. t1R/ t2R0 t3]R1 4       t4]R2 4       t5R3 t6R4t7V t8R# )5r   z3
A collection of instances of the same Form class.
missing_management_formzManagementForm data is missing or has been tampered with. Missing fields: %(field_names)s. You may need to file a bug report if the issue persists.too_many_formsz#Please submit at most %(num)d form.z$Please submit at most %(num)d forms.numtoo_few_formsz$Please submit at least %(num)d form.z%Please submit at least %(num)d forms.zdjango/forms/formsets/div.htmlzdjango/forms/formsets/p.htmlz django/forms/formsets/table.htmlzdjango/forms/formsets/ul.htmlNzid_%sc	                8   VR J;'       g    VR JV n         T;'       g    V P                  4       V n        W0n        T;'       g    / V n        T;'       g    / V n        WPn        T;'       g    / V n        W`n        R V n	        R V n
        V P                  V n        V P                  ;'       g    \        4       V n        / p	\        \        V 4      P                   4       F  p
V	P#                  \%        V
R/ 4      4       K!  	  Ve   V	P#                  V4       Wn        R # )Ndefault_error_messages)is_boundget_default_prefixprefixauto_iddatafilesinitialform_kwargserror_class_errors_non_form_errorsrendererform_rendererr   reversedtype__mro__updategetattrerror_messages)r"   r=   r>   r<   r;   r?   rA   r@   rK   messagesclss   &&&&&&&&&  r%   __init__BaseFormSet.__init__Q   s     D(==E,=99 7 7 9JJB	[[b
&,,"& $!]]??)=)?DJ../COOGC)A2FG 0%OON+&r'   c                ,    \        V P                  4      # )z5Yield the forms in the order they should be rendered.)iterformsr"   s   &r%   __iter__BaseFormSet.__iter__p   s    DJJr'   c                (    V P                   V,          # )zAReturn the form at the given index, based on the rendering order.)rR   r"   indexs   &&r%   __getitem__BaseFormSet.__getitem__t   s    zz%  r'   c                ,    \        V P                  4      # N)lenrR   rS   s   &r%   __len__BaseFormSet.__len__x   s    4::r'   c                    R# )z\
Return True since all formsets have a management form which is not
included in the length.
Tr(   rS   s   &r%   __bool__BaseFormSet.__bool__{   s    
 r'   c           	        V P                   f   RpMzV P                  ;'       dg    V P                  '       * ;'       dN    \        ;QJ d&    R V P                    4       F  '       g   K   RM	  RM! R V P                    4       4      '       * pRV P                  P
                  : RV P                  : RV: RV P                  4       : R	2	# )
NUnknownc              3   $   "   T F  qx  K  	  R # 5ir\   r(   .0form_errorss   & r%   	<genexpr>'BaseFormSet.__repr__.<locals>.<genexpr>   s     H<KK<s   TF<z: bound=z valid=z total_forms=>)rB   r9   rC   anyr$   r+   total_form_count)r"   is_valids   & r%   __repr__BaseFormSet.__repr__   s    << H  I I---I IH4<<HH4<<HHH  NN''MM!!#	
 	
r'   c                   V P                   '       dJ   \        V P                  V P                  V P                  V P
                  R7      pVP                  4        V# \        V P                  V P                  \        V P                  4       \        V P                  4       \        V P                  \        V P                  /V P
                  R7      pV# )z4Return the ManagementForm instance for this FormSet.)r<   r;   rD   )r<   r;   r?   rD   )r9   r   r=   r<   r;   rD   
full_cleanr    rn   r!   initial_form_countMIN_NUM_FORM_COUNTmin_numMAX_NUM_FORM_COUNTmax_numr"   forms   & r%   management_formBaseFormSet.management_form   s     ===!		{{	D OO  "{{$d&;&;&=&(?(?(A&&	 
D r'   c                   V P                   '       d6   \        V P                  P                  \        ,          V P
                  4      # V P                  4       p\        WP                  4      V P                  ,           pWP                  u;8  d   ^ 8  d   M MTpV# W P                  u;8  d   ^ 8  d   M V# V P                  pV# )z1Return the total number of forms in this FormSet.)r9   minr{   r#   r    absolute_maxrt   maxrv   extrarx   )r"   initial_formstotal_formss   &  r%   rn   BaseFormSet.total_form_count   s    ===
 $$112BCTEVEV  !335Mm\\:TZZGK ||0q0+  ||0q0 #llr'   c                    V P                   '       d"   V P                  P                  \        ,          # V P                  '       d   \        V P                  4      M^ pV# )z=Return the number of forms that are required in this FormSet.)r9   r{   r#   r!   r?   r]   )r"   r   s   & r%   rt   BaseFormSet.initial_form_count   sC    ===''445GHH 26C-1Mr'   c           
         \        V P                  4       4       Uu. uF%  pV P                  ! V3/ V P                  V4      B NK'  	  up# u upi )z+Instantiate forms at first property access.)rangern   _construct_formget_form_kwargs)r"   is   & r%   rR   BaseFormSet.forms   sR     40023
3   >d&:&:1&=>3
 	
 
s   +A
c                6    V P                   P                  4       # )z
Return additional keyword arguments for each individual formset form.

index will be None if the form being constructed is a new empty
form.
)r@   copyrW   s   &&r%   r   BaseFormSet.get_form_kwargs   s     $$&&r'   c           
        RV P                   RV P                  V4      RV P                  RRRV P                  /pV P                  '       d   V P
                  VR&   V P                  VR&   V P                  '       d   R	V9  d    V P                  V,          VR	&   WP                  4       8  d   WP                  8  d   R
VR&   VP                  V4       V P                  ! R/ VB pV P                  WA4       V#   \         d     Lli ; i)z;Instantiate and return the i-th form instance in a formset.r<   r;   rA   use_required_attributeFrD   r=   r>   r?   Tempty_permittedr(   )r<   
add_prefixrA   rE   r9   r=   r>   r?   
IndexErrorrt   rv   rI   rz   
add_fields)r"   r   kwargsdefaultsrz   s   &&,  r%   r   BaseFormSet._construct_form   s     t||dooa(4++ %e**	
 ===#yyHV $

HW<<<IV3&*ll1o#
 ''))a<<.?*.H&'yy$8$   s   C9 9DDc                <    V P                   RV P                  4        # )z7Return a list of all the initial forms in this formset.NrR   rt   rS   s   &r%   r   BaseFormSet.initial_forms   s     zz5D33566r'   c                <    V P                   V P                  4       R # )z5Return a list of all the extra forms in this formset.Nr   rS   s   &r%   extra_formsBaseFormSet.extra_forms   s     zz$113566r'   c                    / V P                  R 4      CRV P                  RV P                  R4      RRRRRV P                  /CpV P                  ! R	/ VB pV P                  VR 4       V# )
Nr<   r;   
__prefix__r   Tr   FrD   r(   )r   r<   r   rE   rz   r   )r"   r@   rz   s   &  r%   
empty_formBaseFormSet.empty_form  ss    
""4(
t||dool3t$e**
 yy';'d#r'   c                    V P                  4       '       g'   \        RV P                  P                  ,          4      hV P                   Uu. uF  qP
                  NK  	  up# u upi )zH
Return a list of form.cleaned_data dicts for every form in self.forms.
z+'%s' object has no attribute 'cleaned_data')ro   AttributeErrorr$   r)   rR   r#   ry   s   & r%   r#   BaseFormSet.cleaned_data  sP    
 }} =@W@WW  /3jj9jd!!j999s   A"c                   V P                  4       '       d   V P                  '       g   . # \        V R4      '       g   . V n        \	        V P
                  4       Fe  w  rWP                  4       8  d   VP                  4       '       g   K1  V P                  V4      '       g   KJ  V P                  P                  V4       Kg  	  V P                   Uu. uF  qP
                  V,          NK  	  up# u upi )z:Return a list of forms that have been marked for deletion._deleted_form_indexes)
ro   
can_deletehasattrr   	enumeraterR   rt   has_changed_should_delete_formappend)r"   r   rz   s   &  r%   deleted_formsBaseFormSet.deleted_forms  s     }}doooI t455)+D&$TZZ0//11$:J:J:L:L++D11..55a8 1 (,'A'AB'A!

1'ABBBs   C.c                   V P                  4       '       d   V P                  '       g'   \        RV P                  P                  ,          4      h\        V R4      '       g   . V n        \        V P                  4       F  w  rWP                  4       8  d   VP                  4       '       g   K1  V P                  '       d   V P                  V4      '       d   K\  V P                  P                  WP                  \        ,          34       K  	  R pV P                  P!                  VR7       V P                   Uu. uF  qP                  V^ ,          ,          NK  	  up# u upi )zx
Return a list of form in the order specified by the incoming data.
Raise an AttributeError if ordering is not allowed.
z,'%s' object has no attribute 'ordered_forms'	_orderingc                 2    V ^,          f   R# ^ V ^,          3# )   )r   r   r(   )ks   &r%   compare_ordering_key7BaseFormSet.ordered_forms.<locals>.compare_ordering_keyJ  s    Q4<!M1Q4y r'   )key)ro   	can_orderr   r$   r)   r   r   r   rR   rt   r   r   r   r   r#   ORDERING_FIELD_NAMEsort)r"   r   rz   r   s   &   r%   ordered_formsBaseFormSet.ordered_forms,  s    }}dnnn >AXAXX  t[))DN$TZZ0//11$:J:J:L:L???t'?'?'E'E%%q*;*;<O*P&QR 1!
 NN$89 +/..9.Q

1Q4  .999s   ;"E c                    R # )rz   r(   rM   s   &r%   r:   BaseFormSet.get_default_prefixT  s    r'   c                    V P                   # r\   )deletion_widgetr   s   &r%   get_deletion_widgetBaseFormSet.get_deletion_widgetX      """r'   c                    V P                   # r\   )ordering_widgetr   s   &r%   get_ordering_widgetBaseFormSet.get_ordering_widget\  r   r'   c                V    V P                   f   V P                  4        V P                   # )z
Return an ErrorList of errors that aren't associated with a particular
form -- i.e., from formset.clean(). Return an empty ErrorList if there
are none.
)rC   rs   rS   s   &r%   non_form_errorsBaseFormSet.non_form_errors`  s&       (OO$$$r'   c                V    V P                   f   V P                  4        V P                   # )z:Return a list of form.errors for every form in self.forms.)rB   rs   rS   s   &r%   errorsBaseFormSet.errorsj  s"     <<OO||r'   c                v    \        V P                  4       4      \        R V P                   4       4      ,           # )z<Return the number of errors across all forms in the formset.c              3   8   "   T F  p\        V4      x  K  	  R # 5ir\   )r]   rf   s   & r%   ri   0BaseFormSet.total_error_count.<locals>.<genexpr>s  s      1
0;Cs   )r]   r   sumr   rS   s   &r%   total_error_countBaseFormSet.total_error_countq  s5    4'')*S 1
041
 .
 
 	
r'   c                B    VP                   P                  \        R4      # )z7Return whether or not the form was marked for deletion.F)r#   getDELETION_FIELD_NAMEry   s   &&r%   r   BaseFormSet._should_delete_formw  s      $$%8%@@r'   c                F   V P                   '       g   R# V P                   \        V P                   Uu. uF>  pV P                  '       d   V P                  V4      '       d   K.  VP                  4       NK@  	  up4      pT;'       d    V P                  4       '       * # u upi )z1Return True if every form in self.forms is valid.F)r9   r   allrR   r   r   ro   r   )r"   rz   forms_valids   &  r%   ro   BaseFormSet.is_valid{  s    }}}  !JJ&DD,D,DT,J  &
 994#7#7#999s   BB$Bc                  a  . S n         S P                  RS P                  R7      S n        ^ pS P                  '       g   R# S P
                  P                  4       '       gj   \        S P                  R,          RRP                  V 3R lS P
                  P                   4       4      /RR7      pS P                  P                  V4       \        S P                  4       F  w  r4VP                  4       '       g   VS P                  4       8  d
   V^,          pVP                  pS P                   '       d   S P#                  V4      '       d   Kp  S P                   P                  V4       K  	   S P$                  '       d:   S P'                  4       \)        S P*                  4      ,
          S P,                  8  g1   S P
                  P.                  \0        ,          S P2                  8  d2   \        S P                  R	,          R
S P,                  /,          R	R7      hS P4                  '       dr   S P'                  4       \)        S P*                  4      ,
          V,
          S P6                  8  d2   \        S P                  R,          R
S P6                  /,          RR7      hS P9                  4        R#   \         d9   pS P                  TP:                  RS P                  R7      S n         Rp?R# Rp?ii ; i)zM
Clean all of self.data and populate self._errors and
self._non_form_errors.
nonform)rA   rD   Nr3   field_namesz, c              3   Z   <"   T F   pSP                   P                  V4      x  K"  	  R # 5ir\   )r{   r   )rg   
field_namer"   s   & r%   ri   )BaseFormSet.full_clean.<locals>.<genexpr>  s,      -*EJ ,,77
CC*Es   (+)paramscoder4   r5   )r   r6   )rB   rA   rD   rC   r9   r{   ro   r   rK   joinr   r   r   rR   r   rt   r   r   validate_maxrn   r]   r   rx   r#   r    r   validate_minrv   r   
error_list)r"   empty_forms_counterrorr   rz   rh   es   f      r%   rs   BaseFormSet.full_clean  sp   
  $ 0 0!DMM !1 !
 }}}##,,..###$=>!499 -*.*>*>*E*E- $ /	E !!((/ ,GA##%%!t/F/F/H*H!Q&! ++K4#;#;D#A#ALL, -	!!!))+c$2D2D.EET%%22 !!" &''(89UDLL<QQ) 
 !!!))+d(()*#$ ,,
 &''8E4<<;PP( 
 JJL 	$($4$4% %5 %D!!	s&   /J0 B+J0 -BJ0 0K3;-K..K3c                    R# )z
Hook for doing any extra formset-wide cleaning after Form.clean() has
been called on every form. Any ValidationError raised by this method
will not be associated with a particular form; it will be accessible
via formset.non_form_errors()
Nr(   rS   s   &r%   r   BaseFormSet.clean  s     	r'   c                j    \         ;QJ d    R V  4       F  '       g   K   R# 	  R# ! R V  4       4      # )z5Return True if data in any form differs from initial.c              3   @   "   T F  qP                  4       x  K  	  R # 5ir\   )r   )rg   rz   s   & r%   ri   *BaseFormSet.has_changed.<locals>.<genexpr>  s     7$$##%%$s   TF)rm   rS   s   &r%   r   BaseFormSet.has_changed  s+    s7$7ss7s7s7$777r'   c                   V P                  4       pV P                  '       d   VeF   W#8  d@   \        \        R4      V^,           RV P	                  4       R7      VP
                  \        &   M6\        \        R4      RV P	                  4       R7      VP
                  \        &   V P                  '       dY   V P                  '       g   VeA   W#8  d9   \        \        R4      RV P                  4       R7      VP
                  \        &   R# R# R# R# )z8A hook for adding extra fields on to each form instance.NOrderF)labelr?   r   r   )r   r   r   Delete)rt   r   r   _r   fieldsr   r   can_delete_extrar   r   r   )r"   rz   rX   rt   s   &&& r%   r   BaseFormSet.add_fields  s    !446>>> U%?3?G*!AI"335	4/0 4@G*"3354/0
 ???!!!e&7E<V/;k//10DKK+, =W&7 r'   c                (    V P                   : R V: 2# )-)r;   rW   s   &&r%   r   BaseFormSet.add_prefix  s    ++u--r'   c                    V P                   '       d"   V P                   ^ ,          P                  4       # V P                  P                  4       # )z^
Return True if the formset needs to be multipart, i.e. it
has FileInput, or False otherwise.
)rR   is_multipartr   rS   s   &r%   r   BaseFormSet.is_multipart  s7    
 :::::a=--//??//11r'   c                    V P                   '       d   V P                   ^ ,          P                  # V P                  P                  # r   )rR   mediar   rS   s   &r%   r  BaseFormSet.media  s1     :::::a=&&&??(((r'   c                .    V P                   P                  # r\   )rD   formset_template_namerS   s   &r%   template_nameBaseFormSet.template_name  s    }}222r'   c                
    R V /# )formsetr(   rS   s   &r%   get_contextBaseFormSet.get_context  s    4  r'   )r   rB   rC   r   r<   r=   rA   rK   r>   r@   rE   r?   r9   r;   rD   )9r)   r*   r+   r,   r-   r
   r   r   r   r   r   r8   template_name_divtemplate_name_ptemplate_name_tabletemplate_name_ulr   rN   rT   rY   r^   ra   rp   r   r{   rn   rt   rR   r   r   propertyr   r   r   r#   r   r   classmethodr:   r   r   r   r   r   r   ro   rs   r   r   r   r   r   r  r  r
  r.   r/   )r1   s   @r%   r   r   4   s     $O!O!1X$
 	-12

 	23
" 94O<6 '> !
   0* 
 
': 7 7 7 7   : : C C  %: %:N   # # # #%  
A:"BH86.2 ) ) 3 3! !r'   FNTc                $   Vf   \         pVf   \        pV	f   V\        ,           p	WY8  d   \        R4      hRV RVRVRVRV
RVRVR	V	R
VRVRV/pV P                  pVP	                  R4      '       d   VR,           pM	VR,           p\        W3V4      # )z*Return a FormSet for the given form class.z5'absolute_max' must be greater or equal to 'max_num'.rz   r   r   r   r   rv   rx   r   r   r   rD   r   SetFormSet)DEFAULT_MIN_NUMDEFAULT_MAX_NUM
ValueErrorr)   endswithrG   )rz   r	  r   r   r   rx   r   rv   r   r   r   rD   attrs	form_nameformset_names   &&&&&&&&&&&&   r%   formset_factoryr    s     !! 0PQQYj,77HE I&!! 5( 9,j%00r'   c                \    \        V  Uu. uF  qP                  4       NK  	  up4      # u upi )z8Validate every formset and return True if all are valid.)r   ro   )formsetsr	  s   & r%   	all_validr  E  s(     (;(w  "(;<<;s   ))r   r  r  )#django.core.exceptionsr   django.forms.fieldsr   r   django.forms.formsr   django.forms.renderersr   django.forms.utilsr   r	   django.forms.widgetsr
   r   r   django.utils.functionalr   django.utils.translationr   r   r   __all__r    r!   ru   rw   r   r   r  r  r   r   r  r  r(   r'   r%   <module>r)     s    2 : # 7 = H H 3 6 2
9 ! $ $ $     T 0_!% _!H 
,1^=r'   